diff --git a/plugins/tensorboard-plugins/tb_plugin/.flake8 b/plugins/tensorboard-plugins/tb_plugin/.flake8
deleted file mode 100644
index 1c5254b9f84568ba37d21c8e77e803558a6dae54..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/.flake8
+++ /dev/null
@@ -1,3 +0,0 @@
-[flake8]
-max-line-length = 120
-per-file-ignores = __init__.py:F401 torch_tb_profiler/io/file.py: F401
diff --git a/plugins/tensorboard-plugins/tb_plugin/.gitignore b/plugins/tensorboard-plugins/tb_plugin/.gitignore
deleted file mode 100644
index dc7d4e6278beafdf41c8304cbc5915b3334095b3..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-/build
-/dist
-/*.egg-info
-__pycache__
diff --git a/plugins/tensorboard-plugins/tb_plugin/.pre-commit-config.yaml b/plugins/tensorboard-plugins/tb_plugin/.pre-commit-config.yaml
deleted file mode 100644
index a650ec83269e596e6a4634045da8a0eff17830b9..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/.pre-commit-config.yaml
+++ /dev/null
@@ -1,34 +0,0 @@
-# -------------------------------------------------------------------------
-# Copyright (c) Microsoft Corporation. All rights reserved.
-# -------------------------------------------------------------------------
-default_language_version:
- python: python3.8
-
-ci:
- autofix_prs: true
- autoupdate_commit_msg: '[pre-commit.ci] pre-commit suggestions'
- autoupdate_schedule: quarterly
- # submodules: true
-
-repos:
- - repo: https://github.com/pre-commit/pre-commit-hooks
- rev: v4.1.0
- hooks:
- - id: end-of-file-fixer
- exclude: torch_tb_profiler/static/index.html
- - id: trailing-whitespace
- - id: double-quote-string-fixer
-
- - repo: https://github.com/pre-commit/mirrors-autopep8
- rev: v1.6.0
- hooks:
- - id: autopep8
- name: Format code
- - repo: https://github.com/PyCQA/flake8
- rev: 4.0.1
- hooks:
- - id: flake8
- args:
- - "--max-line-length=120"
- - "--per-file-ignores=__init__.py:F401 tb_plugin/torch_tb_profiler/io/file.py: F401"
- name: Check PEP8
diff --git a/plugins/tensorboard-plugins/tb_plugin/LICENSE b/plugins/tensorboard-plugins/tb_plugin/LICENSE
deleted file mode 100644
index edb179715b5213644cfe903d43294f54892e707e..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/LICENSE
+++ /dev/null
@@ -1,33 +0,0 @@
-BSD License
-
-For Kineto software
-
-Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
-
-All contributions by Microsoft:
-Copyright (c) Microsoft Corporation. (The Azure AI Platform team)
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- * Neither the name Facebook nor the names of its contributors may be used to
- endorse or promote products derived from this software without specific
- prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/plugins/tensorboard-plugins/tb_plugin/README.md b/plugins/tensorboard-plugins/tb_plugin/README.md
deleted file mode 100644
index 6b9a3aee08efded9c219b8b5264cbf03fc3d7e39..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/README.md
+++ /dev/null
@@ -1,346 +0,0 @@
-# PyTorch Profiler TensorBoard NPU Plugin
-
-### 介绍
-此工具是PyTorch profiling数据以及可视化的TensorBoard的插件。 \
-它支持将Ascend平台采集、解析的Pytorch Profiling数据可视化呈现,也兼容GPU数据采集、解析可视化,现已支持PyTorch 2.0GPU版本的profiling数据可视化。同时集成了精度比对的功能,支持查看loss曲线和比对两个网络的loss收敛趋势。
-
-### 快速安装说明
-* 相关依赖:
- pandas >= 1.0.0 ,tensorboard >= 2.11.0,protobuf <= 3.20.3
-* 安装方式
- 1. pip安装(推荐) \
- * 现本插件已经上传到pypi社区,用户可在python环境下直接通过以下pip指令进行安装:\
- `pip install torch-tb-profiler-ascend`
- * 也可在pypi社区上下载离线whl包,传输到无法访问公网的环境上离线安装使用。访问[下载链接](https://pypi.org/project/torch-tb-profiler-ascend/#files)选择whl包进行下载,之后便可使用指令安装(此处{version}为whl包实际版本)\
- `pip install torch-tb-profiler_ascend_{version}_py3_none_any.whl`
-
- 2. 从源代码安装
- * 从仓库下载源码:
-
- `git clone https://gitee.com/ascend/mstt.git`
-
- * 进入目录 `/plugins/tensorboard-plugins/tb_plugin` 下.
- * 编译前端代码
- ```
- cd fe
- # 此步骤为安装前端依赖
- yarn
- # 回到上层目录执行构建指令
- cd ..
- python setup.py build_fe
- ```
- **注意**: 编译前端步骤需要安装[Node.js](https://nodejs.org/zh-cn/download)和[yarn](https://yarn.bootcss.com/docs/install/index.html)环境
- * 执行安装命令可直接安装:
- - `pip install .`
- * 或: 构建whl包安装
- - `python setup.py build_fe sdist bdist_wheel`
-
- 在 `/tb_plugins/profiling/tb_plugin/dist` 目录下取出whl包,使用以下指令安装(此处{version}为whl包实际版本)
-
- `pip install torch-tb-profiler-ascend-{version}-py3-none-any.whl`
-
-### 解析数据说明
-
-* 准备profiling数据
-
- 需要在读取的目录下放置指定格式的profiling数据。格式为包含3个层级的目录结构:runs层级为最外层目录(我们将一个完整的Profiling数据视为一个runs进行可视化处理),其子目录为worker_span层级(命名格式为{worker}_{span}_ascend_pt,注:此处span为数字,代表时间戳 ),下一层级为规定命名的ASCEND_PROFILER_OUTPUT目录,此目录中包含此插件加载展示的数据文件,如trace_view.json、kernel_details.csv、operator_details.csv等。
- 目录结构如下:
-* E.g. there are 2 runs: run1, run2 \
- `run1` \
- `--[worker1]_[span1]_ascend_pt` \
- `----ASCEND_PROFILER_OUTPUT` \
- `------trace_view.json` \
- `------kernel_details.csv` \
- `--[worker2]_[span1]_ascend_pt` \
- `----ASCEND_PROFILER_OUTPUT` \
- `------trace_view.json` \
- `------operator_details.csv` \
- `run2` \
- `--[worker1]_[span1]_ascend_pt` \
- `----ASCEND_PROFILER_OUTPUT` \
- `------memory_record.csv` \
- `------operator_memory.csv`
-
-### 启动方式
-
-1. 启动TensorBoard
-
- `tensorboard --logdir=./samples`
-
- 如果网络浏览器与启动TensorBoard的机器不在同一台机器上,则需要在尾部加上`--bind_all`命令,如:
-
- `tensorboard --logdir=./samples --bind_all`
-
- 注意:确保默认端口6006对浏览器的主机打开。
-
- 如果需要切换端口号需要在尾部加上指定的端口号,如`--port=6007`
-
- `tensorboard --logdir=./samples --port=6007`
-
-2. 在浏览器上打开tensorboard
-
- 在浏览器中打开URL: `http://localhost:6006`。
- 如果tensorboard启动命令使用`--bind_all` , 主机名不是`localhost`,而是绑定的主机ip,可以在cmd之后打印的日志中查找。
-
- 注意:如果`--logdir` 指定目录下的文件太大或太多,请等候,刷新浏览器查看加载结果。
-
-### PyTorch Profiling
-#### 页面展示说明
-
- 页面加载完成后,左侧视图如图。每个Runs都对应于`--logdir`指定的文件夹下的一个子文件夹(三层目录中的第一层run1, run2等)。
- 每个子文件夹包含一个或多个profiling数据文件夹。
-
- 
-
- Runs: `--logdir`下包含三层目录的所有数据。
-
- Views: 展示数据分析的多个视图,包含Operator、NPU Kernel、Trace、Memory等多个view。
-
- Workers-Spans: 多线程的情况下Profiling可能包含多组数据,通过Workers和Spans下拉框来选择不同线程和不同时间采集的数据产生的结果。
-
-##### Operator View
-
- Operator View展示的是运行在host侧和device侧的Pytorch算子、计算算子的详细信息。
-
- 
-
- Calls: 表示的是运行过程中此算子被调用的次数。
-
- Input Shapes: shapes信息。
-
- Device Self Duration: 算子在device侧的耗时(除去子算子)。
-
- Device Total Duration: 算子在device侧的耗时。
-
- Host Self Duration: 算子在host侧的耗时(除去子算子)。
-
- Host Total Duration: 算子在host侧的耗时。
-
- AI Cores Eligible: 此算子是否在AICore上运行。
-
- AI Cores Self (%): 算子在AICore上的耗时(除去子算子) / Device Self Duration。
-
- AI Cores Total (%): 算子在AICore上的耗时 / Device Total Duration。
-
- CallStack: 此算子的所有调用堆栈信息。
-
- 说明: 由于一些算子之间存在父子关系(在trace上显示为包含关系),Self表示除去子算子的耗时,Total表示包含所有子算子的耗时。
-
- 
-
- 页面展示了四个饼图和两张表,通过界面的Group By切换表格和饼图。当切换为Operator时,表格以算子名称的维度进行展示,点击某个算子的View CallStack后,此算子会按照Call Stack分类展示算子信息。点击View call frames可以查看算子的调用信息。
- 当Group By切换为Operator + Input Shape时,算子以name和Input Shape为维度进行展示。
-
- 
-
-##### Kernel View
-
- Kernel View 展示算子在加速核上运行的详细信息。此视图包含两张饼图和两张表,可通过 Group By 切换表格数据:算子的详情表以及统计表。
-
- * 上方为饼图,展示耗时最多的数个算子耗时比例信息(左侧饼图)和算子执行在各类加速核上耗时百分比(右侧饼图)
-
- 
-
- * 选择 Group By 为 All 时,展示算子详情表,部分字段说明如下:
-
- | 字段名 | 说明 |
- | ---------------- | -------------------------------------- |
- | Step Id | 标识在哪个 Step 采集的数据 |
- | Name | 运行在 npu 上的算子名称 |
- | Type | 算子类型 |
- | Accelerator Core | AI 加速核类型,包括 AI Core、AI CPU 等 |
- | Start Time(us) | 算子执行开始时间 |
- | Duration(us) | 当前算子执行耗时 |
- | Wait Time(us) | 算子执行等待时间 |
- | Block Dim | 运行切分数量,对应任务执行时的核数 |
-
- 
-
- * 选择 Group By 为 Statistic 时,展示算子信息统计表,此表格展示各算子的执行统计信息,字段说明如下:
-
- | 字段名 | 说明 |
- | ---------------- | -------|
- | Name | 运行在 npu 上的算子名称 |
- | Calls | 算子执行次数 |
- | Total Duration(us) | 算子执行总时间 |
- | Min Duration(us) | 算子执行的最小时间 |
- | Max Duration(us) | 算子执行的最大时间 |
- | Avg Duration(us) | 算子执行平均时间 |
-
-##### Trace View
-
- 此视图显示使用chrome插件,展示在整个训练过程中的时序图。
-
- 
-
- Trace View主要包含三个层级以及层级下各个线程上执行的算子的时序排布。
-
- 
-
- 目前主要包括三个层级,PTA、CANN和Ascend Hardware。可以通过选择Processes来选择要展示的层级。
-
- 
-
- 选择只展示async_npu,可以查看框架侧算子与昇腾硬件上执行的算子的下发执行关系。
-
- 
-
- 
-
- Tips:通过键盘的'W/S'键可以以光标位置为中心放大/缩小当前区域,通过'A/D'可以左移/右移当前可视域。
-
-##### Memory View
-
- 展示的是Pytorch Profiler执行过程中内存申请和释放的信息。
- 主要包括两张折线图和两张表。可以在 'Device' 下拉框下选择要展示的NPU卡的内存使用信息。Group By可以切换总的内存使用和各个组件内存使用图表。
-
- * Operator
-
- 整个采集过程中,算子内存使用情况汇总。
-
- 
- 表格数据代表含义:
-
- * Name: 算子名称。
-
- * Size: 申请的内存大小。
-
- * Allocation Time: 内存申请时间。
-
- * Release Time: 内存释放时间。
-
- * Duration: 内存持有时间。
-
- * Component
-
- 折线图为算子级上报的PTA侧和GE侧的内存持有和实际使用信息,以及进程级内存申请的趋势变化。表格为组件级内存峰值信息表,展示各NPU组件的内存峰值以及达到峰值的时刻。
-
- 
- 表格数据代表含义:
-
- * Component: 组件名称。
-
- * Peak Memory Reserved: 组件内存持有峰值。
-
- * Time: 达到内存峰值的时刻(若存在多个相同峰值则取首次达到峰值时刻)。
-
-##### Diff View
-
- Diff视图提供了Profiling数据比对功能。适用于同一网络不同迭代之间采集数据比对算子耗时情况,网络进行优化前后相同位置算子耗时情况比对、单机多卡不同卡之间采集数据比对以及相同网络不同硬件平台上运行性能情况比对等场景。
- 
-
- * 最上方为整体比对,以采集的step为周期比较两份数据各类算子的耗时情况以及累计耗时变化趋势。点击其中某块柱形,可以单点查看对应详情。
-
- 
-
- * 中间视图为差异图,由红蓝两块区域构成。横坐标与上方视图对应,蓝色区域为每类算子的耗时差值,红色区域表示当前所有算子耗时差的累加值。
-
- * 最下方为算子比对明细表,显示相关差值以及相差比例信息。由于数据条目较多,支持选择是否显示Host Duration、Self Host Duration、Device Duration以及Self Device Duration相关比对信息。
- * Host Duration:算子在Host侧的累计耗时,包括子算子耗时。
- * Self Host Duration:算子在Host侧的累计耗时,不包括子算子耗时。
- * Device Duration:算子在Device侧的累计耗时,包括子算子耗时。
- * Self Device Duration:算子在Device侧的累计耗时,不包括子算子耗时。
-
-##### Distributed View
-
- Distributed视图展示的是多卡采集数据情况,包括每张卡的计算、通信信息以及通信算子的详细信息,界面由两张柱状图和一个通信算子信息表构成,如下图。
- 
-
- * 左侧柱状图呈现了每张卡计算和通信等项的耗时,各项定义如下:
-
- | 字段 | 含义 |
- |------|------|
- | Computation | 计算时间:在NPU上的计算时间减去和通信重叠的时间。|
- | Communication | 通信时间:总通讯时间减去和计算重叠的时间。|
- | Overlapp | 重叠时间:计算和通信重叠的时间。此项占比越大代表计算和通信的并行性越好,理想情况下计算和通信完全重叠。|
- | Other | 除去计算和通信的其他部分耗时,包括初始化、数据加载等。|
-
- * 右侧柱状图将通信时间分为数据传输时间和同步时间进行统计,定义如下:
-
- | 字段 | 含义 |
- |------|------|
- | Data Transfer Time | 通信时间中实际的数据传输时间。 |
- | Synchronizing Time | 通信时间中等待以及和其他卡同步的时间。 |
-
- * 界面下方为通信算子信息表,统计了各张卡的通信算子详情。
-
- | 字段 | 含义 |
- |------|------|
- | Name | 通信算子名称 |
- | Calls | 调用次数。 |
- | Total Transit Size(bytes) | 传输的总数据大小。 |
- | Avg Transit Size(bytes) | 平均每次传输的数据大小。 |
- | Elapse Time(us) | 此类算子总耗时。 |
- | Avg Elapse Time(us) | 单个算子平均耗时。 |
- | Transit Time(us) | 此类算子传输总耗时。 |
- | Avg Transit Time(us) | 单个算子平均传输耗时。 |
-
-### Loss Comparison
-#### 工具介绍
-
- Loss Comparison是集成在该插件上的精度比对工具,提供了对loss曲线的可视化,loss数据匹配导出csv,以及两份数据比对等功能。
-
-#### 页面展示说明
- 切换顶部页签栏至ACCURACY页签,即可进入精度比对工具页面。
-
-##### 文件配置
-###### 文件导入
- 界面分为左侧边栏和右侧展示界面。点击左侧的Import Files或在左侧未勾选文件时点击右侧界面中心的Import Files字体,将会弹出系统文件资源管理窗,可以上传需要比对的模型网络训练日志文件。
-
- **注:当前最多支持上传6个文件,单个文件大小不能超过50MB。**
- 
-
-###### 已上传文件操作
- 文件上传后,在左侧侧边栏出现文件列表。每个文件栏内都有配置数据匹配条件、导出CSV以及删除三种操作图标。
-
- 
-
- * 点击配置数据匹配条件图标后,出现匹配条件配置弹框,需要设置Loss Tag和Iteration Tag两个配置项,弹框内每个Tag都包含一个输入框。
- 
- 根据2个Tag的取值有如下3点匹配规则:
- 1. 匹配数据时将逐行读取文件,查找是否存在输入框内设定的文本,若找到该文本,若为Loss Tag则查找其后是否存在数字或以科学计数法表示的数字(忽略两者中间空格),若为Iteration Tag则查找其后是否存在整数(忽略两者中间空格)。
- 2. 若存在多个匹配项,将第一项作为匹配值。
- 3. 只有当Loss Tag和Iteration都存在匹配值时,该行的Iteration和Loss才会为有效数据。
-
- E.g.
-
- 
-
- 对于以上这份txt文件,当设定Loss Tag为`loss:`以及Iteration Tag为`iteration`时:
- * 根据上方第1点规则,Iteration Tag可匹配图中区域1内的整数,但无法匹配区域3内的整数,因为`iteration`和整数中间多了非数字字符`:`。
- * Loss Tag可匹配图中区域2和4内的数字,但区域2内为第一项匹配值,根据上方第2点规则,因此只取区域2内数字。
- * Loss Tag在图中区域5内有匹配数据,Iteration Tag在图中区域6内有匹配数据,但由于Iteration Tag在区域5内没有匹配数据,Loss Tag在图中区域6内没有匹配数据,根据上方第3点规则,区域5和区域6内不存在有效数据。
-
- 因此上方这张图中最终提取出的有效数据为区域1和区域2内的同一行数字的集合。
-
- * 点击导出CSV图标后,将导出找到的Iteration和Loss数据为csv文件。 \
- 
-
- * 点击删除图标后,界面弹出确认删除框,确认后可移除该文件。
- 
-
-##### Loss数据看板
- 已上传文件后,可在左侧侧边栏勾选该文件,右侧则会展示该文件的Loss数据看板,包含loss折线图和明细表格。
-
- * 勾选单个文件时,Loss数据看板将会占满整个右侧展示界面。
- 
-
- * 勾选两个以上文件时,右侧将会展示Loss数据看板和Loss比对看板。
- 
-
- * Loss数据看板为全量展示,折线图内展示的是所有勾选文件的所有数据,表格内展示的同样为勾选文件的全量数据,若表格内iteration为某些文件独有,则其他文件该行显示为`NA`。
-
-##### Loss比对看板
- 当勾选文件为2个以上时,将展示Loss比对看板,Loss比对看板基于iteration取两份比对数据的交集进行展示。
-
- * 在Comparison objects中选择两个文件,则展示该两个文件的比对信息。
- 
-
- * 比对方式有三种,通过Comparison Setting进行设定。
- * Comparison Normal:相同iteration,后选择文件的loss值减去先选择文件的loss值。
- * Comparison Absolute:相同iteration,两个文件的loss的差值的绝对值。
- * Comparison Relative:相同iteration,两个文件的loss的差值的绝对值 / 先选择文件的loss值。
-
-### 公网URL说明
-
-[公网URL说明](./docs/公网URL说明.xlsx)
\ No newline at end of file
diff --git a/plugins/tensorboard-plugins/tb_plugin/ci_scripts/install_env.sh b/plugins/tensorboard-plugins/tb_plugin/ci_scripts/install_env.sh
deleted file mode 100644
index 04406ae6e495fbe715c3d8cce54f7a16ee6c3992..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/ci_scripts/install_env.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/bash
-
-set -ex
-
-# install pytorch
-pip install numpy tensorboard typing-extensions pillow pytest
-if [ "$PYTORCH_VERSION" = "nightly" ]; then
- pip install --pre torch -f "https://download.pytorch.org/whl/nightly/$CUDA_VERSION/torch_nightly.html"
- pip install --pre torchvision --no-deps -f "https://download.pytorch.org/whl/nightly/$CUDA_VERSION/torch_nightly.html"
-elif [ "$PYTORCH_VERSION" = "1.11rc" ]; then
- pip install --pre torch -f "https://download.pytorch.org/whl/test/$CUDA_VERSION/torch_test.html"
- pip install --pre torchvision --no-deps -f "https://download.pytorch.org/whl/test/$CUDA_VERSION/torch_test.html"
-elif [ "$PYTORCH_VERSION" = "stable" ]; then
- pip install torch torchvision
-fi
-
-python -c "import torch; print(torch.__version__, torch.version.git_version); from torch.autograd import kineto_available; print(kineto_available())"
diff --git a/plugins/tensorboard-plugins/tb_plugin/docs/gpu_utilization.md b/plugins/tensorboard-plugins/tb_plugin/docs/gpu_utilization.md
deleted file mode 100644
index c4f45b880c71fd25f3d2d727408390e4751b72da..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/docs/gpu_utilization.md
+++ /dev/null
@@ -1,22 +0,0 @@
-* GPU Utilization: GPU busy time / all steps time. The higher, the better. All steps time is the total time of all profiler steps(or called as iterations).
- GPU busy time is the time during “all steps time” when is at least one GPU kernel running on this GPU.
- However, this high-level utilization metric is coarse. It can’t tell how many SMs(Stream Multiprocessors) are in use.
- For example, a kernel with a single thread running continuously will get 100% GPU utilization.
-
-* Est. SM Efficiency: Estimated Stream Multiprocessor Efficiency. The higher, the better. This metric of a kernel, SM_Eff_K = min(blocks of this kernel / SM number of this GPU, 100%).
- This overall number is the sum of all kernels' SM_Eff_K weighted by kernel's execution duration, divided by “all steps time”.
- It shows GPU Stream Multiprocessors’ utilization.
- Although it is finer grained than above “GPU Utilization”, it still can’t tell the whole story.
- For example, a kernel with only one thread per block can’t fully utilize each SM.
-
-* Est. Achieved Occupancy: For most cases such as memory bandwidth bound kernels, a higher value often translates to better performance, especially when the initial value is very low. [Reference](http://developer.download.nvidia.com/GTC/PDF/GTC2012/PresentationPDF/S0514-GTC2012-GPU-Performance-Analysis.pdf). The definition of occupancy is [here](https://docs.nvidia.com/gameworks/content/developertools/desktop/analysis/report/cudaexperiments/kernellevel/achievedoccupancy.htm).
- Occupancy is the ratio of active warps on an SM to the maximum number of
- active warps supported by the SM. The theoretical occupancy of a kernel is upper limit occupancy of this kernel, limited by multiple
- factors such as kernel shape, kernel used resource, and the GPU compute capability.
- Est. Achieved Occupancy of a kernel, OCC_K = min(threads of the kernel / SM number / max threads per SM, theoretical occupancy of the kernel).
- This overall number is the weighted sum of all kernels OCC_K using kernel's execution duration as weight. It shows fine-grained low-level GPU utilization.
-
- * Kernel Time using Tensor Cores: Total GPU Time for Tensor Core kernels / Total GPU Time for all kernels. Higher is better.
- Tensor Cores are mixed precision floating point operations available for Volta GPUs (Titan V) and beyond.
- The cuDNN and cuBLAS libraries contain several Tensor Cores enabled GPU kernels for most Convolution and GEMM operations.
- This number shows Tensor Cores usage time ratio among all kernels on a GPU.
diff --git a/plugins/tensorboard-plugins/tb_plugin/docs/images/accuracy.PNG b/plugins/tensorboard-plugins/tb_plugin/docs/images/accuracy.PNG
deleted file mode 100644
index a2f5fb486beea241d39c016bdf59f98e9475560b..0000000000000000000000000000000000000000
Binary files a/plugins/tensorboard-plugins/tb_plugin/docs/images/accuracy.PNG and /dev/null differ
diff --git a/plugins/tensorboard-plugins/tb_plugin/docs/images/accuracy_config_modal.PNG b/plugins/tensorboard-plugins/tb_plugin/docs/images/accuracy_config_modal.PNG
deleted file mode 100644
index 5a4006ad33cb66d8892c2e3e3c183eb1da20eeab..0000000000000000000000000000000000000000
Binary files a/plugins/tensorboard-plugins/tb_plugin/docs/images/accuracy_config_modal.PNG and /dev/null differ
diff --git a/plugins/tensorboard-plugins/tb_plugin/docs/images/accuracy_csv.PNG b/plugins/tensorboard-plugins/tb_plugin/docs/images/accuracy_csv.PNG
deleted file mode 100644
index 8581c592d5fa644d672f4ee4728f1be412f0ab6a..0000000000000000000000000000000000000000
Binary files a/plugins/tensorboard-plugins/tb_plugin/docs/images/accuracy_csv.PNG and /dev/null differ
diff --git a/plugins/tensorboard-plugins/tb_plugin/docs/images/accuracy_delete.PNG b/plugins/tensorboard-plugins/tb_plugin/docs/images/accuracy_delete.PNG
deleted file mode 100644
index f8720e7a687980535c085317476653d9b5589ead..0000000000000000000000000000000000000000
Binary files a/plugins/tensorboard-plugins/tb_plugin/docs/images/accuracy_delete.PNG and /dev/null differ
diff --git a/plugins/tensorboard-plugins/tb_plugin/docs/images/accuracy_file.PNG b/plugins/tensorboard-plugins/tb_plugin/docs/images/accuracy_file.PNG
deleted file mode 100644
index 063f876d97e4e4d8c288e7cccc310cc8b6e21268..0000000000000000000000000000000000000000
Binary files a/plugins/tensorboard-plugins/tb_plugin/docs/images/accuracy_file.PNG and /dev/null differ
diff --git a/plugins/tensorboard-plugins/tb_plugin/docs/images/accuracy_file_operator.PNG b/plugins/tensorboard-plugins/tb_plugin/docs/images/accuracy_file_operator.PNG
deleted file mode 100644
index ff923095d40986c53976cc6d327969d504d303bb..0000000000000000000000000000000000000000
Binary files a/plugins/tensorboard-plugins/tb_plugin/docs/images/accuracy_file_operator.PNG and /dev/null differ
diff --git a/plugins/tensorboard-plugins/tb_plugin/docs/images/accuracy_loss_chart.PNG b/plugins/tensorboard-plugins/tb_plugin/docs/images/accuracy_loss_chart.PNG
deleted file mode 100644
index f98b8e48444ba74b0a80ef1793a554c6cd229e55..0000000000000000000000000000000000000000
Binary files a/plugins/tensorboard-plugins/tb_plugin/docs/images/accuracy_loss_chart.PNG and /dev/null differ
diff --git a/plugins/tensorboard-plugins/tb_plugin/docs/images/accuracy_loss_comparison.png b/plugins/tensorboard-plugins/tb_plugin/docs/images/accuracy_loss_comparison.png
deleted file mode 100644
index a7d6b86548ba7e1ed8401299125d7fefcf0ebbe1..0000000000000000000000000000000000000000
Binary files a/plugins/tensorboard-plugins/tb_plugin/docs/images/accuracy_loss_comparison.png and /dev/null differ
diff --git a/plugins/tensorboard-plugins/tb_plugin/docs/images/accuracy_multiple_files.PNG b/plugins/tensorboard-plugins/tb_plugin/docs/images/accuracy_multiple_files.PNG
deleted file mode 100644
index 3df173a73c5bc92fa49ef5d86b70629ee8384cca..0000000000000000000000000000000000000000
Binary files a/plugins/tensorboard-plugins/tb_plugin/docs/images/accuracy_multiple_files.PNG and /dev/null differ
diff --git a/plugins/tensorboard-plugins/tb_plugin/docs/images/accuracy_single_file.PNG b/plugins/tensorboard-plugins/tb_plugin/docs/images/accuracy_single_file.PNG
deleted file mode 100644
index 6f2ab6c7b8cb4ff8fb5689a980f63474390cd8cb..0000000000000000000000000000000000000000
Binary files a/plugins/tensorboard-plugins/tb_plugin/docs/images/accuracy_single_file.PNG and /dev/null differ
diff --git a/plugins/tensorboard-plugins/tb_plugin/docs/images/control_panel.PNG b/plugins/tensorboard-plugins/tb_plugin/docs/images/control_panel.PNG
deleted file mode 100644
index bf101db7088d52a209fea2424d7da6cfe305aeab..0000000000000000000000000000000000000000
Binary files a/plugins/tensorboard-plugins/tb_plugin/docs/images/control_panel.PNG and /dev/null differ
diff --git a/plugins/tensorboard-plugins/tb_plugin/docs/images/diff_detail.png b/plugins/tensorboard-plugins/tb_plugin/docs/images/diff_detail.png
deleted file mode 100644
index 60ca175c121261bc28d8a9843c3fd7202c0d4734..0000000000000000000000000000000000000000
Binary files a/plugins/tensorboard-plugins/tb_plugin/docs/images/diff_detail.png and /dev/null differ
diff --git a/plugins/tensorboard-plugins/tb_plugin/docs/images/diff_view.png b/plugins/tensorboard-plugins/tb_plugin/docs/images/diff_view.png
deleted file mode 100644
index bceb77afb2aad1c3757bba25d90c2c7302f43b40..0000000000000000000000000000000000000000
Binary files a/plugins/tensorboard-plugins/tb_plugin/docs/images/diff_view.png and /dev/null differ
diff --git a/plugins/tensorboard-plugins/tb_plugin/docs/images/distributed_view.PNG b/plugins/tensorboard-plugins/tb_plugin/docs/images/distributed_view.PNG
deleted file mode 100644
index bdc60d2d61de8d84c8ead341171b195630eda412..0000000000000000000000000000000000000000
Binary files a/plugins/tensorboard-plugins/tb_plugin/docs/images/distributed_view.PNG and /dev/null differ
diff --git a/plugins/tensorboard-plugins/tb_plugin/docs/images/kernel_view.PNG b/plugins/tensorboard-plugins/tb_plugin/docs/images/kernel_view.PNG
deleted file mode 100644
index 8ba95c165d667158eeec109a757b492b8541671e..0000000000000000000000000000000000000000
Binary files a/plugins/tensorboard-plugins/tb_plugin/docs/images/kernel_view.PNG and /dev/null differ
diff --git a/plugins/tensorboard-plugins/tb_plugin/docs/images/kernel_view_group_by_properties_and_op.PNG b/plugins/tensorboard-plugins/tb_plugin/docs/images/kernel_view_group_by_properties_and_op.PNG
deleted file mode 100644
index 5001f28c75a1257689758a15553c9594cd86edd7..0000000000000000000000000000000000000000
Binary files a/plugins/tensorboard-plugins/tb_plugin/docs/images/kernel_view_group_by_properties_and_op.PNG and /dev/null differ
diff --git a/plugins/tensorboard-plugins/tb_plugin/docs/images/kernel_view_group_by_statistic.PNG b/plugins/tensorboard-plugins/tb_plugin/docs/images/kernel_view_group_by_statistic.PNG
deleted file mode 100644
index 04e269b17ca0b442c56e9d84c96203293ccfb766..0000000000000000000000000000000000000000
Binary files a/plugins/tensorboard-plugins/tb_plugin/docs/images/kernel_view_group_by_statistic.PNG and /dev/null differ
diff --git a/plugins/tensorboard-plugins/tb_plugin/docs/images/lightning_view.png b/plugins/tensorboard-plugins/tb_plugin/docs/images/lightning_view.png
deleted file mode 100644
index 03a5004f16bf188755640b9de2fce5545af7940f..0000000000000000000000000000000000000000
Binary files a/plugins/tensorboard-plugins/tb_plugin/docs/images/lightning_view.png and /dev/null differ
diff --git a/plugins/tensorboard-plugins/tb_plugin/docs/images/memory_view.PNG b/plugins/tensorboard-plugins/tb_plugin/docs/images/memory_view.PNG
deleted file mode 100644
index b89d59e7e7b6a3a60d8d7a30b22babde416c8461..0000000000000000000000000000000000000000
Binary files a/plugins/tensorboard-plugins/tb_plugin/docs/images/memory_view.PNG and /dev/null differ
diff --git a/plugins/tensorboard-plugins/tb_plugin/docs/images/memory_view_component.PNG b/plugins/tensorboard-plugins/tb_plugin/docs/images/memory_view_component.PNG
deleted file mode 100644
index e4c9e27ad8969f330a3dfeb2b73809dc8989181b..0000000000000000000000000000000000000000
Binary files a/plugins/tensorboard-plugins/tb_plugin/docs/images/memory_view_component.PNG and /dev/null differ
diff --git a/plugins/tensorboard-plugins/tb_plugin/docs/images/module_view.png b/plugins/tensorboard-plugins/tb_plugin/docs/images/module_view.png
deleted file mode 100644
index 610cf202a3bc6154c79085fe9f6ab12c79c2151a..0000000000000000000000000000000000000000
Binary files a/plugins/tensorboard-plugins/tb_plugin/docs/images/module_view.png and /dev/null differ
diff --git a/plugins/tensorboard-plugins/tb_plugin/docs/images/operator_view.PNG b/plugins/tensorboard-plugins/tb_plugin/docs/images/operator_view.PNG
deleted file mode 100644
index 5dbc7d26ab1d69c0d0260ec7a72c9841bca2a229..0000000000000000000000000000000000000000
Binary files a/plugins/tensorboard-plugins/tb_plugin/docs/images/operator_view.PNG and /dev/null differ
diff --git a/plugins/tensorboard-plugins/tb_plugin/docs/images/operator_view_group_by_inputshape.PNG b/plugins/tensorboard-plugins/tb_plugin/docs/images/operator_view_group_by_inputshape.PNG
deleted file mode 100644
index 68b4784f1a54497219c32bcdaa0128adde5f5163..0000000000000000000000000000000000000000
Binary files a/plugins/tensorboard-plugins/tb_plugin/docs/images/operator_view_group_by_inputshape.PNG and /dev/null differ
diff --git a/plugins/tensorboard-plugins/tb_plugin/docs/images/overall_view.PNG b/plugins/tensorboard-plugins/tb_plugin/docs/images/overall_view.PNG
deleted file mode 100644
index 916be90c0674f8fba5ac36d0c6e07cfd258f49e5..0000000000000000000000000000000000000000
Binary files a/plugins/tensorboard-plugins/tb_plugin/docs/images/overall_view.PNG and /dev/null differ
diff --git a/plugins/tensorboard-plugins/tb_plugin/docs/images/time_breakdown_priority.PNG b/plugins/tensorboard-plugins/tb_plugin/docs/images/time_breakdown_priority.PNG
deleted file mode 100644
index c8574772786b2e38f52793c51e96fee8e9299aa7..0000000000000000000000000000000000000000
Binary files a/plugins/tensorboard-plugins/tb_plugin/docs/images/time_breakdown_priority.PNG and /dev/null differ
diff --git a/plugins/tensorboard-plugins/tb_plugin/docs/images/trace_view.PNG b/plugins/tensorboard-plugins/tb_plugin/docs/images/trace_view.PNG
deleted file mode 100644
index 975cec55df98669dd573629ee680e9f1645dbdde..0000000000000000000000000000000000000000
Binary files a/plugins/tensorboard-plugins/tb_plugin/docs/images/trace_view.PNG and /dev/null differ
diff --git a/plugins/tensorboard-plugins/tb_plugin/docs/images/trace_view_fwd_bwd_correlation.PNG b/plugins/tensorboard-plugins/tb_plugin/docs/images/trace_view_fwd_bwd_correlation.PNG
deleted file mode 100644
index 57fa003cae6f5759dd42c871563ef53c45f73988..0000000000000000000000000000000000000000
Binary files a/plugins/tensorboard-plugins/tb_plugin/docs/images/trace_view_fwd_bwd_correlation.PNG and /dev/null differ
diff --git a/plugins/tensorboard-plugins/tb_plugin/docs/images/trace_view_launch.PNG b/plugins/tensorboard-plugins/tb_plugin/docs/images/trace_view_launch.PNG
deleted file mode 100644
index a381dd17b63b059dddb4db8138fc997d4032fa87..0000000000000000000000000000000000000000
Binary files a/plugins/tensorboard-plugins/tb_plugin/docs/images/trace_view_launch.PNG and /dev/null differ
diff --git a/plugins/tensorboard-plugins/tb_plugin/docs/images/trace_view_npu_utilization.PNG b/plugins/tensorboard-plugins/tb_plugin/docs/images/trace_view_npu_utilization.PNG
deleted file mode 100644
index 4a542138f84ce106425c1cfa7afeabd9e810bf4f..0000000000000000000000000000000000000000
Binary files a/plugins/tensorboard-plugins/tb_plugin/docs/images/trace_view_npu_utilization.PNG and /dev/null differ
diff --git a/plugins/tensorboard-plugins/tb_plugin/docs/images/trace_view_one_step.PNG b/plugins/tensorboard-plugins/tb_plugin/docs/images/trace_view_one_step.PNG
deleted file mode 100644
index 687af618899884c5f2f666fa67e66dcabd67e25f..0000000000000000000000000000000000000000
Binary files a/plugins/tensorboard-plugins/tb_plugin/docs/images/trace_view_one_step.PNG and /dev/null differ
diff --git a/plugins/tensorboard-plugins/tb_plugin/docs/images/vscode_stack.PNG b/plugins/tensorboard-plugins/tb_plugin/docs/images/vscode_stack.PNG
deleted file mode 100644
index a109c97a1aaf0011c817e07c0ecb3224fae986f6..0000000000000000000000000000000000000000
Binary files a/plugins/tensorboard-plugins/tb_plugin/docs/images/vscode_stack.PNG and /dev/null differ
diff --git "a/plugins/tensorboard-plugins/tb_plugin/docs/\345\205\254\347\275\221URL\350\257\264\346\230\216.xlsx" "b/plugins/tensorboard-plugins/tb_plugin/docs/\345\205\254\347\275\221URL\350\257\264\346\230\216.xlsx"
deleted file mode 100644
index de0bb25fe155aa188e5670a377311e96168586e8..0000000000000000000000000000000000000000
Binary files "a/plugins/tensorboard-plugins/tb_plugin/docs/\345\205\254\347\275\221URL\350\257\264\346\230\216.xlsx" and /dev/null differ
diff --git a/plugins/tensorboard-plugins/tb_plugin/examples/datapipe_example.py b/plugins/tensorboard-plugins/tb_plugin/examples/datapipe_example.py
deleted file mode 100644
index a6eac79b9d993decb3ecea7aa90b1b1fecf8d228..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/examples/datapipe_example.py
+++ /dev/null
@@ -1,50 +0,0 @@
-import torch
-import torch.nn as nn
-import torch.optim
-from torch.utils.data.dataloader_experimental import DataLoader2
-
-from torchvision import transforms as T
-import torchvision.prototype.datasets as pdatasets
-import torchvision.prototype.models as models
-from torchvision.prototype.datasets._builtin import Cifar10
-
-
-if __name__ == "__main__":
- model = models.resnet50(models.ResNet50_Weights.ImageNet1K_V1)
- trainset = Cifar10().to_datapipe(root='./data', decoder=pdatasets.decoder.raw)
- transform = T.Compose([T.Resize(256), T.CenterCrop(224)])
- trainset = trainset.map(transform, input_col="image")
- trainset = trainset.map(fn=T.functional.convert_image_dtype, input_col="image")
- dl = DataLoader2(trainset, batch_size=64)
- criterion = nn.CrossEntropyLoss().cuda(0)
- optimizer = torch.optim.SGD(model.parameters(), lr=0.001, momentum=0.9)
- device = torch.device("cuda:0")
- model.to(device=device).train()
-
- with torch.profiler.profile(
- activities=[
- torch.profiler.ProfilerActivity.CPU,
- torch.profiler.ProfilerActivity.CUDA],
- schedule=torch.profiler.schedule(
- wait=1,
- warmup=1,
- active=2),
- on_trace_ready=torch.profiler.tensorboard_trace_handler('./result', worker_name='datapipe0'),
- record_shapes=True,
- profile_memory=True, # This will take 1 to 2 minutes. Setting it to False could greatly speedup.
- with_stack=True
- ) as p:
- for step, data in enumerate(dl, 0):
- print("step:{}".format(step))
- input_tensors = data['image']
- label_tensors = data['label']
- inputs, labels = input_tensors.to(device=device), label_tensors.to(device=device)
- outputs = model(inputs)
- loss = criterion(outputs, labels)
- optimizer.zero_grad()
- loss.backward()
- optimizer.step()
- if step + 1 >= 4:
- break
- p.step()
- print("done")
diff --git a/plugins/tensorboard-plugins/tb_plugin/examples/resnet50_autograd_api.py b/plugins/tensorboard-plugins/tb_plugin/examples/resnet50_autograd_api.py
deleted file mode 100644
index 9ff5d89aaaab1dc2802c9be16e7f75a37bc2f803..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/examples/resnet50_autograd_api.py
+++ /dev/null
@@ -1,46 +0,0 @@
-import os
-import torch
-import torch.nn as nn
-import torch.backends.cudnn as cudnn
-import torch.optim
-import torch.utils.data
-import torchvision
-import torchvision.transforms as T
-import torchvision.models as models
-
-from torch.autograd.profiler import profile
-
-model = models.resnet50(pretrained=True)
-model.cuda()
-cudnn.benchmark = True
-
-transform = T.Compose([T.Resize(256), T.CenterCrop(224), T.ToTensor()])
-trainset = torchvision.datasets.CIFAR10(root='./data', train=True,
- download=True, transform=transform)
-trainloader = torch.utils.data.DataLoader(trainset, batch_size=32,
- shuffle=True, num_workers=0)
-
-criterion = nn.CrossEntropyLoss().cuda()
-optimizer = torch.optim.SGD(model.parameters(), lr=0.001, momentum=0.9)
-device = torch.device("cuda:0")
-model.train()
-
-with profile(use_cuda=True, use_kineto=True, record_shapes=True) as p:
- for step, data in enumerate(trainloader, 0):
- print("step:{}".format(step))
- inputs, labels = data[0].to(device=device), data[1].to(device=device)
-
- outputs = model(inputs)
- loss = criterion(outputs, labels)
-
- optimizer.zero_grad()
- loss.backward()
- optimizer.step()
- if step >= 5:
- break
-
-try:
- os.mkdir("result")
-except Exception:
- pass
-p.export_chrome_trace("./result/worker0.pt.trace.json")
diff --git a/plugins/tensorboard-plugins/tb_plugin/examples/resnet50_ddp_profiler.py b/plugins/tensorboard-plugins/tb_plugin/examples/resnet50_ddp_profiler.py
deleted file mode 100644
index 0ebcfe989e8261026da74cf0d83189b715182fba..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/examples/resnet50_ddp_profiler.py
+++ /dev/null
@@ -1,95 +0,0 @@
-import os
-
-import torch
-import torch.backends.cudnn as cudnn
-import torch.distributed as dist
-import torch.multiprocessing as mp
-import torch.nn as nn
-import torch.optim
-import torch.profiler
-import torch.utils.data
-import torchvision
-import torchvision.models as models
-import torchvision.transforms as T
-from torch.nn.parallel import DistributedDataParallel as DDP
-
-
-def example(rank, use_gpu=True):
- if use_gpu:
- torch.cuda.set_device(rank)
- model = models.resnet50(pretrained=True).to(rank)
- model.cuda()
- cudnn.benchmark = True
- model = DDP(model, device_ids=[rank])
- else:
- model = models.resnet50(pretrained=True)
- model = DDP(model)
-
- # Use gradient compression to reduce communication
- # model.register_comm_hook(None, default.fp16_compress_hook)
- # or
- # state = powerSGD_hook.PowerSGDState(process_group=None,matrix_approximation_rank=1,start_powerSGD_iter=2)
- # model.register_comm_hook(state, powerSGD_hook.powerSGD_hook)
-
- transform = T.Compose([T.Resize(256), T.CenterCrop(224), T.ToTensor()])
- trainset = torchvision.datasets.CIFAR10(root='./data', train=True,
- download=True, transform=transform)
- train_sampler = torch.utils.data.distributed.DistributedSampler(trainset)
- trainloader = torch.utils.data.DataLoader(trainset, batch_size=32, sampler=train_sampler,
- shuffle=False, num_workers=4)
-
- if use_gpu:
- criterion = nn.CrossEntropyLoss().to(rank)
- else:
- criterion = nn.CrossEntropyLoss()
- optimizer = torch.optim.SGD(model.parameters(), lr=0.001, momentum=0.9)
- model.train()
-
- with torch.profiler.profile(
- activities=[
- torch.profiler.ProfilerActivity.CPU,
- torch.profiler.ProfilerActivity.CUDA],
- schedule=torch.profiler.schedule(
- wait=2,
- warmup=2,
- active=5),
- with_stack=False,
- on_trace_ready=torch.profiler.tensorboard_trace_handler('./result'),
- record_shapes=True
- ) as p:
- for step, data in enumerate(trainloader, 0):
- print("step:{}".format(step))
- if use_gpu:
- inputs, labels = data[0].to(rank), data[1].to(rank)
- else:
- inputs, labels = data[0], data[1]
- outputs = model(inputs)
- loss = criterion(outputs, labels)
-
- optimizer.zero_grad()
- loss.backward()
- optimizer.step()
- p.step()
- if step + 1 >= 10:
- break
-
-
-def init_process(rank, size, fn, backend='nccl'):
- """ Initialize the distributed environment. """
- os.environ['MASTER_ADDR'] = '127.0.0.1'
- os.environ['MASTER_PORT'] = '29500'
- dist.init_process_group(backend, rank=rank, world_size=size)
- fn(rank, size)
-
-
-if __name__ == "__main__":
- size = 4
- processes = []
- mp.set_start_method("spawn")
- for rank in range(size):
- p = mp.Process(target=init_process, args=(rank, size, example))
- p.start()
- processes.append(p)
-
- for p in processes:
- p.join()
diff --git a/plugins/tensorboard-plugins/tb_plugin/examples/resnet50_profiler_api.py b/plugins/tensorboard-plugins/tb_plugin/examples/resnet50_profiler_api.py
deleted file mode 100644
index cdfa14aa77e1b82101a2083acff86c9e8de2890d..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/examples/resnet50_profiler_api.py
+++ /dev/null
@@ -1,52 +0,0 @@
-import torch
-import torch.nn as nn
-import torch.backends.cudnn as cudnn
-import torch.optim
-import torch.utils.data
-import torchvision
-import torchvision.transforms as T
-import torchvision.models as models
-
-import torch.profiler
-
-model = models.resnet50(pretrained=True)
-model.cuda()
-cudnn.benchmark = True
-
-transform = T.Compose([T.Resize(256), T.CenterCrop(224), T.ToTensor()])
-trainset = torchvision.datasets.CIFAR10(root='./data', train=True,
- download=True, transform=transform)
-trainloader = torch.utils.data.DataLoader(trainset, batch_size=32,
- shuffle=True, num_workers=4)
-
-criterion = nn.CrossEntropyLoss().cuda()
-optimizer = torch.optim.SGD(model.parameters(), lr=0.001, momentum=0.9)
-device = torch.device("cuda:0")
-model.train()
-
-with torch.profiler.profile(
- activities=[
- torch.profiler.ProfilerActivity.CPU,
- torch.profiler.ProfilerActivity.CUDA],
- schedule=torch.profiler.schedule(
- wait=1,
- warmup=1,
- active=2),
- on_trace_ready=torch.profiler.tensorboard_trace_handler('./result', worker_name='worker0'),
- record_shapes=True,
- profile_memory=True, # This will take 1 to 2 minutes. Setting it to False could greatly speedup.
- with_stack=True
-) as p:
- for step, data in enumerate(trainloader, 0):
- print("step:{}".format(step))
- inputs, labels = data[0].to(device=device), data[1].to(device=device)
-
- outputs = model(inputs)
- loss = criterion(outputs, labels)
-
- optimizer.zero_grad()
- loss.backward()
- optimizer.step()
- if step + 1 >= 4:
- break
- p.step()
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/.gitignore b/plugins/tensorboard-plugins/tb_plugin/fe/.gitignore
deleted file mode 100644
index e6a92696825082a8ff08815b553822cf7a4c4c8e..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-/dist
-/node_modules
-*.log
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/README.md b/plugins/tensorboard-plugins/tb_plugin/fe/README.md
deleted file mode 100644
index aa9cf2587780da8cd911a88c10f763516fc8867f..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/README.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# Pytorch Profiler
-
-### Install & Build
-
-1. install [Node.js](https://nodejs.org/)
- * ```bash
- curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
- sudo apt-get install -y nodejs```
-2. install [Yarn](https://yarnpkg.com/)
- * ```bash
- curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
- echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
- sudo apt update && sudo apt install yarn
- ```
-3. shell `yarn` to prepare JS dependency
-4. shell `yarn build:copy`
-5. Go to `tb_plugin` folder and install the package using `python setup.py develop`
-6. Launch tensorboard
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/index.html b/plugins/tensorboard-plugins/tb_plugin/fe/index.html
deleted file mode 100644
index a58ddc088336085b78597616844ebb131f49ad51..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/index.html
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/package.json b/plugins/tensorboard-plugins/tb_plugin/fe/package.json
deleted file mode 100644
index 5edca28fa780b15afbb9c8e286ba4176a79d83f4..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/package.json
+++ /dev/null
@@ -1,47 +0,0 @@
-{
- "name": "fe",
- "private": "true",
- "version": "1.0.0",
- "main": "index.js",
- "scripts": {
- "build": "cross-env NODE_ENV=production webpack",
- "build:copy": "yarn build && node ./update-static.js",
- "build:dev": "webpack",
- "dev": "webpack serve",
- "prettier": "prettier --config ./prettier.json --write ./src/**/*.{ts,tsx} ./*.js"
- },
- "dependencies": {
- "@ant-design/icons": "^5.2.6",
- "@babel/runtime": "^7.13.10",
- "@material-ui/core": "^4.11.3",
- "@material-ui/icons": "^4.11.2",
- "antd": "^4.23.0",
- "clsx": "^1.1.1",
- "echarts": "^5.4.2",
- "portable-fetch": "^3.0.0",
- "react": "^16.13.1",
- "react-dom": "^16.13.1",
- "react-flame-graph": "^1.4.0",
- "url": "^0.11.1"
- },
- "devDependencies": {
- "@types/react": "^17.0.69",
- "@types/react-dom": "^18.2.14",
- "cross-env": "^7.0.2",
- "css-loader": "^5.2.4",
- "html-webpack-plugin": "^5.3.1",
- "inline-chunk-html-plugin": "^1.1.1",
- "prettier": "^2.1.2",
- "style-loader": "^2.0.0",
- "ts-loader": "^8.0.18",
- "typescript": "^4.0.3",
- "webpack": "^5.28.0",
- "webpack-cli": "^4.5.0",
- "webpack-dev-server": "^4.7.4"
- },
- "resolutions": {
- "portable-fetch/**/node-fetch": "^2.6.1",
- "webpack/**/browserslist": "^4.16.5",
- "postcss/**/nanoid": "^3.1.31"
- }
-}
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/prettier.json b/plugins/tensorboard-plugins/tb_plugin/fe/prettier.json
deleted file mode 100644
index ef5789da9458a66e7dacc1dfdeeb764642331734..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/prettier.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "parser": "typescript",
- "semi": true,
- "singleQuote": true,
- "jsxSingleQuote": false,
- "bracketSpacing": true,
- "tabWidth": 2,
- "useTabs": false,
- "trailingComma": "all",
- "proseWrap": "always",
- "endOfLine": "lf"
-}
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/scripts/add_header.py b/plugins/tensorboard-plugins/tb_plugin/fe/scripts/add_header.py
deleted file mode 100644
index 69bc6c05541cbaff0fc88eb7456f501fb5bd4f71..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/scripts/add_header.py
+++ /dev/null
@@ -1,51 +0,0 @@
-# -------------------------------------------------------------------------
-# Copyright (c) Microsoft Corporation.
-# Copyright(c) 2023 Huawei Technologies.
-# All rights reserved
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# Modifications: Add visualization of PyTorch Ascend profiling.
-# --------------------------------------------------------------------------
-# !/usr/bin/env python
-import glob
-import os
-import sys
-
-HEADER = '''/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-'''
-
-
-def add_header(file):
- with open(file, 'r') as f:
- contents = f.readlines()
-
- # do nothing if there is already header
- if contents and contents[0].startswith('/*-'):
- return
-
- with open(file, 'w') as out:
- out.write(HEADER)
- out.writelines(contents)
-
-
-if __name__ == '__main__':
- directory = sys.argv[1]
- if not os.path.isdir(directory):
- raise ValueError('{} is not a directory'.format(directory))
-
- for ts_file in glob.glob(directory + '/*.ts'):
- add_header(ts_file)
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/scripts/build.sh b/plugins/tensorboard-plugins/tb_plugin/fe/scripts/build.sh
deleted file mode 100644
index 014a26e26c3b58421b878c886fd1899cae2758b3..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/scripts/build.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/bash
-set -e
-
-current_dir="$( cd "$( dirname "$0" )" && pwd )"
-FE_ROOT="$(dirname "$current_dir")"
-cd $FE_ROOT/
-
-java -jar $FE_ROOT/swagger-codegen-cli.jar generate -i $FE_ROOT/src/api/openapi.yaml -l typescript-fetch -o $FE_ROOT/src/api/generated/ --additional-properties modelPropertyNaming=original
-rm $FE_ROOT/src/api/generated/api_test.spec.ts
-yarn prettier --end-of-line lf
-python $FE_ROOT/scripts/add_header.py $FE_ROOT/src/api/generated/
-
-yarn build:copy
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/scripts/setup.sh b/plugins/tensorboard-plugins/tb_plugin/fe/scripts/setup.sh
deleted file mode 100644
index fb2680d9816139854c58b87c6293a8c11ce685f4..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/scripts/setup.sh
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/bash
-set -e
-
-current_dir="$( cd "$( dirname "$0" )" && pwd )"
-FE_ROOT="$(dirname "$current_dir")"
-
-# # install nodejs
-if ! command -v node &> /dev/null
-then
- curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
- sudo apt-get install -y nodejs
-fi
-
-# install yarn
-if ! command -v yarn &> /dev/null
-then
- curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
- echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
- sudo apt update && sudo apt install yarn
-fi
-
-# download swagger-codegen-cli
-if [[ ! -f "$FE_ROOT/swagger-codegen-cli.jar" ]]; then
- wget https://repo1.maven.org/maven2/io/swagger/codegen/v3/swagger-codegen-cli/3.0.25/swagger-codegen-cli-3.0.25.jar -O swagger-codegen-cli.jar
-fi
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/api/README.md b/plugins/tensorboard-plugins/tb_plugin/fe/src/api/README.md
deleted file mode 100644
index 06208c419e1c72c4d49e3dc06f8304d4198b27c2..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/api/README.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# How to generate the api.ts
-
-## Prerequisites
-1. install java
-2. run command
-```bash
- cd fe
- wget https://repo1.maven.org/maven2/io/swagger/codegen/v3/swagger-codegen-cli/3.0.25/swagger-codegen-cli-3.0.25.jar -O swagger-codegen-cli.jar
- java -jar swagger-codegen-cli.jar generate -i ./src/api/openapi.yaml -l typescript-fetch -o ./src/api/generated/ --additional-properties modelPropertyNaming=original
- rm ./src/api/generated/api_test.spec.ts
- yarn prettier --end-of-line lf
- python ./scripts/add_header.py ./src/api/generated/
-```
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/api/generated/api.ts b/plugins/tensorboard-plugins/tb_plugin/fe/src/api/generated/api.ts
deleted file mode 100644
index 29cde96ebbde928cde967b3b1b365d12e74ee734..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/api/generated/api.ts
+++ /dev/null
@@ -1,4724 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------
- * Copyright (c) 2023, Huawei Technologies.
- * All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Modifications: Add visualization of PyTorch Ascend profiling.
- *--------------------------------------------------------------------------------------------*/
-
-///
-// tslint:disable
-/**
- * Pytorch profile API
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
- *
- * OpenAPI spec version: 1.0.0
- *
- *
- * NOTE: This file is auto generated by the swagger code generator program.
- * https://github.com/swagger-api/swagger-codegen.git
- * Do not edit the file manually.
- */
-
-import * as url from 'url';
-import * as portableFetch from 'portable-fetch';
-import { Configuration } from './configuration';
-
-const BASE_PATH = '.'.replace(/\/+$/, '');
-
-/**
- *
- * @export
- */
-export const COLLECTION_FORMATS = {
- csv: ',',
- ssv: ' ',
- tsv: '\t',
- pipes: '|',
-};
-
-/**
- *
- * @export
- * @interface FetchAPI
- */
-export interface FetchAPI {
- (url: string, init?: any): Promise;
-}
-
-/**
- *
- * @export
- * @interface FetchArgs
- */
-export interface FetchArgs {
- url: string;
- options: any;
-}
-
-/**
- *
- * @export
- * @class BaseAPI
- */
-export class BaseAPI {
- protected configuration: Configuration;
-
- constructor(
- configuration?: Configuration,
- protected basePath: string = BASE_PATH,
- protected fetch: FetchAPI = portableFetch
- ) {
- if (configuration) {
- this.configuration = configuration;
- this.basePath = configuration.basePath || this.basePath;
- }
- }
-}
-
-/**
- *
- * @export
- * @class RequiredError
- * @extends {Error}
- */
-export class RequiredError extends Error {
- name: 'RequiredError';
- constructor(public field: string, msg?: string) {
- super(msg);
- }
-}
-
-/**
- *
- * @export
- * @interface CallStackTableData
- */
-export interface CallStackTableData extends Array {}
-/**
- *
- * @export
- * @interface CallStackTableDataInner
- */
-export interface CallStackTableDataInner {
- /**
- *
- * @type {string}
- * @memberof CallStackTableDataInner
- */
- name: string;
- /**
- *
- * @type {string}
- * @memberof CallStackTableDataInner
- */
- input_shape?: string;
- /**
- *
- * @type {number}
- * @memberof CallStackTableDataInner
- */
- calls: number;
- /**
- *
- * @type {number}
- * @memberof CallStackTableDataInner
- */
- device_self_duration?: number;
- /**
- *
- * @type {number}
- * @memberof CallStackTableDataInner
- */
- device_total_duration?: number;
- /**
- *
- * @type {number}
- * @memberof CallStackTableDataInner
- */
- host_self_duration: number;
- /**
- *
- * @type {number}
- * @memberof CallStackTableDataInner
- */
- host_total_duration: number;
- /**
- *
- * @type {string}
- * @memberof CallStackTableDataInner
- */
- call_stack?: string;
- /**
- *
- * @type {string}
- * @memberof CallStackTableDataInner
- */
- tc_eligible?: string;
- /**
- *
- * @type {number}
- * @memberof CallStackTableDataInner
- */
- tc_self_ratio?: number;
- /**
- *
- * @type {number}
- * @memberof CallStackTableDataInner
- */
- tc_total_ratio?: number;
-}
-/**
- *
- * @export
- * @interface DiffNode
- */
-export interface DiffNode {
- /**
- *
- * @type {OpStats}
- * @memberof DiffNode
- */
- left: OpStats;
- /**
- *
- * @type {OpStats}
- * @memberof DiffNode
- */
- right: OpStats;
- /**
- *
- * @type {string}
- * @memberof DiffNode
- */
- path: string;
- /**
- *
- * @type {Array}
- * @memberof DiffNode
- */
- children: Array;
-}
-/**
- *
- * @export
- * @interface DistributedGraph
- */
-export interface DistributedGraph {
- /**
- *
- * @type {DistributedGraphMetadata}
- * @memberof DistributedGraph
- */
- metadata: DistributedGraphMetadata;
- /**
- *
- * @type {any}
- * @memberof DistributedGraph
- */
- data: any;
-}
-/**
- *
- * @export
- * @interface DistributedGraphMetadata
- */
-export interface DistributedGraphMetadata {
- /**
- *
- * @type {string}
- * @memberof DistributedGraphMetadata
- */
- title: string;
- /**
- *
- * @type {Array}
- * @memberof DistributedGraphMetadata
- */
- legends: Array;
- /**
- *
- * @type {string}
- * @memberof DistributedGraphMetadata
- */
- units: string;
-}
-/**
- *
- * @export
- * @interface Environment
- */
-export interface Environment {
- /**
- *
- * @type {string}
- * @memberof Environment
- */
- title: string;
- /**
- *
- * @type {string}
- * @memberof Environment
- */
- value: string;
-}
-/**
- *
- * @export
- * @interface GpuInfo
- */
-export interface GpuInfo {
- /**
- *
- * @type {GpuInfoMetadata}
- * @memberof GpuInfo
- */
- metadata: GpuInfoMetadata;
- /**
- *
- * @type {any}
- * @memberof GpuInfo
- */
- data: any;
-}
-/**
- *
- * @export
- * @interface GpuInfoMetadata
- */
-export interface GpuInfoMetadata {
- /**
- *
- * @type {string}
- * @memberof GpuInfoMetadata
- */
- title: string;
-}
-/**
- *
- * @export
- * @interface GpuMetric
- */
-export interface GpuMetric {
- /**
- *
- * @type {string}
- * @memberof GpuMetric
- */
- title: string;
- /**
- *
- * @type {string}
- * @memberof GpuMetric
- */
- value: string;
-}
-/**
- *
- * @export
- * @interface GpuMetrics
- */
-export interface GpuMetrics {
- /**
- *
- * @type {Array}
- * @memberof GpuMetrics
- */
- data: Array;
- /**
- *
- * @type {string}
- * @memberof GpuMetrics
- */
- tooltip: string;
-}
-/**
- *
- * @export
- * @interface Graph
- */
-export interface Graph {
- /**
- *
- * @type {string}
- * @memberof Graph
- */
- title?: string;
- /**
- *
- * @type {Array}
- * @memberof Graph
- */
- columns: Array;
- /**
- *
- * @type {Array>}
- * @memberof Graph
- */
- rows: Array>;
-}
-/**
- *
- * @export
- * @interface ValueAndTooltip
- */
-export interface ValueAndTooltip {
- /**
- *
- * @type {string | number}
- * @memberof ValueAndTooltip
- */
- value: string | number;
- /**
- *
- * @type {string}
- * @memberof ValueAndTooltip
- */
- tooltip?: string;
-}
-/**
- *
- * @export
- * @interface StepedGraph
- */
-export interface StepedGraph {
- /**
- *
- * @type {string}
- * @memberof StepedGraph
- */
- title?: string;
- /**
- *
- * @type {Array}
- * @memberof StepedGraph
- */
- columns: Array;
- /**
- *
- * @type {Array>}
- * @memberof StepedGraph
- */
- rows: Array>;
-}
-/**
- *
- * @export
- * @interface GraphAscend
- */
-export interface GraphAscend {
- /**
- *
- * @type {string}
- * @memberof GraphAscend
- */
- title?: string;
- /**
- *
- * @type {Array}
- * @memberof GraphAscend
- */
- columns: Array;
- /**
- *
- * @type {any}
- * @memberof GraphAscend
- */
- rows: any;
-}
-/**
- *
- * @export
- * @interface GraphColumn
- */
-export interface GraphColumn {
- /**
- *
- * @type {string}
- * @memberof GraphColumn
- */
- type: string;
- /**
- *
- * @type {string}
- * @memberof GraphColumn
- */
- name: string;
- /**
- *
- * @type {string}
- * @memberof GraphColumn
- */
- role?: string;
- /**
- *
- * @type {GraphColumnP}
- * @memberof GraphColumn
- */
- p?: GraphColumnP;
-}
-/**
- *
- * @export
- * @interface GraphColumnP
- */
-export interface GraphColumnP {
- /**
- *
- * @type {boolean}
- * @memberof GraphColumnP
- */
- html?: boolean;
-}
-/**
- *
- * @export
- * @interface InlineResponse200
- */
-export interface InlineResponse200 {
- /**
- *
- * @type {TableMetadata}
- * @memberof InlineResponse200
- */
- metadata: TableMetadata;
- /**
- *
- * @type {OperationTableData}
- * @memberof InlineResponse200
- */
- data: OperationTableData;
-}
-/**
- *
- * @export
- * @interface InlineResponse2001
- */
-export interface InlineResponse2001 {
- /**
- *
- * @type {TableMetadata}
- * @memberof InlineResponse2001
- */
- metadata: TableMetadata;
- /**
- *
- * @type {CallStackTableData}
- * @memberof InlineResponse2001
- */
- data: CallStackTableData;
-}
-/**
- *
- * @export
- * @interface InlineResponse2002
- */
-export interface InlineResponse2002 {
- /**
- *
- * @type {GpuInfoMetadata}
- * @memberof InlineResponse2002
- */
- metadata: GpuInfoMetadata;
- /**
- *
- * @type {any}
- * @memberof InlineResponse2002
- */
- data: any;
-}
-/**
- *
- * @export
- * @interface KernelGraph
- */
-export interface KernelGraph {
- /**
- *
- * @type {Graph}
- * @memberof KernelGraph
- */
- total: Graph;
- device_target: string;
-}
-/**
- *
- * @export
- * @interface KeyedColumn
- */
-export interface KeyedColumn {
- /**
- *
- * @type {string}
- * @memberof KeyedColumn
- */
- type: string;
- /**
- *
- * @type {string}
- * @memberof KeyedColumn
- */
- name: string;
- /**
- *
- * @type {string}
- * @memberof KeyedColumn
- */
- key: string;
-}
-/**
- *
- * @export
- * @interface MemoryCurveDataAll
- */
-export interface MemoryCurveDataAll {
- /**
- *
- * @type {string}
- * @memberof MemoryCurveDataAll
- */
- default_device: string;
- /**
- *
- * @type {Array}
- * @memberof MemoryCurveDataAll
- */
- devices: Array;
- /**
- *
- * @type {MemoryCurveDataAscend}
- * @memberof MemoryCurveDataAll
- */
- total: MemoryCurveDataAscend;
- /**
- *
- * @type {MemoryCurveDataAscend}
- * @memberof MemoryCurveDataAll
- */
- ptaGe: MemoryCurveDataAscend;
-}
-/**
- *
- * @export
- * @interface MemoryCurveData
- */
-export interface MemoryCurveData {
- /**
- *
- * @type {MemoryCurveDataMetadata}
- * @memberof MemoryCurveData
- */
- metadata: MemoryCurveDataMetadata;
- /**
- *
- * @type {Array}
- * @memberof MemoryCurveData
- */
- columns: Array;
- /**
- *
- * @type {any}
- * @memberof MemoryCurveData
- */
- rows: any;
-}
-/**
- *
- * @export
- * @interface MemoryCurveDataAscend
- */
-export interface MemoryCurveDataAscend {
- /**
- *
- * @type {MemoryCurveDataMetadata}
- * @memberof MemoryCurveDataAscend
- */
- metadata: MemoryCurveDataMetadata;
- /**
- *
- * @type {any}
- * @memberof MemoryCurveDataAscend
- */
- columns: any;
- /**
- *
- * @type {any}
- * @memberof MemoryCurveDataAscend
- */
- rows: any;
-}
-/**
- *
- * @export
- * @interface MemoryCurveDataMetadata
- */
-export interface MemoryCurveDataMetadata {
- /**
- *
- * @type {string}
- * @memberof MemoryCurveDataMetadata
- */
- default_device: string;
- /**
- *
- * @type {Array}
- * @memberof MemoryCurveDataMetadata
- */
- devices: Array;
- /**
- *
- * @type {any}
- * @memberof MemoryCurveDataMetadata
- */
- peaks: any;
- /**
- *
- * @type {any}
- * @memberof MemoryCurveDataMetadata
- */
- totals: any;
- /**
- *
- * @type {number}
- * @memberof MemoryCurveDataMetadata
- */
- first_ts: number;
- /**
- *
- * @type {string}
- * @memberof MemoryCurveDataMetadata
- */
- time_metric: string;
- /**
- *
- * @type {string}
- * @memberof MemoryCurveDataMetadata
- */
- memory_metric: string;
- /**
- *
- * @type {number}
- * @memberof MemoryCurveDataMetadata
- */
- time_factor: number;
- /**
- *
- * @type {number}
- * @memberof MemoryCurveDataMetadata
- */
- memory_factor: number;
-}
-/**
- *
- * @export
- * @interface MemoryEventsData
- */
-export interface MemoryEventsData {
- /**
- *
- * @type {MemoryEventsTableMetadata}
- * @memberof MemoryEventsData
- */
- metadata: MemoryEventsTableMetadata;
- /**
- *
- * @type {Array}
- * @memberof MemoryEventsData
- */
- columns: Array;
- /**
- *
- * @type {any}
- * @memberof MemoryEventsData
- */
- rows: any;
-}
-/**
- *
- * @exports
- * @interface MemoryEventsDataAll
- */
-export interface MemoryEventsDataAll {
- /**
- *
- * @type {MemoryEventsData}
- * @memberof MemoryEventsDataAll
- */
- operator: MemoryEventsData;
- /**
- *
- * @type {MemoryEventsData}
- * @memberof MemoryEventsDataAll
- */
- component: MemoryEventsData;
-}
-/**
- *
- * @export
- * @interface MemoryEventsTableMetadata
- */
-export interface MemoryEventsTableMetadata {
- /**
- *
- * @type {string}
- * @memberof MemoryEventsTableMetadata
- */
- title: string;
- /**
- *
- * @type {string}
- * @memberof MemoryEventsTableMetadata
- */
- default_device: string;
- /**
- *
- * @type {string}
- * @memberof MemoryEventsTableMetadata
- */
- search?: string;
- /**
- *
- * @type {string}
- * @memberof MemoryEventsTableMetadata
- */
- sort?: string;
-}
-/**
- *
- * @export
- * @interface MemoryStatsData
- */
-export interface MemoryStatsData {
- /**
- *
- * @type {MemoryStatsTableMetadata}
- * @memberof MemoryStatsData
- */
- metadata: MemoryStatsTableMetadata;
- /**
- *
- * @type {Array}
- * @memberof MemoryStatsData
- */
- columns: Array;
- /**
- *
- * @type {any}
- * @memberof MemoryStatsData
- */
- rows: any;
-}
-/**
- *
- * @export
- * @interface MemoryStatsTableMetadata
- */
-export interface MemoryStatsTableMetadata {
- /**
- *
- * @type {string}
- * @memberof MemoryStatsTableMetadata
- */
- title: string;
- /**
- *
- * @type {string}
- * @memberof MemoryStatsTableMetadata
- */
- default_device: string;
- /**
- *
- * @type {string}
- * @memberof MemoryStatsTableMetadata
- */
- search: string;
- /**
- *
- * @type {string}
- * @memberof MemoryStatsTableMetadata
- */
- sort: string;
-}
-/**
- *
- * @export
- * @interface ModuleStats
- */
-export interface ModuleStats {
- /**
- *
- * @type {string}
- * @memberof ModuleStats
- */
- name: string;
- /**
- *
- * @type {string}
- * @memberof ModuleStats
- */
- id: string;
- /**
- *
- * @type {number}
- * @memberof ModuleStats
- */
- occurences: number;
- /**
- *
- * @type {number}
- * @memberof ModuleStats
- */
- operators: number;
- /**
- *
- * @type {number}
- * @memberof ModuleStats
- */
- host_duration: number;
- /**
- *
- * @type {number}
- * @memberof ModuleStats
- */
- self_host_duration: number;
- /**
- *
- * @type {number}
- * @memberof ModuleStats
- */
- device_duration: number;
- /**
- *
- * @type {number}
- * @memberof ModuleStats
- */
- self_device_duration: number;
- /**
- *
- * @type {number}
- * @memberof ModuleStats
- */
- avg_duration: number;
- /**
- *
- * @type {Array}
- * @memberof ModuleStats
- */
- children: Array;
-}
-/**
- *
- * @export
- * @interface ModuleViewData
- */
-export interface ModuleViewData {
- /**
- *
- * @type {Array}
- * @memberof ModuleViewData
- */
- columns: Array;
- /**
- *
- * @type {Array}
- * @memberof ModuleViewData
- */
- data: Array;
-}
-/**
- *
- * @export
- * @interface OpAgg
- */
-export interface OpAgg {
- /**
- *
- * @type {string}
- * @memberof OpAgg
- */
- name: string;
- /**
- *
- * @type {number}
- * @memberof OpAgg
- */
- calls: number;
- /**
- *
- * @type {number}
- * @memberof OpAgg
- */
- host_duration: number;
- /**
- *
- * @type {number}
- * @memberof OpAgg
- */
- device_duration: number;
- /**
- *
- * @type {number}
- * @memberof OpAgg
- */
- self_host_duration: number;
- /**
- *
- * @type {number}
- * @memberof OpAgg
- */
- self_device_duration: number;
-}
-/**
- *
- * @export
- * @interface OpStats
- */
-export interface OpStats {
- /**
- *
- * @type {string}
- * @memberof OpStats
- */
- name: string;
- /**
- *
- * @type {number}
- * @memberof OpStats
- */
- duration: number;
- /**
- *
- * @type {number}
- * @memberof OpStats
- */
- device_duration: number;
- /**
- *
- * @type {number}
- * @memberof OpStats
- */
- total_duration: number;
- /**
- *
- * @type {Array}
- * @memberof OpStats
- */
- aggs: Array;
-}
-/**
- *
- * @export
- * @interface OperationTableData
- */
-export interface OperationTableData extends Array {}
-/**
- *
- * @export
- * @interface OperationTableDataInner
- */
-export interface OperationTableDataInner {
- /**
- *
- * @type {string}
- * @memberof OperationTableDataInner
- */
- name: string;
- /**
- *
- * @type {string}
- * @memberof OperationTableDataInner
- */
- input_shape?: string;
- /**
- *
- * @type {number}
- * @memberof OperationTableDataInner
- */
- calls: number;
- /**
- *
- * @type {number}
- * @memberof OperationTableDataInner
- */
- device_self_duration?: number;
- /**
- *
- * @type {number}
- * @memberof OperationTableDataInner
- */
- device_total_duration?: number;
- /**
- *
- * @type {number}
- * @memberof OperationTableDataInner
- */
- host_self_duration: number;
- /**
- *
- * @type {number}
- * @memberof OperationTableDataInner
- */
- host_total_duration: number;
- /**
- *
- * @type {boolean}
- * @memberof OperationTableDataInner
- */
- has_call_stack: boolean;
- /**
- *
- * @type {string}
- * @memberof OperationTableDataInner
- */
- tc_eligible?: string;
- /**
- *
- * @type {number}
- * @memberof OperationTableDataInner
- */
- tc_self_ratio?: number;
- /**
- *
- * @type {number}
- * @memberof OperationTableDataInner
- */
- tc_total_ratio?: number;
-}
-/**
- *
- * @export
- * @interface OperatorGraph
- */
-export interface OperatorGraph {
- /**
- *
- * @type {Graph}
- * @memberof OperatorGraph
- */
- device_total_time: Graph;
- /**
- *
- * @type {Graph}
- * @memberof OperatorGraph
- */
- device_self_time: Graph;
- /**
- *
- * @type {Graph}
- * @memberof OperatorGraph
- */
- host_total_time: Graph;
- /**
- *
- * @type {Graph}
- * @memberof OperatorGraph
- */
- host_self_time: Graph;
-}
-/**
- *
- * @export
- * @interface OperatorNode
- */
-export interface OperatorNode {
- /**
- *
- * @type {string}
- * @memberof OperatorNode
- */
- name: string;
- /**
- *
- * @type {number}
- * @memberof OperatorNode
- */
- start_time: number;
- /**
- *
- * @type {number}
- * @memberof OperatorNode
- */
- end_time: number;
- /**
- *
- * @type {string}
- * @memberof OperatorNode
- */
- type: string;
- /**
- *
- * @type {number}
- * @memberof OperatorNode
- */
- tid: number;
- /**
- *
- * @type {Array}
- * @memberof OperatorNode
- */
- children: Array;
-}
-/**
- *
- * @export
- * @interface Overview
- */
-export interface Overview {
- /**
- *
- * @type {Array}
- * @memberof Overview
- */
- performance: Array;
- /**
- *
- * @type {Array}
- * @memberof Overview
- */
- environments: Array;
- /**
- *
- * @type {StepedGraph}
- * @memberof Overview
- */
- steps: StepedGraph;
- /**
- *
- * @type {string}
- * @memberof Overview
- */
- recommendations: string;
- /**
- *
- * @type {GpuMetrics}
- * @memberof Overview
- */
- gpu_metrics?: GpuMetrics;
-}
-/**
- *
- * @export
- * @interface Performance
- */
-export interface Performance {
- /**
- *
- * @type {string}
- * @memberof Performance
- */
- name: string;
- /**
- *
- * @type {string}
- * @memberof Performance
- */
- description?: string;
- /**
- *
- * @type {string}
- * @memberof Performance
- */
- value?: string;
- /**
- *
- * @type {string}
- * @memberof Performance
- */
- extra?: string;
- /**
- *
- * @type {Array}
- * @memberof Performance
- */
- children?: Array;
-}
-/**
- *
- * @export
- * @interface Runs
- */
-export interface Runs {
- /**
- *
- * @type {Array}
- * @memberof Runs
- */
- runs: Array;
- /**
- *
- * @type {boolean}
- * @memberof Runs
- */
- loading: boolean;
-}
-/**
- *
- * @export
- * @interface TableData
- */
-export interface TableData {
- /**
- *
- * @type {Graph}
- * @memberof TableData
- */
- data: Graph;
- /**
- *
- * @type {TableMetadata}
- * @memberof TableData
- */
- metadata: TableMetadata;
-}
-/**
- *
- * @export
- * @interface TableMetadata
- */
-export interface TableMetadata {
- /**
- *
- * @type {string}
- * @memberof TableMetadata
- */
- sort: string;
- /**
- *
- * @type {any}
- * @memberof TableMetadata
- */
- tooltips?: any;
-}
-/**
- *
- * @export
- * @interface TensorCoresGraph
- */
-export interface TensorCoresGraph {
- /**
- *
- * @type {Graph}
- * @memberof TensorCoresGraph
- */
- total: Graph;
-}
-/**
- *
- * @export
- * @interface ValueAndFormat
- */
-export interface ValueAndFormat {
- /**
- *
- * @type {string | number | boolean}
- * @memberof ValueAndFormat
- */
- v: string | number | boolean;
- /**
- *
- * @type {string}
- * @memberof ValueAndFormat
- */
- f: string;
-}
-/**
- *
- * @exports
- * @interface Views
- */
-export interface Views {
- /**
- *
- * @type {string}
- * @memberof Views
- */
- device_target: string;
- /**
- *
- * @type {Array}
- * @memberof Views
- */
- views: Array;
-}
-/**
- * DefaultApi - fetch parameter creator
- * @export
- */
-export const DefaultApiFetchParamCreator = function (
- configuration?: Configuration
-) {
- return {
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {string} exp_run
- * @param {string} exp_worker
- * @param {string} exp_span
- * @param {string} [path]
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- diffnodeGet(
- run: string,
- worker: string,
- span: string,
- exp_run: string,
- exp_worker: string,
- exp_span: string,
- path?: string,
- options: any = {}
- ): FetchArgs {
- // verify required parameter 'run' is not null or undefined
- if (run === null || run === undefined) {
- throw new RequiredError(
- 'run',
- 'Required parameter run was null or undefined when calling diffnodeGet.'
- );
- }
- // verify required parameter 'worker' is not null or undefined
- if (worker === null || worker === undefined) {
- throw new RequiredError(
- 'worker',
- 'Required parameter worker was null or undefined when calling diffnodeGet.'
- );
- }
- // verify required parameter 'span' is not null or undefined
- if (span === null || span === undefined) {
- throw new RequiredError(
- 'span',
- 'Required parameter span was null or undefined when calling diffnodeGet.'
- );
- }
- // verify required parameter 'exp_run' is not null or undefined
- if (exp_run === null || exp_run === undefined) {
- throw new RequiredError(
- 'exp_run',
- 'Required parameter exp_run was null or undefined when calling diffnodeGet.'
- );
- }
- // verify required parameter 'exp_worker' is not null or undefined
- if (exp_worker === null || exp_worker === undefined) {
- throw new RequiredError(
- 'exp_worker',
- 'Required parameter exp_worker was null or undefined when calling diffnodeGet.'
- );
- }
- // verify required parameter 'exp_span' is not null or undefined
- if (exp_span === null || exp_span === undefined) {
- throw new RequiredError(
- 'exp_span',
- 'Required parameter exp_span was null or undefined when calling diffnodeGet.'
- );
- }
- const localVarPath = `/diffnode`;
- const localVarUrlObj = url.parse(localVarPath, true);
- const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
- const localVarHeaderParameter = {} as any;
- const localVarQueryParameter = {} as any;
-
- if (run !== undefined) {
- localVarQueryParameter.run = run;
- }
-
- if (worker !== undefined) {
- localVarQueryParameter.worker = worker;
- }
-
- if (span !== undefined) {
- localVarQueryParameter.span = span;
- }
-
- if (exp_run !== undefined) {
- localVarQueryParameter.exp_run = exp_run;
- }
-
- if (exp_worker !== undefined) {
- localVarQueryParameter.exp_worker = exp_worker;
- }
-
- if (exp_span !== undefined) {
- localVarQueryParameter.exp_span = exp_span;
- }
-
- if (path !== undefined) {
- localVarQueryParameter.path = path;
- }
-
- localVarUrlObj.query = Object.assign(
- {},
- localVarUrlObj.query,
- localVarQueryParameter,
- options.query
- );
- // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
- delete localVarUrlObj.search;
- localVarRequestOptions.headers = Object.assign(
- {},
- localVarHeaderParameter,
- options.headers
- );
-
- return {
- url: url.format(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- distributedCommopsGet(
- run: string,
- worker: string,
- span: string,
- options: any = {}
- ): FetchArgs {
- // verify required parameter 'run' is not null or undefined
- if (run === null || run === undefined) {
- throw new RequiredError(
- 'run',
- 'Required parameter run was null or undefined when calling distributedCommopsGet.'
- );
- }
- // verify required parameter 'worker' is not null or undefined
- if (worker === null || worker === undefined) {
- throw new RequiredError(
- 'worker',
- 'Required parameter worker was null or undefined when calling distributedCommopsGet.'
- );
- }
- // verify required parameter 'span' is not null or undefined
- if (span === null || span === undefined) {
- throw new RequiredError(
- 'span',
- 'Required parameter span was null or undefined when calling distributedCommopsGet.'
- );
- }
- const localVarPath = `/distributed/commops`;
- const localVarUrlObj = url.parse(localVarPath, true);
- const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
- const localVarHeaderParameter = {} as any;
- const localVarQueryParameter = {} as any;
-
- if (run !== undefined) {
- localVarQueryParameter.run = run;
- }
-
- if (worker !== undefined) {
- localVarQueryParameter.worker = worker;
- }
-
- if (span !== undefined) {
- localVarQueryParameter.span = span;
- }
-
- localVarUrlObj.query = Object.assign(
- {},
- localVarUrlObj.query,
- localVarQueryParameter,
- options.query
- );
- // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
- delete localVarUrlObj.search;
- localVarRequestOptions.headers = Object.assign(
- {},
- localVarHeaderParameter,
- options.headers
- );
-
- return {
- url: url.format(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- distributedGpuinfoGet(
- run: string,
- worker: string,
- span: string,
- options: any = {}
- ): FetchArgs {
- // verify required parameter 'run' is not null or undefined
- if (run === null || run === undefined) {
- throw new RequiredError(
- 'run',
- 'Required parameter run was null or undefined when calling distributedGpuinfoGet.'
- );
- }
- // verify required parameter 'worker' is not null or undefined
- if (worker === null || worker === undefined) {
- throw new RequiredError(
- 'worker',
- 'Required parameter worker was null or undefined when calling distributedGpuinfoGet.'
- );
- }
- // verify required parameter 'span' is not null or undefined
- if (span === null || span === undefined) {
- throw new RequiredError(
- 'span',
- 'Required parameter span was null or undefined when calling distributedGpuinfoGet.'
- );
- }
- const localVarPath = `/distributed/gpuinfo`;
- const localVarUrlObj = url.parse(localVarPath, true);
- const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
- const localVarHeaderParameter = {} as any;
- const localVarQueryParameter = {} as any;
-
- if (run !== undefined) {
- localVarQueryParameter.run = run;
- }
-
- if (worker !== undefined) {
- localVarQueryParameter.worker = worker;
- }
-
- if (span !== undefined) {
- localVarQueryParameter.span = span;
- }
-
- localVarUrlObj.query = Object.assign(
- {},
- localVarUrlObj.query,
- localVarQueryParameter,
- options.query
- );
- // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
- delete localVarUrlObj.search;
- localVarRequestOptions.headers = Object.assign(
- {},
- localVarHeaderParameter,
- options.headers
- );
-
- return {
- url: url.format(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- distributedOverlapGet(
- run: string,
- worker: string,
- span: string,
- options: any = {}
- ): FetchArgs {
- // verify required parameter 'run' is not null or undefined
- if (run === null || run === undefined) {
- throw new RequiredError(
- 'run',
- 'Required parameter run was null or undefined when calling distributedOverlapGet.'
- );
- }
- // verify required parameter 'worker' is not null or undefined
- if (worker === null || worker === undefined) {
- throw new RequiredError(
- 'worker',
- 'Required parameter worker was null or undefined when calling distributedOverlapGet.'
- );
- }
- // verify required parameter 'span' is not null or undefined
- if (span === null || span === undefined) {
- throw new RequiredError(
- 'span',
- 'Required parameter span was null or undefined when calling distributedOverlapGet.'
- );
- }
- const localVarPath = `/distributed/overlap`;
- const localVarUrlObj = url.parse(localVarPath, true);
- const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
- const localVarHeaderParameter = {} as any;
- const localVarQueryParameter = {} as any;
-
- if (run !== undefined) {
- localVarQueryParameter.run = run;
- }
-
- if (worker !== undefined) {
- localVarQueryParameter.worker = worker;
- }
-
- if (span !== undefined) {
- localVarQueryParameter.span = span;
- }
-
- localVarUrlObj.query = Object.assign(
- {},
- localVarUrlObj.query,
- localVarQueryParameter,
- options.query
- );
- // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
- delete localVarUrlObj.search;
- localVarRequestOptions.headers = Object.assign(
- {},
- localVarHeaderParameter,
- options.headers
- );
-
- return {
- url: url.format(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- distributedWaittimeGet(
- run: string,
- worker: string,
- span: string,
- options: any = {}
- ): FetchArgs {
- // verify required parameter 'run' is not null or undefined
- if (run === null || run === undefined) {
- throw new RequiredError(
- 'run',
- 'Required parameter run was null or undefined when calling distributedWaittimeGet.'
- );
- }
- // verify required parameter 'worker' is not null or undefined
- if (worker === null || worker === undefined) {
- throw new RequiredError(
- 'worker',
- 'Required parameter worker was null or undefined when calling distributedWaittimeGet.'
- );
- }
- // verify required parameter 'span' is not null or undefined
- if (span === null || span === undefined) {
- throw new RequiredError(
- 'span',
- 'Required parameter span was null or undefined when calling distributedWaittimeGet.'
- );
- }
- const localVarPath = `/distributed/waittime`;
- const localVarUrlObj = url.parse(localVarPath, true);
- const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
- const localVarHeaderParameter = {} as any;
- const localVarQueryParameter = {} as any;
-
- if (run !== undefined) {
- localVarQueryParameter.run = run;
- }
-
- if (worker !== undefined) {
- localVarQueryParameter.worker = worker;
- }
-
- if (span !== undefined) {
- localVarQueryParameter.span = span;
- }
-
- localVarUrlObj.query = Object.assign(
- {},
- localVarUrlObj.query,
- localVarQueryParameter,
- options.query
- );
- // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
- delete localVarUrlObj.search;
- localVarRequestOptions.headers = Object.assign(
- {},
- localVarHeaderParameter,
- options.headers
- );
-
- return {
- url: url.format(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {string} group_by Group By
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- kernelGet(
- run: string,
- worker: string,
- span: string,
- group_by: string,
- options: any = {}
- ): FetchArgs {
- // verify required parameter 'run' is not null or undefined
- if (run === null || run === undefined) {
- throw new RequiredError(
- 'run',
- 'Required parameter run was null or undefined when calling kernelGet.'
- );
- }
- // verify required parameter 'worker' is not null or undefined
- if (worker === null || worker === undefined) {
- throw new RequiredError(
- 'worker',
- 'Required parameter worker was null or undefined when calling kernelGet.'
- );
- }
- // verify required parameter 'span' is not null or undefined
- if (span === null || span === undefined) {
- throw new RequiredError(
- 'span',
- 'Required parameter span was null or undefined when calling kernelGet.'
- );
- }
- // verify required parameter 'group_by' is not null or undefined
- if (group_by === null || group_by === undefined) {
- throw new RequiredError(
- 'group_by',
- 'Required parameter group_by was null or undefined when calling kernelGet.'
- );
- }
- const localVarPath = `/kernel`;
- const localVarUrlObj = url.parse(localVarPath, true);
- const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
- const localVarHeaderParameter = {} as any;
- const localVarQueryParameter = {} as any;
-
- if (run !== undefined) {
- localVarQueryParameter.run = run;
- }
-
- if (worker !== undefined) {
- localVarQueryParameter.worker = worker;
- }
-
- if (span !== undefined) {
- localVarQueryParameter.span = span;
- }
-
- if (group_by !== undefined) {
- localVarQueryParameter.group_by = group_by;
- }
-
- localVarUrlObj.query = Object.assign(
- {},
- localVarUrlObj.query,
- localVarQueryParameter,
- options.query
- );
- // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
- delete localVarUrlObj.search;
- localVarRequestOptions.headers = Object.assign(
- {},
- localVarHeaderParameter,
- options.headers
- );
-
- return {
- url: url.format(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {string} [group_by] Group By
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- kernelTableGet(
- run: string,
- worker: string,
- span: string,
- group_by?: string,
- options: any = {}
- ): FetchArgs {
- // verify required parameter 'run' is not null or undefined
- if (run === null || run === undefined) {
- throw new RequiredError(
- 'run',
- 'Required parameter run was null or undefined when calling kernelTableGet.'
- );
- }
- // verify required parameter 'worker' is not null or undefined
- if (worker === null || worker === undefined) {
- throw new RequiredError(
- 'worker',
- 'Required parameter worker was null or undefined when calling kernelTableGet.'
- );
- }
- // verify required parameter 'span' is not null or undefined
- if (span === null || span === undefined) {
- throw new RequiredError(
- 'span',
- 'Required parameter span was null or undefined when calling kernelTableGet.'
- );
- }
- const localVarPath = `/kernel/table`;
- const localVarUrlObj = url.parse(localVarPath, true);
- const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
- const localVarHeaderParameter = {} as any;
- const localVarQueryParameter = {} as any;
-
- if (run !== undefined) {
- localVarQueryParameter.run = run;
- }
-
- if (worker !== undefined) {
- localVarQueryParameter.worker = worker;
- }
-
- if (span !== undefined) {
- localVarQueryParameter.span = span;
- }
-
- if (group_by !== undefined) {
- localVarQueryParameter.group_by = group_by;
- }
-
- localVarUrlObj.query = Object.assign(
- {},
- localVarUrlObj.query,
- localVarQueryParameter,
- options.query
- );
- // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
- delete localVarUrlObj.search;
- localVarRequestOptions.headers = Object.assign(
- {},
- localVarHeaderParameter,
- options.headers
- );
-
- return {
- url: url.format(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- kernelTcPieGet(
- run: string,
- worker: string,
- span: string,
- options: any = {}
- ): FetchArgs {
- // verify required parameter 'run' is not null or undefined
- if (run === null || run === undefined) {
- throw new RequiredError(
- 'run',
- 'Required parameter run was null or undefined when calling kernelTcPieGet.'
- );
- }
- // verify required parameter 'worker' is not null or undefined
- if (worker === null || worker === undefined) {
- throw new RequiredError(
- 'worker',
- 'Required parameter worker was null or undefined when calling kernelTcPieGet.'
- );
- }
- // verify required parameter 'span' is not null or undefined
- if (span === null || span === undefined) {
- throw new RequiredError(
- 'span',
- 'Required parameter span was null or undefined when calling kernelTcPieGet.'
- );
- }
- const localVarPath = `/kernel/tc_pie`;
- const localVarUrlObj = url.parse(localVarPath, true);
- const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
- const localVarHeaderParameter = {} as any;
- const localVarQueryParameter = {} as any;
-
- if (run !== undefined) {
- localVarQueryParameter.run = run;
- }
-
- if (worker !== undefined) {
- localVarQueryParameter.worker = worker;
- }
-
- if (span !== undefined) {
- localVarQueryParameter.span = span;
- }
-
- localVarUrlObj.query = Object.assign(
- {},
- localVarUrlObj.query,
- localVarQueryParameter,
- options.query
- );
- // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
- delete localVarUrlObj.search;
- localVarRequestOptions.headers = Object.assign(
- {},
- localVarHeaderParameter,
- options.headers
- );
-
- return {
- url: url.format(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- memoryCurveGet(
- run: string,
- worker: string,
- span: string,
- options: any = {}
- ): FetchArgs {
- // verify required parameter 'run' is not null or undefined
- if (run === null || run === undefined) {
- throw new RequiredError(
- 'run',
- 'Required parameter run was null or undefined when calling memoryCurveGet.'
- );
- }
- // verify required parameter 'worker' is not null or undefined
- if (worker === null || worker === undefined) {
- throw new RequiredError(
- 'worker',
- 'Required parameter worker was null or undefined when calling memoryCurveGet.'
- );
- }
- // verify required parameter 'span' is not null or undefined
- if (span === null || span === undefined) {
- throw new RequiredError(
- 'span',
- 'Required parameter span was null or undefined when calling memoryCurveGet.'
- );
- }
- const localVarPath = `/memory_curve`;
- const localVarUrlObj = url.parse(localVarPath, true);
- const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
- const localVarHeaderParameter = {} as any;
- const localVarQueryParameter = {} as any;
-
- if (run !== undefined) {
- localVarQueryParameter.run = run;
- }
-
- if (worker !== undefined) {
- localVarQueryParameter.worker = worker;
- }
-
- if (span !== undefined) {
- localVarQueryParameter.span = span;
- }
-
- localVarUrlObj.query = Object.assign(
- {},
- localVarUrlObj.query,
- localVarQueryParameter,
- options.query
- );
- // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
- delete localVarUrlObj.search;
- localVarRequestOptions.headers = Object.assign(
- {},
- localVarHeaderParameter,
- options.headers
- );
-
- return {
- url: url.format(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {number} [start_ts]
- * @param {number} [end_ts]
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- memoryEventsGet(
- run: string,
- worker: string,
- span: string,
- start_ts?: number,
- end_ts?: number,
- options: any = {}
- ): FetchArgs {
- // verify required parameter 'run' is not null or undefined
- if (run === null || run === undefined) {
- throw new RequiredError(
- 'run',
- 'Required parameter run was null or undefined when calling memoryEventsGet.'
- );
- }
- // verify required parameter 'worker' is not null or undefined
- if (worker === null || worker === undefined) {
- throw new RequiredError(
- 'worker',
- 'Required parameter worker was null or undefined when calling memoryEventsGet.'
- );
- }
- // verify required parameter 'span' is not null or undefined
- if (span === null || span === undefined) {
- throw new RequiredError(
- 'span',
- 'Required parameter span was null or undefined when calling memoryEventsGet.'
- );
- }
- const localVarPath = `/memory_events`;
- const localVarUrlObj = url.parse(localVarPath, true);
- const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
- const localVarHeaderParameter = {} as any;
- const localVarQueryParameter = {} as any;
-
- if (run !== undefined) {
- localVarQueryParameter.run = run;
- }
-
- if (worker !== undefined) {
- localVarQueryParameter.worker = worker;
- }
-
- if (span !== undefined) {
- localVarQueryParameter.span = span;
- }
-
- if (start_ts !== undefined) {
- localVarQueryParameter.start_ts = start_ts;
- }
-
- if (end_ts !== undefined) {
- localVarQueryParameter.end_ts = end_ts;
- }
-
- localVarUrlObj.query = Object.assign(
- {},
- localVarUrlObj.query,
- localVarQueryParameter,
- options.query
- );
- // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
- delete localVarUrlObj.search;
- localVarRequestOptions.headers = Object.assign(
- {},
- localVarHeaderParameter,
- options.headers
- );
-
- return {
- url: url.format(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {number} [start_ts]
- * @param {number} [end_ts]
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- memoryGet(
- run: string,
- worker: string,
- span: string,
- start_ts?: number,
- end_ts?: number,
- options: any = {}
- ): FetchArgs {
- // verify required parameter 'run' is not null or undefined
- if (run === null || run === undefined) {
- throw new RequiredError(
- 'run',
- 'Required parameter run was null or undefined when calling memoryGet.'
- );
- }
- // verify required parameter 'worker' is not null or undefined
- if (worker === null || worker === undefined) {
- throw new RequiredError(
- 'worker',
- 'Required parameter worker was null or undefined when calling memoryGet.'
- );
- }
- // verify required parameter 'span' is not null or undefined
- if (span === null || span === undefined) {
- throw new RequiredError(
- 'span',
- 'Required parameter span was null or undefined when calling memoryGet.'
- );
- }
- const localVarPath = `/memory`;
- const localVarUrlObj = url.parse(localVarPath, true);
- const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
- const localVarHeaderParameter = {} as any;
- const localVarQueryParameter = {} as any;
-
- if (run !== undefined) {
- localVarQueryParameter.run = run;
- }
-
- if (worker !== undefined) {
- localVarQueryParameter.worker = worker;
- }
-
- if (span !== undefined) {
- localVarQueryParameter.span = span;
- }
-
- if (start_ts !== undefined) {
- localVarQueryParameter.start_ts = start_ts;
- }
-
- if (end_ts !== undefined) {
- localVarQueryParameter.end_ts = end_ts;
- }
-
- localVarUrlObj.query = Object.assign(
- {},
- localVarUrlObj.query,
- localVarQueryParameter,
- options.query
- );
- // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
- delete localVarUrlObj.search;
- localVarRequestOptions.headers = Object.assign(
- {},
- localVarHeaderParameter,
- options.headers
- );
-
- return {
- url: url.format(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- moduleGet(
- run: string,
- worker: string,
- span: string,
- options: any = {}
- ): FetchArgs {
- // verify required parameter 'run' is not null or undefined
- if (run === null || run === undefined) {
- throw new RequiredError(
- 'run',
- 'Required parameter run was null or undefined when calling moduleGet.'
- );
- }
- // verify required parameter 'worker' is not null or undefined
- if (worker === null || worker === undefined) {
- throw new RequiredError(
- 'worker',
- 'Required parameter worker was null or undefined when calling moduleGet.'
- );
- }
- // verify required parameter 'span' is not null or undefined
- if (span === null || span === undefined) {
- throw new RequiredError(
- 'span',
- 'Required parameter span was null or undefined when calling moduleGet.'
- );
- }
- const localVarPath = `/module`;
- const localVarUrlObj = url.parse(localVarPath, true);
- const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
- const localVarHeaderParameter = {} as any;
- const localVarQueryParameter = {} as any;
-
- if (run !== undefined) {
- localVarQueryParameter.run = run;
- }
-
- if (worker !== undefined) {
- localVarQueryParameter.worker = worker;
- }
-
- if (span !== undefined) {
- localVarQueryParameter.span = span;
- }
-
- localVarUrlObj.query = Object.assign(
- {},
- localVarUrlObj.query,
- localVarQueryParameter,
- options.query
- );
- // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
- delete localVarUrlObj.search;
- localVarRequestOptions.headers = Object.assign(
- {},
- localVarHeaderParameter,
- options.headers
- );
-
- return {
- url: url.format(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {string} group_by Group By
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- operationGet(
- run: string,
- worker: string,
- span: string,
- group_by: string,
- options: any = {}
- ): FetchArgs {
- // verify required parameter 'run' is not null or undefined
- if (run === null || run === undefined) {
- throw new RequiredError(
- 'run',
- 'Required parameter run was null or undefined when calling operationGet.'
- );
- }
- // verify required parameter 'worker' is not null or undefined
- if (worker === null || worker === undefined) {
- throw new RequiredError(
- 'worker',
- 'Required parameter worker was null or undefined when calling operationGet.'
- );
- }
- // verify required parameter 'span' is not null or undefined
- if (span === null || span === undefined) {
- throw new RequiredError(
- 'span',
- 'Required parameter span was null or undefined when calling operationGet.'
- );
- }
- // verify required parameter 'group_by' is not null or undefined
- if (group_by === null || group_by === undefined) {
- throw new RequiredError(
- 'group_by',
- 'Required parameter group_by was null or undefined when calling operationGet.'
- );
- }
- const localVarPath = `/operation`;
- const localVarUrlObj = url.parse(localVarPath, true);
- const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
- const localVarHeaderParameter = {} as any;
- const localVarQueryParameter = {} as any;
-
- if (run !== undefined) {
- localVarQueryParameter.run = run;
- }
-
- if (worker !== undefined) {
- localVarQueryParameter.worker = worker;
- }
-
- if (span !== undefined) {
- localVarQueryParameter.span = span;
- }
-
- if (group_by !== undefined) {
- localVarQueryParameter.group_by = group_by;
- }
-
- localVarUrlObj.query = Object.assign(
- {},
- localVarUrlObj.query,
- localVarQueryParameter,
- options.query
- );
- // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
- delete localVarUrlObj.search;
- localVarRequestOptions.headers = Object.assign(
- {},
- localVarHeaderParameter,
- options.headers
- );
-
- return {
- url: url.format(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {string} group_by Group By
- * @param {string} op_name
- * @param {string} [input_shape]
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- operationStackGet(
- run: string,
- worker: string,
- span: string,
- group_by: string,
- op_name: string,
- input_shape?: string,
- options: any = {}
- ): FetchArgs {
- // verify required parameter 'run' is not null or undefined
- if (run === null || run === undefined) {
- throw new RequiredError(
- 'run',
- 'Required parameter run was null or undefined when calling operationStackGet.'
- );
- }
- // verify required parameter 'worker' is not null or undefined
- if (worker === null || worker === undefined) {
- throw new RequiredError(
- 'worker',
- 'Required parameter worker was null or undefined when calling operationStackGet.'
- );
- }
- // verify required parameter 'span' is not null or undefined
- if (span === null || span === undefined) {
- throw new RequiredError(
- 'span',
- 'Required parameter span was null or undefined when calling operationStackGet.'
- );
- }
- // verify required parameter 'group_by' is not null or undefined
- if (group_by === null || group_by === undefined) {
- throw new RequiredError(
- 'group_by',
- 'Required parameter group_by was null or undefined when calling operationStackGet.'
- );
- }
- // verify required parameter 'op_name' is not null or undefined
- if (op_name === null || op_name === undefined) {
- throw new RequiredError(
- 'op_name',
- 'Required parameter op_name was null or undefined when calling operationStackGet.'
- );
- }
- const localVarPath = `/operation/stack`;
- const localVarUrlObj = url.parse(localVarPath, true);
- const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
- const localVarHeaderParameter = {} as any;
- const localVarQueryParameter = {} as any;
-
- if (run !== undefined) {
- localVarQueryParameter.run = run;
- }
-
- if (worker !== undefined) {
- localVarQueryParameter.worker = worker;
- }
-
- if (span !== undefined) {
- localVarQueryParameter.span = span;
- }
-
- if (group_by !== undefined) {
- localVarQueryParameter.group_by = group_by;
- }
-
- if (op_name !== undefined) {
- localVarQueryParameter.op_name = op_name;
- }
-
- if (input_shape !== undefined) {
- localVarQueryParameter.input_shape = input_shape;
- }
-
- localVarUrlObj.query = Object.assign(
- {},
- localVarUrlObj.query,
- localVarQueryParameter,
- options.query
- );
- // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
- delete localVarUrlObj.search;
- localVarRequestOptions.headers = Object.assign(
- {},
- localVarHeaderParameter,
- options.headers
- );
-
- return {
- url: url.format(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {string} group_by Group By
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- operationTableGet(
- run: string,
- worker: string,
- span: string,
- group_by: string,
- options: any = {}
- ): FetchArgs {
- // verify required parameter 'run' is not null or undefined
- if (run === null || run === undefined) {
- throw new RequiredError(
- 'run',
- 'Required parameter run was null or undefined when calling operationTableGet.'
- );
- }
- // verify required parameter 'worker' is not null or undefined
- if (worker === null || worker === undefined) {
- throw new RequiredError(
- 'worker',
- 'Required parameter worker was null or undefined when calling operationTableGet.'
- );
- }
- // verify required parameter 'span' is not null or undefined
- if (span === null || span === undefined) {
- throw new RequiredError(
- 'span',
- 'Required parameter span was null or undefined when calling operationTableGet.'
- );
- }
- // verify required parameter 'group_by' is not null or undefined
- if (group_by === null || group_by === undefined) {
- throw new RequiredError(
- 'group_by',
- 'Required parameter group_by was null or undefined when calling operationTableGet.'
- );
- }
- const localVarPath = `/operation/table`;
- const localVarUrlObj = url.parse(localVarPath, true);
- const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
- const localVarHeaderParameter = {} as any;
- const localVarQueryParameter = {} as any;
-
- if (run !== undefined) {
- localVarQueryParameter.run = run;
- }
-
- if (worker !== undefined) {
- localVarQueryParameter.worker = worker;
- }
-
- if (span !== undefined) {
- localVarQueryParameter.span = span;
- }
-
- if (group_by !== undefined) {
- localVarQueryParameter.group_by = group_by;
- }
-
- localVarUrlObj.query = Object.assign(
- {},
- localVarUrlObj.query,
- localVarQueryParameter,
- options.query
- );
- // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
- delete localVarUrlObj.search;
- localVarRequestOptions.headers = Object.assign(
- {},
- localVarHeaderParameter,
- options.headers
- );
-
- return {
- url: url.format(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- overviewGet(
- run: string,
- worker: string,
- span: string,
- options: any = {}
- ): FetchArgs {
- // verify required parameter 'run' is not null or undefined
- if (run === null || run === undefined) {
- throw new RequiredError(
- 'run',
- 'Required parameter run was null or undefined when calling overviewGet.'
- );
- }
- // verify required parameter 'worker' is not null or undefined
- if (worker === null || worker === undefined) {
- throw new RequiredError(
- 'worker',
- 'Required parameter worker was null or undefined when calling overviewGet.'
- );
- }
- // verify required parameter 'span' is not null or undefined
- if (span === null || span === undefined) {
- throw new RequiredError(
- 'span',
- 'Required parameter span was null or undefined when calling overviewGet.'
- );
- }
- const localVarPath = `/overview`;
- const localVarUrlObj = url.parse(localVarPath, true);
- const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
- const localVarHeaderParameter = {} as any;
- const localVarQueryParameter = {} as any;
-
- if (run !== undefined) {
- localVarQueryParameter.run = run;
- }
-
- if (worker !== undefined) {
- localVarQueryParameter.worker = worker;
- }
-
- if (span !== undefined) {
- localVarQueryParameter.span = span;
- }
-
- localVarUrlObj.query = Object.assign(
- {},
- localVarUrlObj.query,
- localVarQueryParameter,
- options.query
- );
- // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
- delete localVarUrlObj.search;
- localVarRequestOptions.headers = Object.assign(
- {},
- localVarHeaderParameter,
- options.headers
- );
-
- return {
- url: url.format(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- *
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- runsGet(options: any = {}): FetchArgs {
- const localVarPath = `/runs`;
- const localVarUrlObj = url.parse(localVarPath, true);
- const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
- const localVarHeaderParameter = {} as any;
- const localVarQueryParameter = {} as any;
-
- localVarUrlObj.query = Object.assign(
- {},
- localVarUrlObj.query,
- localVarQueryParameter,
- options.query
- );
- // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
- delete localVarUrlObj.search;
- localVarRequestOptions.headers = Object.assign(
- {},
- localVarHeaderParameter,
- options.headers
- );
-
- return {
- url: url.format(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- spansGet(run: string, worker: string, options: any = {}): FetchArgs {
- // verify required parameter 'run' is not null or undefined
- if (run === null || run === undefined) {
- throw new RequiredError(
- 'run',
- 'Required parameter run was null or undefined when calling spansGet.'
- );
- }
- // verify required parameter 'worker' is not null or undefined
- if (worker === null || worker === undefined) {
- throw new RequiredError(
- 'worker',
- 'Required parameter worker was null or undefined when calling spansGet.'
- );
- }
- const localVarPath = `/spans`;
- const localVarUrlObj = url.parse(localVarPath, true);
- const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
- const localVarHeaderParameter = {} as any;
- const localVarQueryParameter = {} as any;
-
- if (run !== undefined) {
- localVarQueryParameter.run = run;
- }
-
- if (worker !== undefined) {
- localVarQueryParameter.worker = worker;
- }
-
- localVarUrlObj.query = Object.assign(
- {},
- localVarUrlObj.query,
- localVarQueryParameter,
- options.query
- );
- // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
- delete localVarUrlObj.search;
- localVarRequestOptions.headers = Object.assign(
- {},
- localVarHeaderParameter,
- options.headers
- );
-
- return {
- url: url.format(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- traceGet(
- run: string,
- worker: string,
- span: string,
- options: any = {}
- ): FetchArgs {
- // verify required parameter 'run' is not null or undefined
- if (run === null || run === undefined) {
- throw new RequiredError(
- 'run',
- 'Required parameter run was null or undefined when calling traceGet.'
- );
- }
- // verify required parameter 'worker' is not null or undefined
- if (worker === null || worker === undefined) {
- throw new RequiredError(
- 'worker',
- 'Required parameter worker was null or undefined when calling traceGet.'
- );
- }
- // verify required parameter 'span' is not null or undefined
- if (span === null || span === undefined) {
- throw new RequiredError(
- 'span',
- 'Required parameter span was null or undefined when calling traceGet.'
- );
- }
- const localVarPath = `/trace`;
- const localVarUrlObj = url.parse(localVarPath, true);
- const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
- const localVarHeaderParameter = {} as any;
- const localVarQueryParameter = {} as any;
-
- if (run !== undefined) {
- localVarQueryParameter.run = run;
- }
-
- if (worker !== undefined) {
- localVarQueryParameter.worker = worker;
- }
-
- if (span !== undefined) {
- localVarQueryParameter.span = span;
- }
-
- localVarUrlObj.query = Object.assign(
- {},
- localVarUrlObj.query,
- localVarQueryParameter,
- options.query
- );
- // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
- delete localVarUrlObj.search;
- localVarRequestOptions.headers = Object.assign(
- {},
- localVarHeaderParameter,
- options.headers
- );
-
- return {
- url: url.format(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- treeGet(
- run: string,
- worker: string,
- span: string,
- options: any = {}
- ): FetchArgs {
- // verify required parameter 'run' is not null or undefined
- if (run === null || run === undefined) {
- throw new RequiredError(
- 'run',
- 'Required parameter run was null or undefined when calling treeGet.'
- );
- }
- // verify required parameter 'worker' is not null or undefined
- if (worker === null || worker === undefined) {
- throw new RequiredError(
- 'worker',
- 'Required parameter worker was null or undefined when calling treeGet.'
- );
- }
- // verify required parameter 'span' is not null or undefined
- if (span === null || span === undefined) {
- throw new RequiredError(
- 'span',
- 'Required parameter span was null or undefined when calling treeGet.'
- );
- }
- const localVarPath = `/tree`;
- const localVarUrlObj = url.parse(localVarPath, true);
- const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
- const localVarHeaderParameter = {} as any;
- const localVarQueryParameter = {} as any;
-
- if (run !== undefined) {
- localVarQueryParameter.run = run;
- }
-
- if (worker !== undefined) {
- localVarQueryParameter.worker = worker;
- }
-
- if (span !== undefined) {
- localVarQueryParameter.span = span;
- }
-
- localVarUrlObj.query = Object.assign(
- {},
- localVarUrlObj.query,
- localVarQueryParameter,
- options.query
- );
- // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
- delete localVarUrlObj.search;
- localVarRequestOptions.headers = Object.assign(
- {},
- localVarHeaderParameter,
- options.headers
- );
-
- return {
- url: url.format(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- *
- * @param {string} run
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- viewsGet(run: string, options: any = {}): FetchArgs {
- // verify required parameter 'run' is not null or undefined
- if (run === null || run === undefined) {
- throw new RequiredError(
- 'run',
- 'Required parameter run was null or undefined when calling viewsGet.'
- );
- }
- const localVarPath = `/views`;
- const localVarUrlObj = url.parse(localVarPath, true);
- const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
- const localVarHeaderParameter = {} as any;
- const localVarQueryParameter = {} as any;
-
- if (run !== undefined) {
- localVarQueryParameter.run = run;
- }
-
- localVarUrlObj.query = Object.assign(
- {},
- localVarUrlObj.query,
- localVarQueryParameter,
- options.query
- );
- // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
- delete localVarUrlObj.search;
- localVarRequestOptions.headers = Object.assign(
- {},
- localVarHeaderParameter,
- options.headers
- );
-
- return {
- url: url.format(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- /**
- *
- * @param {string} run
- * @param {string} view
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- workersGet(run: string, view: string, options: any = {}): FetchArgs {
- // verify required parameter 'run' is not null or undefined
- if (run === null || run === undefined) {
- throw new RequiredError(
- 'run',
- 'Required parameter run was null or undefined when calling workersGet.'
- );
- }
- // verify required parameter 'view' is not null or undefined
- if (view === null || view === undefined) {
- throw new RequiredError(
- 'view',
- 'Required parameter view was null or undefined when calling workersGet.'
- );
- }
- const localVarPath = `/workers`;
- const localVarUrlObj = url.parse(localVarPath, true);
- const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
- const localVarHeaderParameter = {} as any;
- const localVarQueryParameter = {} as any;
-
- if (run !== undefined) {
- localVarQueryParameter.run = run;
- }
-
- if (view !== undefined) {
- localVarQueryParameter.view = view;
- }
-
- localVarUrlObj.query = Object.assign(
- {},
- localVarUrlObj.query,
- localVarQueryParameter,
- options.query
- );
- // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
- delete localVarUrlObj.search;
- localVarRequestOptions.headers = Object.assign(
- {},
- localVarHeaderParameter,
- options.headers
- );
-
- return {
- url: url.format(localVarUrlObj),
- options: localVarRequestOptions,
- };
- },
- };
-};
-
-/**
- * DefaultApi - functional programming interface
- * @export
- */
-export const DefaultApiFp = function (configuration?: Configuration) {
- return {
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {string} exp_run
- * @param {string} exp_worker
- * @param {string} exp_span
- * @param {string} [path]
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- diffnodeGet(
- run: string,
- worker: string,
- span: string,
- exp_run: string,
- exp_worker: string,
- exp_span: string,
- path?: string,
- options?: any
- ): (fetch?: FetchAPI, basePath?: string) => Promise {
- const localVarFetchArgs = DefaultApiFetchParamCreator(
- configuration
- ).diffnodeGet(
- run,
- worker,
- span,
- exp_run,
- exp_worker,
- exp_span,
- path,
- options
- );
- return (
- fetch: FetchAPI = portableFetch,
- basePath: string = BASE_PATH
- ) => {
- return fetch(
- basePath + localVarFetchArgs.url,
- localVarFetchArgs.options
- ).then((response) => {
- if (response.status >= 200 && response.status < 300) {
- return response.json();
- } else {
- throw response;
- }
- });
- };
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- distributedCommopsGet(
- run: string,
- worker: string,
- span: string,
- options?: any
- ): (fetch?: FetchAPI, basePath?: string) => Promise {
- const localVarFetchArgs = DefaultApiFetchParamCreator(
- configuration
- ).distributedCommopsGet(run, worker, span, options);
- return (
- fetch: FetchAPI = portableFetch,
- basePath: string = BASE_PATH
- ) => {
- return fetch(
- basePath + localVarFetchArgs.url,
- localVarFetchArgs.options
- ).then((response) => {
- if (response.status >= 200 && response.status < 300) {
- return response.json();
- } else {
- throw response;
- }
- });
- };
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- distributedGpuinfoGet(
- run: string,
- worker: string,
- span: string,
- options?: any
- ): (fetch?: FetchAPI, basePath?: string) => Promise {
- const localVarFetchArgs = DefaultApiFetchParamCreator(
- configuration
- ).distributedGpuinfoGet(run, worker, span, options);
- return (
- fetch: FetchAPI = portableFetch,
- basePath: string = BASE_PATH
- ) => {
- return fetch(
- basePath + localVarFetchArgs.url,
- localVarFetchArgs.options
- ).then((response) => {
- if (response.status >= 200 && response.status < 300) {
- return response.json();
- } else {
- throw response;
- }
- });
- };
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- distributedOverlapGet(
- run: string,
- worker: string,
- span: string,
- options?: any
- ): (fetch?: FetchAPI, basePath?: string) => Promise {
- const localVarFetchArgs = DefaultApiFetchParamCreator(
- configuration
- ).distributedOverlapGet(run, worker, span, options);
- return (
- fetch: FetchAPI = portableFetch,
- basePath: string = BASE_PATH
- ) => {
- return fetch(
- basePath + localVarFetchArgs.url,
- localVarFetchArgs.options
- ).then((response) => {
- if (response.status >= 200 && response.status < 300) {
- return response.json();
- } else {
- throw response;
- }
- });
- };
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- distributedWaittimeGet(
- run: string,
- worker: string,
- span: string,
- options?: any
- ): (fetch?: FetchAPI, basePath?: string) => Promise {
- const localVarFetchArgs = DefaultApiFetchParamCreator(
- configuration
- ).distributedWaittimeGet(run, worker, span, options);
- return (
- fetch: FetchAPI = portableFetch,
- basePath: string = BASE_PATH
- ) => {
- return fetch(
- basePath + localVarFetchArgs.url,
- localVarFetchArgs.options
- ).then((response) => {
- if (response.status >= 200 && response.status < 300) {
- return response.json();
- } else {
- throw response;
- }
- });
- };
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {string} group_by Group By
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- kernelGet(
- run: string,
- worker: string,
- span: string,
- group_by: string,
- options?: any
- ): (fetch?: FetchAPI, basePath?: string) => Promise {
- const localVarFetchArgs = DefaultApiFetchParamCreator(
- configuration
- ).kernelGet(run, worker, span, group_by, options);
- return (
- fetch: FetchAPI = portableFetch,
- basePath: string = BASE_PATH
- ) => {
- return fetch(
- basePath + localVarFetchArgs.url,
- localVarFetchArgs.options
- ).then((response) => {
- if (response.status >= 200 && response.status < 300) {
- return response.json();
- } else {
- throw response;
- }
- });
- };
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {string} [group_by] Group By
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- kernelTableGet(
- run: string,
- worker: string,
- span: string,
- group_by?: string,
- options?: any
- ): (fetch?: FetchAPI, basePath?: string) => Promise {
- const localVarFetchArgs = DefaultApiFetchParamCreator(
- configuration
- ).kernelTableGet(run, worker, span, group_by, options);
- return (
- fetch: FetchAPI = portableFetch,
- basePath: string = BASE_PATH
- ) => {
- return fetch(
- basePath + localVarFetchArgs.url,
- localVarFetchArgs.options
- ).then((response) => {
- if (response.status >= 200 && response.status < 300) {
- return response.json();
- } else {
- throw response;
- }
- });
- };
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- kernelTcPieGet(
- run: string,
- worker: string,
- span: string,
- options?: any
- ): (fetch?: FetchAPI, basePath?: string) => Promise {
- const localVarFetchArgs = DefaultApiFetchParamCreator(
- configuration
- ).kernelTcPieGet(run, worker, span, options);
- return (
- fetch: FetchAPI = portableFetch,
- basePath: string = BASE_PATH
- ) => {
- return fetch(
- basePath + localVarFetchArgs.url,
- localVarFetchArgs.options
- ).then((response) => {
- if (response.status >= 200 && response.status < 300) {
- return response.json();
- } else {
- throw response;
- }
- });
- };
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- memoryCurveGet(
- run: string,
- worker: string,
- span: string,
- options?: any
- ): (
- fetch?: FetchAPI,
- basePath?: string
- ) => Promise {
- const localVarFetchArgs = DefaultApiFetchParamCreator(
- configuration
- ).memoryCurveGet(run, worker, span, options);
- return (
- fetch: FetchAPI = portableFetch,
- basePath: string = BASE_PATH
- ) => {
- return fetch(
- basePath + localVarFetchArgs.url,
- localVarFetchArgs.options
- ).then((response) => {
- if (response.status >= 200 && response.status < 300) {
- return response.json();
- } else {
- throw response;
- }
- });
- };
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {number} [start_ts]
- * @param {number} [end_ts]
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- memoryEventsGet(
- run: string,
- worker: string,
- span: string,
- start_ts?: number,
- end_ts?: number,
- options?: any
- ): (
- fetch?: FetchAPI,
- basePath?: string
- ) => Promise {
- const localVarFetchArgs = DefaultApiFetchParamCreator(
- configuration
- ).memoryEventsGet(run, worker, span, start_ts, end_ts, options);
- return (
- fetch: FetchAPI = portableFetch,
- basePath: string = BASE_PATH
- ) => {
- return fetch(
- basePath + localVarFetchArgs.url,
- localVarFetchArgs.options
- ).then((response) => {
- if (response.status >= 200 && response.status < 300) {
- return response.json();
- } else {
- throw response;
- }
- });
- };
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {number} [start_ts]
- * @param {number} [end_ts]
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- memoryGet(
- run: string,
- worker: string,
- span: string,
- start_ts?: number,
- end_ts?: number,
- options?: any
- ): (fetch?: FetchAPI, basePath?: string) => Promise {
- const localVarFetchArgs = DefaultApiFetchParamCreator(
- configuration
- ).memoryGet(run, worker, span, start_ts, end_ts, options);
- return (
- fetch: FetchAPI = portableFetch,
- basePath: string = BASE_PATH
- ) => {
- return fetch(
- basePath + localVarFetchArgs.url,
- localVarFetchArgs.options
- ).then((response) => {
- if (response.status >= 200 && response.status < 300) {
- return response.json();
- } else {
- throw response;
- }
- });
- };
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- moduleGet(
- run: string,
- worker: string,
- span: string,
- options?: any
- ): (fetch?: FetchAPI, basePath?: string) => Promise {
- const localVarFetchArgs = DefaultApiFetchParamCreator(
- configuration
- ).moduleGet(run, worker, span, options);
- return (
- fetch: FetchAPI = portableFetch,
- basePath: string = BASE_PATH
- ) => {
- return fetch(
- basePath + localVarFetchArgs.url,
- localVarFetchArgs.options
- ).then((response) => {
- if (response.status >= 200 && response.status < 300) {
- return response.json();
- } else {
- throw response;
- }
- });
- };
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {string} group_by Group By
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- operationGet(
- run: string,
- worker: string,
- span: string,
- group_by: string,
- options?: any
- ): (fetch?: FetchAPI, basePath?: string) => Promise {
- const localVarFetchArgs = DefaultApiFetchParamCreator(
- configuration
- ).operationGet(run, worker, span, group_by, options);
- return (
- fetch: FetchAPI = portableFetch,
- basePath: string = BASE_PATH
- ) => {
- return fetch(
- basePath + localVarFetchArgs.url,
- localVarFetchArgs.options
- ).then((response) => {
- if (response.status >= 200 && response.status < 300) {
- return response.json();
- } else {
- throw response;
- }
- });
- };
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {string} group_by Group By
- * @param {string} op_name
- * @param {string} [input_shape]
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- operationStackGet(
- run: string,
- worker: string,
- span: string,
- group_by: string,
- op_name: string,
- input_shape?: string,
- options?: any
- ): (fetch?: FetchAPI, basePath?: string) => Promise {
- const localVarFetchArgs = DefaultApiFetchParamCreator(
- configuration
- ).operationStackGet(
- run,
- worker,
- span,
- group_by,
- op_name,
- input_shape,
- options
- );
- return (
- fetch: FetchAPI = portableFetch,
- basePath: string = BASE_PATH
- ) => {
- return fetch(
- basePath + localVarFetchArgs.url,
- localVarFetchArgs.options
- ).then((response) => {
- if (response.status >= 200 && response.status < 300) {
- return response.json();
- } else {
- throw response;
- }
- });
- };
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {string} group_by Group By
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- operationTableGet(
- run: string,
- worker: string,
- span: string,
- group_by: string,
- options?: any
- ): (fetch?: FetchAPI, basePath?: string) => Promise {
- const localVarFetchArgs = DefaultApiFetchParamCreator(
- configuration
- ).operationTableGet(run, worker, span, group_by, options);
- return (
- fetch: FetchAPI = portableFetch,
- basePath: string = BASE_PATH
- ) => {
- return fetch(
- basePath + localVarFetchArgs.url,
- localVarFetchArgs.options
- ).then((response) => {
- if (response.status >= 200 && response.status < 300) {
- return response.json();
- } else {
- throw response;
- }
- });
- };
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- overviewGet(
- run: string,
- worker: string,
- span: string,
- options?: any
- ): (fetch?: FetchAPI, basePath?: string) => Promise {
- const localVarFetchArgs = DefaultApiFetchParamCreator(
- configuration
- ).overviewGet(run, worker, span, options);
- return (
- fetch: FetchAPI = portableFetch,
- basePath: string = BASE_PATH
- ) => {
- return fetch(
- basePath + localVarFetchArgs.url,
- localVarFetchArgs.options
- ).then((response) => {
- if (response.status >= 200 && response.status < 300) {
- return response.json();
- } else {
- throw response;
- }
- });
- };
- },
- /**
- *
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- runsGet(
- options?: any
- ): (fetch?: FetchAPI, basePath?: string) => Promise {
- const localVarFetchArgs =
- DefaultApiFetchParamCreator(configuration).runsGet(options);
- return (
- fetch: FetchAPI = portableFetch,
- basePath: string = BASE_PATH
- ) => {
- return fetch(
- basePath + localVarFetchArgs.url,
- localVarFetchArgs.options
- ).then((response) => {
- if (response.status >= 200 && response.status < 300) {
- return response.json();
- } else {
- throw response;
- }
- });
- };
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- spansGet(
- run: string,
- worker: string,
- options?: any
- ): (fetch?: FetchAPI, basePath?: string) => Promise> {
- const localVarFetchArgs = DefaultApiFetchParamCreator(
- configuration
- ).spansGet(run, worker, options);
- return (
- fetch: FetchAPI = portableFetch,
- basePath: string = BASE_PATH
- ) => {
- return fetch(
- basePath + localVarFetchArgs.url,
- localVarFetchArgs.options
- ).then((response) => {
- if (response.status >= 200 && response.status < 300) {
- return response.json();
- } else {
- throw response;
- }
- });
- };
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- traceGet(
- run: string,
- worker: string,
- span: string,
- options?: any
- ): (fetch?: FetchAPI, basePath?: string) => Promise {
- const localVarFetchArgs = DefaultApiFetchParamCreator(
- configuration
- ).traceGet(run, worker, span, options);
- return (
- fetch: FetchAPI = portableFetch,
- basePath: string = BASE_PATH
- ) => {
- return fetch(
- basePath + localVarFetchArgs.url,
- localVarFetchArgs.options
- ).then((response) => {
- if (response.status >= 200 && response.status < 300) {
- return response.json();
- } else {
- throw response;
- }
- });
- };
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- treeGet(
- run: string,
- worker: string,
- span: string,
- options?: any
- ): (fetch?: FetchAPI, basePath?: string) => Promise {
- const localVarFetchArgs = DefaultApiFetchParamCreator(
- configuration
- ).treeGet(run, worker, span, options);
- return (
- fetch: FetchAPI = portableFetch,
- basePath: string = BASE_PATH
- ) => {
- return fetch(
- basePath + localVarFetchArgs.url,
- localVarFetchArgs.options
- ).then((response) => {
- if (response.status >= 200 && response.status < 300) {
- return response.json();
- } else {
- throw response;
- }
- });
- };
- },
- /**
- *
- * @param {string} run
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- viewsGet(
- run: string,
- options?: any
- ): (fetch?: FetchAPI, basePath?: string) => Promise {
- const localVarFetchArgs = DefaultApiFetchParamCreator(
- configuration
- ).viewsGet(run, options);
- return (
- fetch: FetchAPI = portableFetch,
- basePath: string = BASE_PATH
- ) => {
- return fetch(
- basePath + localVarFetchArgs.url,
- localVarFetchArgs.options
- ).then((response) => {
- if (response.status >= 200 && response.status < 300) {
- return response.json();
- } else {
- throw response;
- }
- });
- };
- },
- /**
- *
- * @param {string} run
- * @param {string} view
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- workersGet(
- run: string,
- view: string,
- options?: any
- ): (fetch?: FetchAPI, basePath?: string) => Promise> {
- const localVarFetchArgs = DefaultApiFetchParamCreator(
- configuration
- ).workersGet(run, view, options);
- return (
- fetch: FetchAPI = portableFetch,
- basePath: string = BASE_PATH
- ) => {
- return fetch(
- basePath + localVarFetchArgs.url,
- localVarFetchArgs.options
- ).then((response) => {
- if (response.status >= 200 && response.status < 300) {
- return response.json();
- } else {
- throw response;
- }
- });
- };
- },
- };
-};
-
-/**
- * DefaultApi - factory interface
- * @export
- */
-export const DefaultApiFactory = function (
- configuration?: Configuration,
- fetch?: FetchAPI,
- basePath?: string
-) {
- return {
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {string} exp_run
- * @param {string} exp_worker
- * @param {string} exp_span
- * @param {string} [path]
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- diffnodeGet(
- run: string,
- worker: string,
- span: string,
- exp_run: string,
- exp_worker: string,
- exp_span: string,
- path?: string,
- options?: any
- ) {
- return DefaultApiFp(configuration).diffnodeGet(
- run,
- worker,
- span,
- exp_run,
- exp_worker,
- exp_span,
- path,
- options
- )(fetch, basePath);
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- distributedCommopsGet(
- run: string,
- worker: string,
- span: string,
- options?: any
- ) {
- return DefaultApiFp(configuration).distributedCommopsGet(
- run,
- worker,
- span,
- options
- )(fetch, basePath);
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- distributedGpuinfoGet(
- run: string,
- worker: string,
- span: string,
- options?: any
- ) {
- return DefaultApiFp(configuration).distributedGpuinfoGet(
- run,
- worker,
- span,
- options
- )(fetch, basePath);
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- distributedOverlapGet(
- run: string,
- worker: string,
- span: string,
- options?: any
- ) {
- return DefaultApiFp(configuration).distributedOverlapGet(
- run,
- worker,
- span,
- options
- )(fetch, basePath);
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- distributedWaittimeGet(
- run: string,
- worker: string,
- span: string,
- options?: any
- ) {
- return DefaultApiFp(configuration).distributedWaittimeGet(
- run,
- worker,
- span,
- options
- )(fetch, basePath);
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {string} group_by Group By
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- kernelGet(
- run: string,
- worker: string,
- span: string,
- group_by: string,
- options?: any
- ) {
- return DefaultApiFp(configuration).kernelGet(
- run,
- worker,
- span,
- group_by,
- options
- )(fetch, basePath);
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {string} [group_by] Group By
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- kernelTableGet(
- run: string,
- worker: string,
- span: string,
- group_by?: string,
- options?: any
- ) {
- return DefaultApiFp(configuration).kernelTableGet(
- run,
- worker,
- span,
- group_by,
- options
- )(fetch, basePath);
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- kernelTcPieGet(run: string, worker: string, span: string, options?: any) {
- return DefaultApiFp(configuration).kernelTcPieGet(
- run,
- worker,
- span,
- options
- )(fetch, basePath);
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- memoryCurveGet(run: string, worker: string, span: string, options?: any) {
- return DefaultApiFp(configuration).memoryCurveGet(
- run,
- worker,
- span,
- options
- )(fetch, basePath);
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {number} [start_ts]
- * @param {number} [end_ts]
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- memoryEventsGet(
- run: string,
- worker: string,
- span: string,
- start_ts?: number,
- end_ts?: number,
- options?: any
- ) {
- return DefaultApiFp(configuration).memoryEventsGet(
- run,
- worker,
- span,
- start_ts,
- end_ts,
- options
- )(fetch, basePath);
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {number} [start_ts]
- * @param {number} [end_ts]
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- memoryGet(
- run: string,
- worker: string,
- span: string,
- start_ts?: number,
- end_ts?: number,
- options?: any
- ) {
- return DefaultApiFp(configuration).memoryGet(
- run,
- worker,
- span,
- start_ts,
- end_ts,
- options
- )(fetch, basePath);
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- moduleGet(run: string, worker: string, span: string, options?: any) {
- return DefaultApiFp(configuration).moduleGet(
- run,
- worker,
- span,
- options
- )(fetch, basePath);
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {string} group_by Group By
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- operationGet(
- run: string,
- worker: string,
- span: string,
- group_by: string,
- options?: any
- ) {
- return DefaultApiFp(configuration).operationGet(
- run,
- worker,
- span,
- group_by,
- options
- )(fetch, basePath);
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {string} group_by Group By
- * @param {string} op_name
- * @param {string} [input_shape]
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- operationStackGet(
- run: string,
- worker: string,
- span: string,
- group_by: string,
- op_name: string,
- input_shape?: string,
- options?: any
- ) {
- return DefaultApiFp(configuration).operationStackGet(
- run,
- worker,
- span,
- group_by,
- op_name,
- input_shape,
- options
- )(fetch, basePath);
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {string} group_by Group By
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- operationTableGet(
- run: string,
- worker: string,
- span: string,
- group_by: string,
- options?: any
- ) {
- return DefaultApiFp(configuration).operationTableGet(
- run,
- worker,
- span,
- group_by,
- options
- )(fetch, basePath);
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- overviewGet(run: string, worker: string, span: string, options?: any) {
- return DefaultApiFp(configuration).overviewGet(
- run,
- worker,
- span,
- options
- )(fetch, basePath);
- },
- /**
- *
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- runsGet(options?: any) {
- return DefaultApiFp(configuration).runsGet(options)(fetch, basePath);
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- spansGet(run: string, worker: string, options?: any) {
- return DefaultApiFp(configuration).spansGet(
- run,
- worker,
- options
- )(fetch, basePath);
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- traceGet(run: string, worker: string, span: string, options?: any) {
- return DefaultApiFp(configuration).traceGet(
- run,
- worker,
- span,
- options
- )(fetch, basePath);
- },
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- treeGet(run: string, worker: string, span: string, options?: any) {
- return DefaultApiFp(configuration).treeGet(
- run,
- worker,
- span,
- options
- )(fetch, basePath);
- },
- /**
- *
- * @param {string} run
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- viewsGet(run: string, options?: any) {
- return DefaultApiFp(configuration).viewsGet(run, options)(
- fetch,
- basePath
- );
- },
- /**
- *
- * @param {string} run
- * @param {string} view
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- */
- workersGet(run: string, view: string, options?: any) {
- return DefaultApiFp(configuration).workersGet(
- run,
- view,
- options
- )(fetch, basePath);
- },
- };
-};
-
-/**
- * DefaultApi - object-oriented interface
- * @export
- * @class DefaultApi
- * @extends {BaseAPI}
- */
-export class DefaultApi extends BaseAPI {
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {string} exp_run
- * @param {string} exp_worker
- * @param {string} exp_span
- * @param {string} [path]
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- * @memberof DefaultApi
- */
- public diffnodeGet(
- run: string,
- worker: string,
- span: string,
- exp_run: string,
- exp_worker: string,
- exp_span: string,
- path?: string,
- options?: any
- ) {
- return DefaultApiFp(this.configuration).diffnodeGet(
- run,
- worker,
- span,
- exp_run,
- exp_worker,
- exp_span,
- path,
- options
- )(this.fetch, this.basePath);
- }
-
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- * @memberof DefaultApi
- */
- public distributedCommopsGet(
- run: string,
- worker: string,
- span: string,
- options?: any
- ) {
- return DefaultApiFp(this.configuration).distributedCommopsGet(
- run,
- worker,
- span,
- options
- )(this.fetch, this.basePath);
- }
-
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- * @memberof DefaultApi
- */
- public distributedGpuinfoGet(
- run: string,
- worker: string,
- span: string,
- options?: any
- ) {
- return DefaultApiFp(this.configuration).distributedGpuinfoGet(
- run,
- worker,
- span,
- options
- )(this.fetch, this.basePath);
- }
-
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- * @memberof DefaultApi
- */
- public distributedOverlapGet(
- run: string,
- worker: string,
- span: string,
- options?: any
- ) {
- return DefaultApiFp(this.configuration).distributedOverlapGet(
- run,
- worker,
- span,
- options
- )(this.fetch, this.basePath);
- }
-
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- * @memberof DefaultApi
- */
- public distributedWaittimeGet(
- run: string,
- worker: string,
- span: string,
- options?: any
- ) {
- return DefaultApiFp(this.configuration).distributedWaittimeGet(
- run,
- worker,
- span,
- options
- )(this.fetch, this.basePath);
- }
-
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {string} group_by Group By
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- * @memberof DefaultApi
- */
- public kernelGet(
- run: string,
- worker: string,
- span: string,
- group_by: string,
- options?: any
- ) {
- return DefaultApiFp(this.configuration).kernelGet(
- run,
- worker,
- span,
- group_by,
- options
- )(this.fetch, this.basePath);
- }
-
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {string} [group_by] Group By
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- * @memberof DefaultApi
- */
- public kernelTableGet(
- run: string,
- worker: string,
- span: string,
- group_by?: string,
- options?: any
- ) {
- return DefaultApiFp(this.configuration).kernelTableGet(
- run,
- worker,
- span,
- group_by,
- options
- )(this.fetch, this.basePath);
- }
-
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- * @memberof DefaultApi
- */
- public kernelTcPieGet(
- run: string,
- worker: string,
- span: string,
- options?: any
- ) {
- return DefaultApiFp(this.configuration).kernelTcPieGet(
- run,
- worker,
- span,
- options
- )(this.fetch, this.basePath);
- }
-
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- * @memberof DefaultApi
- */
- public memoryCurveGet(
- run: string,
- worker: string,
- span: string,
- options?: any
- ) {
- return DefaultApiFp(this.configuration).memoryCurveGet(
- run,
- worker,
- span,
- options
- )(this.fetch, this.basePath);
- }
-
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {number} [start_ts]
- * @param {number} [end_ts]
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- * @memberof DefaultApi
- */
- public memoryEventsGet(
- run: string,
- worker: string,
- span: string,
- start_ts?: number,
- end_ts?: number,
- options?: any
- ) {
- return DefaultApiFp(this.configuration).memoryEventsGet(
- run,
- worker,
- span,
- start_ts,
- end_ts,
- options
- )(this.fetch, this.basePath);
- }
-
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {number} [start_ts]
- * @param {number} [end_ts]
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- * @memberof DefaultApi
- */
- public memoryGet(
- run: string,
- worker: string,
- span: string,
- start_ts?: number,
- end_ts?: number,
- options?: any
- ) {
- return DefaultApiFp(this.configuration).memoryGet(
- run,
- worker,
- span,
- start_ts,
- end_ts,
- options
- )(this.fetch, this.basePath);
- }
-
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- * @memberof DefaultApi
- */
- public moduleGet(run: string, worker: string, span: string, options?: any) {
- return DefaultApiFp(this.configuration).moduleGet(
- run,
- worker,
- span,
- options
- )(this.fetch, this.basePath);
- }
-
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {string} group_by Group By
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- * @memberof DefaultApi
- */
- public operationGet(
- run: string,
- worker: string,
- span: string,
- group_by: string,
- options?: any
- ) {
- return DefaultApiFp(this.configuration).operationGet(
- run,
- worker,
- span,
- group_by,
- options
- )(this.fetch, this.basePath);
- }
-
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {string} group_by Group By
- * @param {string} op_name
- * @param {string} [input_shape]
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- * @memberof DefaultApi
- */
- public operationStackGet(
- run: string,
- worker: string,
- span: string,
- group_by: string,
- op_name: string,
- input_shape?: string,
- options?: any
- ) {
- return DefaultApiFp(this.configuration).operationStackGet(
- run,
- worker,
- span,
- group_by,
- op_name,
- input_shape,
- options
- )(this.fetch, this.basePath);
- }
-
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {string} group_by Group By
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- * @memberof DefaultApi
- */
- public operationTableGet(
- run: string,
- worker: string,
- span: string,
- group_by: string,
- options?: any
- ) {
- return DefaultApiFp(this.configuration).operationTableGet(
- run,
- worker,
- span,
- group_by,
- options
- )(this.fetch, this.basePath);
- }
-
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- * @memberof DefaultApi
- */
- public overviewGet(run: string, worker: string, span: string, options?: any) {
- return DefaultApiFp(this.configuration).overviewGet(
- run,
- worker,
- span,
- options
- )(this.fetch, this.basePath);
- }
-
- /**
- *
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- * @memberof DefaultApi
- */
- public runsGet(options?: any) {
- return DefaultApiFp(this.configuration).runsGet(options)(
- this.fetch,
- this.basePath
- );
- }
-
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- * @memberof DefaultApi
- */
- public spansGet(run: string, worker: string, options?: any) {
- return DefaultApiFp(this.configuration).spansGet(
- run,
- worker,
- options
- )(this.fetch, this.basePath);
- }
-
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- * @memberof DefaultApi
- */
- public traceGet(run: string, worker: string, span: string, options?: any) {
- return DefaultApiFp(this.configuration).traceGet(
- run,
- worker,
- span,
- options
- )(this.fetch, this.basePath);
- }
-
- /**
- *
- * @param {string} run
- * @param {string} worker
- * @param {string} span
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- * @memberof DefaultApi
- */
- public treeGet(run: string, worker: string, span: string, options?: any) {
- return DefaultApiFp(this.configuration).treeGet(
- run,
- worker,
- span,
- options
- )(this.fetch, this.basePath);
- }
-
- /**
- *
- * @param {string} run
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- * @memberof DefaultApi
- */
- public viewsGet(run: string, options?: any) {
- return DefaultApiFp(this.configuration).viewsGet(run, options)(
- this.fetch,
- this.basePath
- );
- }
-
- /**
- *
- * @param {string} run
- * @param {string} view
- * @param {*} [options] Override http request option.
- * @throws {RequiredError}
- * @memberof DefaultApi
- */
- public workersGet(run: string, view: string, options?: any) {
- return DefaultApiFp(this.configuration).workersGet(
- run,
- view,
- options
- )(this.fetch, this.basePath);
- }
-}
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/api/generated/configuration.ts b/plugins/tensorboard-plugins/tb_plugin/fe/src/api/generated/configuration.ts
deleted file mode 100644
index 85b77bf651c049ec5a2ec85379414f619904c6dd..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/api/generated/configuration.ts
+++ /dev/null
@@ -1,68 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-// tslint:disable
-/**
- * Pytorch profile API
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
- *
- * OpenAPI spec version: 1.0.0
- *
- *
- * NOTE: This file is auto generated by the swagger code generator program.
- * https://github.com/swagger-api/swagger-codegen.git
- * Do not edit the file manually.
- */
-export interface ConfigurationParameters {
- apiKey?: string | ((name: string) => string);
- username?: string;
- password?: string;
- accessToken?: string | ((name: string, scopes?: string[]) => string);
- basePath?: string;
-}
-
-export class Configuration {
- /**
- * parameter for apiKey security
- * @param name security name
- * @memberof Configuration
- */
- apiKey?: string | ((name: string) => string);
- /**
- * parameter for basic security
- *
- * @type {string}
- * @memberof Configuration
- */
- username?: string;
- /**
- * parameter for basic security
- *
- * @type {string}
- * @memberof Configuration
- */
- password?: string;
- /**
- * parameter for oauth2 security
- * @param name security name
- * @param scopes oauth2 scope
- * @memberof Configuration
- */
- accessToken?: string | ((name: string, scopes?: string[]) => string);
- /**
- * override base path
- *
- * @type {string}
- * @memberof Configuration
- */
- basePath?: string;
-
- constructor(param: ConfigurationParameters = {}) {
- this.apiKey = param.apiKey;
- this.username = param.username;
- this.password = param.password;
- this.accessToken = param.accessToken;
- this.basePath = param.basePath;
- }
-}
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/api/generated/custom.d.ts b/plugins/tensorboard-plugins/tb_plugin/fe/src/api/generated/custom.d.ts
deleted file mode 100644
index 992af468898f15bee4f609a8cb752e21f0a9ad48..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/api/generated/custom.d.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-declare module 'portable-fetch';
-declare module 'url';
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/api/generated/index.ts b/plugins/tensorboard-plugins/tb_plugin/fe/src/api/generated/index.ts
deleted file mode 100644
index 7ad784e60de2777174cea9d902ad9cf2550fad68..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/api/generated/index.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-// tslint:disable
-/**
- * Pytorch profile API
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
- *
- * OpenAPI spec version: 1.0.0
- *
- *
- * NOTE: This file is auto generated by the swagger code generator program.
- * https://github.com/swagger-api/swagger-codegen.git
- * Do not edit the file manually.
- */
-export * from './api';
-export * from './configuration';
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/api/index.ts b/plugins/tensorboard-plugins/tb_plugin/fe/src/api/index.ts
deleted file mode 100644
index 98b35abfbc09785ffa09b1bbaa48c73685ec84f5..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/api/index.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-import * as api from './generated';
-
-export const defaultApi = new api.DefaultApi(undefined, undefined, fetch);
-export * from './generated/api';
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/api/mock.ts b/plugins/tensorboard-plugins/tb_plugin/fe/src/api/mock.ts
deleted file mode 100644
index 4b4b447d97192b7c7c00784dd9176faeed25d64b..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/api/mock.ts
+++ /dev/null
@@ -1,6684 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-export class MockAPI {
- runsGet() {
- return {
- runs: ['resnet50_num_workers_0', 'resnet50_num_workers_4'],
- loading: false,
- };
- }
-
- viewsGet(run: string) {
- return Promise.resolve([
- 'Overview',
- 'Operator',
- 'Kernel',
- 'Trace',
- 'Memory',
- ]);
- }
-
- spansGet(run: string, view: string): Promise {
- return Promise.resolve(['1', '2']);
- }
-
- workersGet(run: string, view: string): Promise {
- return Promise.resolve(['worker0']);
- }
-
- overviewGet(run: string, worker: string, span: string) {
- return Promise.resolve({
- steps: {
- columns: [
- { type: 'string', name: 'Step' },
- { type: 'number', name: 'Kernel' },
- { type: 'string', role: 'tooltip', p: { html: 'true' } },
- { type: 'number', name: 'Memcpy' },
- { type: 'string', role: 'tooltip', p: { html: 'true' } },
- { type: 'number', name: 'Memset' },
- { type: 'string', role: 'tooltip', p: { html: 'true' } },
- { type: 'number', name: 'Runtime' },
- { type: 'string', role: 'tooltip', p: { html: 'true' } },
- { type: 'number', name: 'DataLoader' },
- { type: 'string', role: 'tooltip', p: { html: 'true' } },
- { type: 'number', name: 'CPU Exec' },
- { type: 'string', role: 'tooltip', p: { html: 'true' } },
- { type: 'number', name: 'Other' },
- { type: 'string', role: 'tooltip', p: { html: 'true' } },
- ],
- rows: [
- [
- '5',
- 98598,
- 'Step 5 Total: 187948usKernel: 98598us Percentage: 52.46%
',
- 1941,
- 'Step 5 Total: 187948usMemcpy: 1941us Percentage: 1.03%
',
- 90,
- 'Step 5 Total: 187948usMemset: 90us Percentage: 0.05%
',
- 2796,
- 'Step 5 Total: 187948usRuntime: 2796us Percentage: 1.49%
',
- 69317,
- 'Step 5 Total: 187948usDataLoader: 69317us Percentage: 36.88%
',
- 14091,
- 'Step 5 Total: 187948usCPU Exec: 14091us Percentage: 7.5%
',
- 1115,
- 'Step 5 Total: 187948usOther: 1115us Percentage: 0.59%
',
- ],
- [
- '6',
- 98570,
- 'Step 6 Total: 175153usKernel: 98570us Percentage: 56.28%
',
- 1947,
- 'Step 6 Total: 175153usMemcpy: 1947us Percentage: 1.11%
',
- 89,
- 'Step 6 Total: 175153usMemset: 89us Percentage: 0.05%
',
- 2762,
- 'Step 6 Total: 175153usRuntime: 2762us Percentage: 1.58%
',
- 57669,
- 'Step 6 Total: 175153usDataLoader: 57669us Percentage: 32.92%
',
- 12968,
- 'Step 6 Total: 175153usCPU Exec: 12968us Percentage: 7.4%
',
- 1148,
- 'Step 6 Total: 175153usOther: 1148us Percentage: 0.66%
',
- ],
- [
- '7',
- 98596,
- 'Step 7 Total: 179733usKernel: 98596us Percentage: 54.86%
',
- 1931,
- 'Step 7 Total: 179733usMemcpy: 1931us Percentage: 1.07%
',
- 91,
- 'Step 7 Total: 179733usMemset: 91us Percentage: 0.05%
',
- 2877,
- 'Step 7 Total: 179733usRuntime: 2877us Percentage: 1.6%
',
- 61257,
- 'Step 7 Total: 179733usDataLoader: 61257us Percentage: 34.08%
',
- 13768,
- 'Step 7 Total: 179733usCPU Exec: 13768us Percentage: 7.66%
',
- 1213,
- 'Step 7 Total: 179733usOther: 1213us Percentage: 0.67%
',
- ],
- [
- '8',
- 98623,
- 'Step 8 Total: 174564usKernel: 98623us Percentage: 56.5%
',
- 1938,
- 'Step 8 Total: 174564usMemcpy: 1938us Percentage: 1.11%
',
- 89,
- 'Step 8 Total: 174564usMemset: 89us Percentage: 0.05%
',
- 2841,
- 'Step 8 Total: 174564usRuntime: 2841us Percentage: 1.63%
',
- 56453,
- 'Step 8 Total: 174564usDataLoader: 56453us Percentage: 32.34%
',
- 13420,
- 'Step 8 Total: 174564usCPU Exec: 13420us Percentage: 7.69%
',
- 1200,
- 'Step 8 Total: 174564usOther: 1200us Percentage: 0.69%
',
- ],
- [
- '9',
- 98504,
- 'Step 9 Total: 182172usKernel: 98504us Percentage: 54.07%
',
- 1937,
- 'Step 9 Total: 182172usMemcpy: 1937us Percentage: 1.06%
',
- 87,
- 'Step 9 Total: 182172usMemset: 87us Percentage: 0.05%
',
- 2788,
- 'Step 9 Total: 182172usRuntime: 2788us Percentage: 1.53%
',
- 62690,
- 'Step 9 Total: 182172usDataLoader: 62690us Percentage: 34.41%
',
- 15025,
- 'Step 9 Total: 182172usCPU Exec: 15025us Percentage: 8.25%
',
- 1141,
- 'Step 9 Total: 182172usOther: 1141us Percentage: 0.63%
',
- ],
- [
- '10',
- 98641,
- 'Step 10 Total: 165983usKernel: 98641us Percentage: 59.43%
',
- 1798,
- 'Step 10 Total: 165983usMemcpy: 1798us Percentage: 1.08%
',
- 88,
- 'Step 10 Total: 165983usMemset: 88us Percentage: 0.05%
',
- 3381,
- 'Step 10 Total: 165983usRuntime: 3381us Percentage: 2.04%
',
- 48185,
- 'Step 10 Total: 165983usDataLoader: 48185us Percentage: 29.03%
',
- 12773,
- 'Step 10 Total: 165983usCPU Exec: 12773us Percentage: 7.7%
',
- 1117,
- 'Step 10 Total: 165983usOther: 1117us Percentage: 0.67%
',
- ],
- ],
- },
- performance: [
- {
- name: 'Average Step Time',
- description: '',
- value: 177592,
- extra: 100,
- children: [
- { name: 'Kernel', description: '', value: 98589, extra: 55.51 },
- { name: 'Memcpy', description: '', value: 1915, extra: 1.08 },
- { name: 'Memset', description: '', value: 89, extra: 0.05 },
- { name: 'Runtime', description: '', value: 2908, extra: 1.64 },
- { name: 'DataLoader', description: '', value: 59262, extra: 33.37 },
- { name: 'CPU Exec', description: '', value: 13674, extra: 7.7 },
- { name: 'Other', description: '', value: 1156, extra: 0.65 },
- ],
- },
- ],
- recommendations:
- 'This run has high time cost on input data loading. 33.4% of the step time is in DataLoader. You could try to set num_workers on DataLoader\'s construction and enable multi-processes on data loading . Kernels with 68% time are launched by Tensor Cores eligible operators. You could enable Automatic Mixed Precision to speedup by using FP16. ',
- environments: [
- { title: 'Number of Worker(s)', value: '1' },
- { title: 'Device Type', value: 'GPU' },
- ],
- gpu_metrics: {
- title: 'GPU Summary',
- data: [
- { title: 'GPU 0:', value: '' },
- { title: 'Name', value: 'Tesla V100-DGXS-32GB' },
- { title: 'Memory', value: '31.74 GB' },
- { title: 'Compute Capability', value: '7.0' },
- { title: 'GPU Utilization', value: '55.51 %' },
- { title: 'Est. SM Efficiency', value: '54.68 %' },
- { title: 'Est. Achieved Occupancy', value: '49.13 %' },
- { title: 'Kernel Time using Tensor Cores', value: '0.0 %' },
- ],
- tooltip:
- "The GPU usage metrics:\n\nGPU Utilization:\nGPU busy time / All steps time. The higher, the better. GPU busy time is the time during which there is at least one GPU kernel running on it. All steps time is the total time of all profiler steps(or called as iterations).\n\nEst. SM Efficiency:\nEstimated Stream Multiprocessor Efficiency. The higher, the better. This metric of a kernel, SM_Eff_K = min(blocks of this kernel / SM number of this GPU, 100%). This overall number is the sum of all kernels' SM_Eff_K weighted by kernel's execution duration, divided by all steps time.\n\nEst. Achieved Occupancy:\nFor most cases such as memory bandwidth bounded kernels, the higher the better. Occupancy is the ratio of active warps on an SM to the maximum number of active warps supported by the SM. The theoretical occupancy of a kernel is upper limit occupancy of this kernel, limited by multiple factors such as kernel shape, kernel used resource, and the GPU compute capability.\nEst. Achieved Occupancy of a kernel, OCC_K = min(threads of the kernel / SM number / max threads per SM, theoretical occupancy of the kernel). This overall number is the weighted average of all kernels' OCC_K using kernel's execution duration as weight. It shows fine-grained low-level GPU utilization.\n\nKernel using Tensor Cores:\nTotal GPU Time for Tensor Core kernels / Total GPU Time for all kernels.\n",
- },
- });
- }
-
- diffnodeGet(
- run: string,
- worker: string,
- span: string,
- exp_run: string,
- exp_worker: string,
- exp_span: string,
- path?: string
- ) {
- return Promise.resolve({
- left: {
- name: 'multiple nodes',
- duration: 4246748,
- device_duration: 376761,
- total_duration: 3823182,
- aggs: [
- {
- name: 'aten::empty',
- calls: 4214,
- host_duration: 186312,
- device_duration: 0,
- self_host_duration: 186312,
- self_device_duration: 0,
- },
- {
- name: 'aten::zero_',
- calls: 846,
- host_duration: 31902,
- device_duration: 736,
- self_host_duration: 17460,
- self_device_duration: 0,
- },
- {
- name: 'aten::zeros',
- calls: 520,
- host_duration: 62713,
- device_duration: 0,
- self_host_duration: 32640,
- self_device_duration: 0,
- },
- {
- name: 'aten::to',
- calls: 2696,
- host_duration: 1711486,
- device_duration: 8796,
- self_host_duration: 37162,
- self_device_duration: 0,
- },
- {
- name: 'detach',
- calls: 256,
- host_duration: 4379,
- device_duration: 0,
- self_host_duration: 4379,
- self_device_duration: 0,
- },
- {
- name: 'aten::detach',
- calls: 256,
- host_duration: 10596,
- device_duration: 0,
- self_host_duration: 6217,
- self_device_duration: 0,
- },
- {
- name: 'aten::as_strided',
- calls: 914,
- host_duration: 8470,
- device_duration: 0,
- self_host_duration: 8470,
- self_device_duration: 0,
- },
- {
- name: 'aten::unsqueeze',
- calls: 384,
- host_duration: 19150,
- device_duration: 0,
- self_host_duration: 16142,
- self_device_duration: 0,
- },
- {
- name: 'aten::empty_strided',
- calls: 1158,
- host_duration: 50043,
- device_duration: 0,
- self_host_duration: 50043,
- self_device_duration: 0,
- },
- {
- name: 'aten::copy_',
- calls: 1412,
- host_duration: 1518205,
- device_duration: 8796,
- self_host_duration: 1509009,
- self_device_duration: 8796,
- },
- {
- name: 'aten::_to_copy',
- calls: 1284,
- host_duration: 1674324,
- device_duration: 8796,
- self_host_duration: 104788,
- self_device_duration: 0,
- },
- {
- name: 'aten::upsample_bilinear2d',
- calls: 128,
- host_duration: 460479,
- device_duration: 0,
- self_host_duration: 421547,
- self_device_duration: 0,
- },
- {
- name: 'aten::squeeze',
- calls: 128,
- host_duration: 9401,
- device_duration: 0,
- self_host_duration: 8211,
- self_device_duration: 0,
- },
- {
- name: 'aten::round',
- calls: 128,
- host_duration: 31311,
- device_duration: 0,
- self_host_duration: 31311,
- self_device_duration: 0,
- },
- {
- name: 'aten::slice',
- calls: 260,
- host_duration: 17762,
- device_duration: 0,
- self_host_duration: 15082,
- self_device_duration: 0,
- },
- {
- name: 'detach_',
- calls: 512,
- host_duration: 4194,
- device_duration: 0,
- self_host_duration: 4194,
- self_device_duration: 0,
- },
- {
- name: 'aten::detach_',
- calls: 512,
- host_duration: 14514,
- device_duration: 0,
- self_host_duration: 10320,
- self_device_duration: 0,
- },
- {
- name: 'aten::result_type',
- calls: 640,
- host_duration: 1734,
- device_duration: 0,
- self_host_duration: 1734,
- self_device_duration: 0,
- },
- {
- name: 'aten::pow',
- calls: 640,
- host_duration: 86249,
- device_duration: 0,
- self_host_duration: 78373,
- self_device_duration: 0,
- },
- {
- name: 'aten::sub',
- calls: 640,
- host_duration: 183533,
- device_duration: 0,
- self_host_duration: 75637,
- self_device_duration: 0,
- },
- {
- name: 'aten::gt',
- calls: 640,
- host_duration: 71284,
- device_duration: 0,
- self_host_duration: 49575,
- self_device_duration: 0,
- },
- {
- name: 'aten::_local_scalar_dense',
- calls: 768,
- host_duration: 4948,
- device_duration: 0,
- self_host_duration: 4948,
- self_device_duration: 0,
- },
- {
- name: 'aten::item',
- calls: 768,
- host_duration: 20922,
- device_duration: 0,
- self_host_duration: 15974,
- self_device_duration: 0,
- },
- {
- name: 'aten::is_nonzero',
- calls: 640,
- host_duration: 27934,
- device_duration: 0,
- self_host_duration: 10747,
- self_device_duration: 0,
- },
- {
- name: 'aten::div',
- calls: 130,
- host_duration: 168214,
- device_duration: 75,
- self_host_duration: 146203,
- self_device_duration: 75,
- },
- {
- name: 'aten::resize_',
- calls: 6,
- host_duration: 248,
- device_duration: 0,
- self_host_duration: 248,
- self_device_duration: 0,
- },
- {
- name: 'aten::narrow',
- calls: 4,
- host_duration: 280,
- device_duration: 0,
- self_host_duration: 99,
- self_device_duration: 0,
- },
- {
- name: 'aten::_cat',
- calls: 4,
- host_duration: 92993,
- device_duration: 0,
- self_host_duration: 92405,
- self_device_duration: 0,
- },
- {
- name: 'aten::cat',
- calls: 4,
- host_duration: 93282,
- device_duration: 0,
- self_host_duration: 289,
- self_device_duration: 0,
- },
- {
- name: 'aten::stack',
- calls: 4,
- host_duration: 124757,
- device_duration: 0,
- self_host_duration: 22050,
- self_device_duration: 0,
- },
- {
- name: 'aten::cudnn_convolution',
- calls: 106,
- host_duration: 44043,
- device_duration: 71832,
- self_host_duration: 35027,
- self_device_duration: 71832,
- },
- {
- name: 'aten::_convolution',
- calls: 106,
- host_duration: 51312,
- device_duration: 71832,
- self_host_duration: 7269,
- self_device_duration: 0,
- },
- {
- name: 'aten::convolution',
- calls: 106,
- host_duration: 55287,
- device_duration: 71832,
- self_host_duration: 3975,
- self_device_duration: 0,
- },
- {
- name: 'aten::conv2d',
- calls: 106,
- host_duration: 59323,
- device_duration: 71832,
- self_host_duration: 4036,
- self_device_duration: 0,
- },
- {
- name: 'aten::add',
- calls: 138,
- host_duration: 17461,
- device_duration: 10540,
- self_host_duration: 15188,
- self_device_duration: 10540,
- },
- {
- name: 'aten::empty_like',
- calls: 108,
- host_duration: 11504,
- device_duration: 0,
- self_host_duration: 4865,
- self_device_duration: 0,
- },
- {
- name: 'aten::view',
- calls: 214,
- host_duration: 3589,
- device_duration: 0,
- self_host_duration: 3589,
- self_device_duration: 0,
- },
- {
- name: 'aten::cudnn_batch_norm',
- calls: 106,
- host_duration: 71328,
- device_duration: 25802,
- self_host_duration: 40944,
- self_device_duration: 25802,
- },
- {
- name: 'aten::_batch_norm_impl_index',
- calls: 106,
- host_duration: 76354,
- device_duration: 25802,
- self_host_duration: 5026,
- self_device_duration: 0,
- },
- {
- name: 'aten::batch_norm',
- calls: 106,
- host_duration: 79832,
- device_duration: 25802,
- self_host_duration: 3478,
- self_device_duration: 0,
- },
- {
- name: 'aten::clamp_min',
- calls: 98,
- host_duration: 5417,
- device_duration: 12000,
- self_host_duration: 3885,
- self_device_duration: 12000,
- },
- {
- name: 'aten::clamp_min_',
- calls: 98,
- host_duration: 8537,
- device_duration: 12000,
- self_host_duration: 3120,
- self_device_duration: 0,
- },
- {
- name: 'aten::relu_',
- calls: 98,
- host_duration: 16708,
- device_duration: 12000,
- self_host_duration: 8171,
- self_device_duration: 0,
- },
- {
- name: 'aten::max_pool2d_with_indices',
- calls: 2,
- host_duration: 442,
- device_duration: 940,
- self_host_duration: 405,
- self_device_duration: 940,
- },
- {
- name: 'aten::max_pool2d',
- calls: 2,
- host_duration: 542,
- device_duration: 940,
- self_host_duration: 100,
- self_device_duration: 0,
- },
- {
- name: 'aten::add_',
- calls: 998,
- host_duration: 72931,
- device_duration: 13090,
- self_host_duration: 57558,
- self_device_duration: 13090,
- },
- {
- name: 'aten::mean',
- calls: 2,
- host_duration: 376,
- device_duration: 133,
- self_host_duration: 339,
- self_device_duration: 133,
- },
- {
- name: 'aten::adaptive_avg_pool2d',
- calls: 2,
- host_duration: 465,
- device_duration: 133,
- self_host_duration: 89,
- self_device_duration: 0,
- },
- {
- name: 'aten::_reshape_alias',
- calls: 4,
- host_duration: 170,
- device_duration: 0,
- self_host_duration: 170,
- self_device_duration: 0,
- },
- {
- name: 'aten::flatten',
- calls: 2,
- host_duration: 207,
- device_duration: 0,
- self_host_duration: 103,
- self_device_duration: 0,
- },
- {
- name: 'aten::transpose',
- calls: 10,
- host_duration: 587,
- device_duration: 0,
- self_host_duration: 465,
- self_device_duration: 0,
- },
- {
- name: 'aten::t',
- calls: 10,
- host_duration: 1068,
- device_duration: 0,
- self_host_duration: 481,
- self_device_duration: 0,
- },
- {
- name: 'aten::expand',
- calls: 4,
- host_duration: 277,
- device_duration: 0,
- self_host_duration: 227,
- self_device_duration: 0,
- },
- {
- name: 'aten::addmm',
- calls: 2,
- host_duration: 809,
- device_duration: 84,
- self_host_duration: 604,
- self_device_duration: 84,
- },
- {
- name: 'aten::linear',
- calls: 2,
- host_duration: 1185,
- device_duration: 84,
- self_host_duration: 137,
- self_device_duration: 0,
- },
- {
- name: 'aten::_log_softmax',
- calls: 2,
- host_duration: 308,
- device_duration: 14,
- self_host_duration: 271,
- self_device_duration: 14,
- },
- {
- name: 'aten::log_softmax',
- calls: 2,
- host_duration: 472,
- device_duration: 14,
- self_host_duration: 153,
- self_device_duration: 0,
- },
- {
- name: 'aten::nll_loss_forward',
- calls: 2,
- host_duration: 522,
- device_duration: 8,
- self_host_duration: 476,
- self_device_duration: 8,
- },
- {
- name: 'aten::nll_loss',
- calls: 2,
- host_duration: 590,
- device_duration: 8,
- self_host_duration: 68,
- self_device_duration: 0,
- },
- {
- name: 'aten::nll_loss_nd',
- calls: 2,
- host_duration: 641,
- device_duration: 8,
- self_host_duration: 51,
- self_device_duration: 0,
- },
- {
- name: 'aten::cross_entropy_loss',
- calls: 2,
- host_duration: 1234,
- device_duration: 22,
- self_host_duration: 121,
- self_device_duration: 0,
- },
- {
- name: 'aten::fill_',
- calls: 328,
- host_duration: 14541,
- device_duration: 738,
- self_host_duration: 10083,
- self_device_duration: 738,
- },
- {
- name: 'aten::ones_like',
- calls: 2,
- host_duration: 516,
- device_duration: 2,
- self_host_duration: 142,
- self_device_duration: 0,
- },
- {
- name: 'aten::nll_loss_backward',
- calls: 2,
- host_duration: 573,
- device_duration: 8,
- self_host_duration: 310,
- self_device_duration: 6,
- },
- {
- name: 'NllLossBackward0',
- calls: 2,
- host_duration: 774,
- device_duration: 8,
- self_host_duration: 201,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: NllLossBackward0',
- calls: 2,
- host_duration: 1025,
- device_duration: 8,
- self_host_duration: 251,
- self_device_duration: 0,
- },
- {
- name: 'aten::_log_softmax_backward_data',
- calls: 2,
- host_duration: 236,
- device_duration: 18,
- self_host_duration: 196,
- self_device_duration: 18,
- },
- {
- name: 'LogSoftmaxBackward0',
- calls: 2,
- host_duration: 385,
- device_duration: 18,
- self_host_duration: 149,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: LogSoftmaxBackward0',
- calls: 2,
- host_duration: 632,
- device_duration: 18,
- self_host_duration: 247,
- self_device_duration: 0,
- },
- {
- name: 'aten::mm',
- calls: 4,
- host_duration: 668,
- device_duration: 140,
- self_host_duration: 547,
- self_device_duration: 140,
- },
- {
- name: 'AddmmBackward0',
- calls: 2,
- host_duration: 1698,
- device_duration: 140,
- self_host_duration: 417,
- self_device_duration: 0,
- },
- {
- name: 'aten::sum',
- calls: 2,
- host_duration: 370,
- device_duration: 15,
- self_host_duration: 328,
- self_device_duration: 15,
- },
- {
- name: 'autograd::engine::evaluate_function: AddmmBackward0',
- calls: 2,
- host_duration: 2710,
- device_duration: 155,
- self_host_duration: 567,
- self_device_duration: 0,
- },
- {
- name: 'torch::autograd::AccumulateGrad',
- calls: 322,
- host_duration: 41184,
- device_duration: 997,
- self_host_duration: 16159,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: torch::autograd::AccumulateGrad',
- calls: 322,
- host_duration: 70946,
- device_duration: 997,
- self_host_duration: 29762,
- self_device_duration: 0,
- },
- {
- name: 'TBackward0',
- calls: 2,
- host_duration: 280,
- device_duration: 0,
- self_host_duration: 64,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: TBackward0',
- calls: 2,
- host_duration: 428,
- device_duration: 0,
- self_host_duration: 148,
- self_device_duration: 0,
- },
- {
- name: 'aten::reshape',
- calls: 2,
- host_duration: 170,
- device_duration: 0,
- self_host_duration: 104,
- self_device_duration: 0,
- },
- {
- name: 'ReshapeAliasBackward0',
- calls: 2,
- host_duration: 264,
- device_duration: 0,
- self_host_duration: 94,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: ReshapeAliasBackward0',
- calls: 2,
- host_duration: 402,
- device_duration: 0,
- self_host_duration: 138,
- self_device_duration: 0,
- },
- {
- name: 'MeanBackward1',
- calls: 2,
- host_duration: 1036,
- device_duration: 75,
- self_host_duration: 231,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: MeanBackward1',
- calls: 2,
- host_duration: 1254,
- device_duration: 75,
- self_host_duration: 218,
- self_device_duration: 0,
- },
- {
- name: 'aten::threshold_backward',
- calls: 98,
- host_duration: 13838,
- device_duration: 17984,
- self_host_duration: 12131,
- self_device_duration: 17984,
- },
- {
- name: 'ReluBackward0',
- calls: 98,
- host_duration: 21183,
- device_duration: 17984,
- self_host_duration: 7345,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: ReluBackward0',
- calls: 98,
- host_duration: 33492,
- device_duration: 17984,
- self_host_duration: 12309,
- self_device_duration: 0,
- },
- {
- name: 'AddBackward0',
- calls: 32,
- host_duration: 251,
- device_duration: 0,
- self_host_duration: 251,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: AddBackward0',
- calls: 32,
- host_duration: 2579,
- device_duration: 0,
- self_host_duration: 2328,
- self_device_duration: 0,
- },
- {
- name: 'aten::cudnn_batch_norm_backward',
- calls: 106,
- host_duration: 62175,
- device_duration: 44433,
- self_host_duration: 36053,
- self_device_duration: 44433,
- },
- {
- name: 'CudnnBatchNormBackward0',
- calls: 106,
- host_duration: 69160,
- device_duration: 44433,
- self_host_duration: 6985,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: CudnnBatchNormBackward0',
- calls: 106,
- host_duration: 88613,
- device_duration: 44433,
- self_host_duration: 19453,
- self_device_duration: 0,
- },
- {
- name: 'aten::cudnn_convolution_backward_input',
- calls: 104,
- host_duration: 40820,
- device_duration: 76620,
- self_host_duration: 30768,
- self_device_duration: 76620,
- },
- {
- name: 'aten::cudnn_convolution_backward_weight',
- calls: 106,
- host_duration: 44875,
- device_duration: 90108,
- self_host_duration: 27458,
- self_device_duration: 90108,
- },
- {
- name: 'aten::cudnn_convolution_backward',
- calls: 106,
- host_duration: 101020,
- device_duration: 166728,
- self_host_duration: 15325,
- self_device_duration: 0,
- },
- {
- name: 'CudnnConvolutionBackward0',
- calls: 106,
- host_duration: 107964,
- device_duration: 166728,
- self_host_duration: 6944,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: CudnnConvolutionBackward0',
- calls: 106,
- host_duration: 129129,
- device_duration: 177161,
- self_host_duration: 16746,
- self_device_duration: 0,
- },
- {
- name: 'aten::max_pool2d_with_indices_backward',
- calls: 2,
- host_duration: 483,
- device_duration: 3048,
- self_host_duration: 257,
- self_device_duration: 2588,
- },
- {
- name: 'MaxPool2DWithIndicesBackward0',
- calls: 2,
- host_duration: 599,
- device_duration: 3048,
- self_host_duration: 116,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: MaxPool2DWithIndicesBackward0',
- calls: 2,
- host_duration: 836,
- device_duration: 3048,
- self_host_duration: 237,
- self_device_duration: 0,
- },
- {
- name: 'aten::mul_',
- calls: 322,
- host_duration: 23818,
- device_duration: 797,
- self_host_duration: 19073,
- self_device_duration: 797,
- },
- ],
- },
- right: {
- name: 'multiple nodes',
- duration: 468427,
- device_duration: 374211,
- total_duration: 644686,
- aggs: [
- {
- name: 'aten::empty',
- calls: 4214,
- host_duration: 31594,
- device_duration: 0,
- self_host_duration: 31594,
- self_device_duration: 0,
- },
- {
- name: 'aten::zero_',
- calls: 846,
- host_duration: 6010,
- device_duration: 864,
- self_host_duration: 1910,
- self_device_duration: 0,
- },
- {
- name: 'aten::zeros',
- calls: 520,
- host_duration: 10338,
- device_duration: 0,
- self_host_duration: 2951,
- self_device_duration: 0,
- },
- {
- name: 'aten::to',
- calls: 2696,
- host_duration: 47031,
- device_duration: 8684,
- self_host_duration: 4258,
- self_device_duration: 0,
- },
- {
- name: 'detach',
- calls: 256,
- host_duration: 701,
- device_duration: 0,
- self_host_duration: 698,
- self_device_duration: 0,
- },
- {
- name: 'aten::detach',
- calls: 256,
- host_duration: 1374,
- device_duration: 0,
- self_host_duration: 676,
- self_device_duration: 0,
- },
- {
- name: 'aten::as_strided',
- calls: 914,
- host_duration: 1013,
- device_duration: 0,
- self_host_duration: 1013,
- self_device_duration: 0,
- },
- {
- name: 'aten::unsqueeze',
- calls: 384,
- host_duration: 2074,
- device_duration: 0,
- self_host_duration: 1723,
- self_device_duration: 0,
- },
- {
- name: 'aten::empty_strided',
- calls: 1158,
- host_duration: 6859,
- device_duration: 0,
- self_host_duration: 6859,
- self_device_duration: 0,
- },
- {
- name: 'aten::copy_',
- calls: 1412,
- host_duration: 25248,
- device_duration: 8684,
- self_host_duration: 16166,
- self_device_duration: 8684,
- },
- {
- name: 'aten::_to_copy',
- calls: 1284,
- host_duration: 42773,
- device_duration: 8684,
- self_host_duration: 10227,
- self_device_duration: 0,
- },
- {
- name: 'aten::upsample_bilinear2d',
- calls: 128,
- host_duration: 51788,
- device_duration: 0,
- self_host_duration: 46788,
- self_device_duration: 0,
- },
- {
- name: 'aten::squeeze',
- calls: 128,
- host_duration: 1035,
- device_duration: 0,
- self_host_duration: 895,
- self_device_duration: 0,
- },
- {
- name: 'aten::round',
- calls: 128,
- host_duration: 11074,
- device_duration: 0,
- self_host_duration: 11074,
- self_device_duration: 0,
- },
- {
- name: 'aten::slice',
- calls: 260,
- host_duration: 1892,
- device_duration: 0,
- self_host_duration: 1600,
- self_device_duration: 0,
- },
- {
- name: 'detach_',
- calls: 512,
- host_duration: 278,
- device_duration: 0,
- self_host_duration: 244,
- self_device_duration: 0,
- },
- {
- name: 'aten::detach_',
- calls: 512,
- host_duration: 1341,
- device_duration: 0,
- self_host_duration: 1097,
- self_device_duration: 0,
- },
- {
- name: 'aten::result_type',
- calls: 640,
- host_duration: 317,
- device_duration: 0,
- self_host_duration: 317,
- self_device_duration: 0,
- },
- {
- name: 'aten::pow',
- calls: 640,
- host_duration: 8857,
- device_duration: 0,
- self_host_duration: 7959,
- self_device_duration: 0,
- },
- {
- name: 'aten::sub',
- calls: 640,
- host_duration: 17840,
- device_duration: 0,
- self_host_duration: 7688,
- self_device_duration: 0,
- },
- {
- name: 'aten::gt',
- calls: 640,
- host_duration: 6903,
- device_duration: 0,
- self_host_duration: 4901,
- self_device_duration: 0,
- },
- {
- name: 'aten::_local_scalar_dense',
- calls: 768,
- host_duration: 395,
- device_duration: 0,
- self_host_duration: 395,
- self_device_duration: 0,
- },
- {
- name: 'aten::item',
- calls: 768,
- host_duration: 2532,
- device_duration: 0,
- self_host_duration: 2130,
- self_device_duration: 0,
- },
- {
- name: 'aten::is_nonzero',
- calls: 640,
- host_duration: 3601,
- device_duration: 0,
- self_host_duration: 1427,
- self_device_duration: 0,
- },
- {
- name: 'aten::div',
- calls: 130,
- host_duration: 11707,
- device_duration: 75,
- self_host_duration: 9531,
- self_device_duration: 75,
- },
- {
- name: 'aten::resize_',
- calls: 6,
- host_duration: 79,
- device_duration: 0,
- self_host_duration: 79,
- self_device_duration: 0,
- },
- {
- name: 'aten::narrow',
- calls: 4,
- host_duration: 37,
- device_duration: 0,
- self_host_duration: 16,
- self_device_duration: 0,
- },
- {
- name: 'aten::_cat',
- calls: 4,
- host_duration: 9241,
- device_duration: 0,
- self_host_duration: 9113,
- self_device_duration: 0,
- },
- {
- name: 'aten::cat',
- calls: 4,
- host_duration: 9286,
- device_duration: 0,
- self_host_duration: 45,
- self_device_duration: 0,
- },
- {
- name: 'aten::stack',
- calls: 4,
- host_duration: 16195,
- device_duration: 0,
- self_host_duration: 6105,
- self_device_duration: 0,
- },
- {
- name: 'aten::cudnn_convolution',
- calls: 106,
- host_duration: 17357,
- device_duration: 71414,
- self_host_duration: 13601,
- self_device_duration: 71414,
- },
- {
- name: 'aten::_convolution',
- calls: 106,
- host_duration: 18514,
- device_duration: 71414,
- self_host_duration: 1157,
- self_device_duration: 0,
- },
- {
- name: 'aten::convolution',
- calls: 106,
- host_duration: 19185,
- device_duration: 71414,
- self_host_duration: 671,
- self_device_duration: 0,
- },
- {
- name: 'aten::conv2d',
- calls: 106,
- host_duration: 19750,
- device_duration: 71414,
- self_host_duration: 565,
- self_device_duration: 0,
- },
- {
- name: 'aten::add',
- calls: 138,
- host_duration: 4973,
- device_duration: 10567,
- self_host_duration: 3157,
- self_device_duration: 10567,
- },
- {
- name: 'aten::empty_like',
- calls: 108,
- host_duration: 1924,
- device_duration: 0,
- self_host_duration: 598,
- self_device_duration: 0,
- },
- {
- name: 'aten::view',
- calls: 214,
- host_duration: 596,
- device_duration: 0,
- self_host_duration: 596,
- self_device_duration: 0,
- },
- {
- name: 'aten::cudnn_batch_norm',
- calls: 106,
- host_duration: 11083,
- device_duration: 25737,
- self_host_duration: 5031,
- self_device_duration: 25737,
- },
- {
- name: 'aten::_batch_norm_impl_index',
- calls: 106,
- host_duration: 11856,
- device_duration: 25737,
- self_host_duration: 773,
- self_device_duration: 0,
- },
- {
- name: 'aten::batch_norm',
- calls: 106,
- host_duration: 12386,
- device_duration: 25737,
- self_host_duration: 530,
- self_device_duration: 0,
- },
- {
- name: 'aten::clamp_min',
- calls: 98,
- host_duration: 2189,
- device_duration: 12010,
- self_host_duration: 1030,
- self_device_duration: 12010,
- },
- {
- name: 'aten::clamp_min_',
- calls: 98,
- host_duration: 2614,
- device_duration: 12010,
- self_host_duration: 425,
- self_device_duration: 0,
- },
- {
- name: 'aten::relu_',
- calls: 98,
- host_duration: 3880,
- device_duration: 12010,
- self_host_duration: 1266,
- self_device_duration: 0,
- },
- {
- name: 'aten::max_pool2d_with_indices',
- calls: 2,
- host_duration: 112,
- device_duration: 938,
- self_host_duration: 82,
- self_device_duration: 938,
- },
- {
- name: 'aten::max_pool2d',
- calls: 2,
- host_duration: 127,
- device_duration: 938,
- self_host_duration: 15,
- self_device_duration: 0,
- },
- {
- name: 'aten::add_',
- calls: 998,
- host_duration: 21459,
- device_duration: 13178,
- self_host_duration: 11041,
- self_device_duration: 13178,
- },
- {
- name: 'aten::mean',
- calls: 2,
- host_duration: 104,
- device_duration: 126,
- self_host_duration: 76,
- self_device_duration: 126,
- },
- {
- name: 'aten::adaptive_avg_pool2d',
- calls: 2,
- host_duration: 117,
- device_duration: 126,
- self_host_duration: 13,
- self_device_duration: 0,
- },
- {
- name: 'aten::_reshape_alias',
- calls: 4,
- host_duration: 26,
- device_duration: 0,
- self_host_duration: 26,
- self_device_duration: 0,
- },
- {
- name: 'aten::flatten',
- calls: 2,
- host_duration: 31,
- device_duration: 0,
- self_host_duration: 15,
- self_device_duration: 0,
- },
- {
- name: 'aten::transpose',
- calls: 10,
- host_duration: 85,
- device_duration: 0,
- self_host_duration: 68,
- self_device_duration: 0,
- },
- {
- name: 'aten::t',
- calls: 10,
- host_duration: 145,
- device_duration: 0,
- self_host_duration: 60,
- self_device_duration: 0,
- },
- {
- name: 'aten::expand',
- calls: 4,
- host_duration: 30,
- device_duration: 0,
- self_host_duration: 25,
- self_device_duration: 0,
- },
- {
- name: 'aten::addmm',
- calls: 2,
- host_duration: 334,
- device_duration: 84,
- self_host_duration: 234,
- self_device_duration: 84,
- },
- {
- name: 'aten::linear',
- calls: 2,
- host_duration: 386,
- device_duration: 84,
- self_host_duration: 19,
- self_device_duration: 0,
- },
- {
- name: 'aten::_log_softmax',
- calls: 2,
- host_duration: 83,
- device_duration: 14,
- self_host_duration: 55,
- self_device_duration: 14,
- },
- {
- name: 'aten::log_softmax',
- calls: 2,
- host_duration: 106,
- device_duration: 14,
- self_host_duration: 20,
- self_device_duration: 0,
- },
- {
- name: 'aten::nll_loss_forward',
- calls: 2,
- host_duration: 96,
- device_duration: 8,
- self_host_duration: 68,
- self_device_duration: 8,
- },
- {
- name: 'aten::nll_loss',
- calls: 2,
- host_duration: 105,
- device_duration: 8,
- self_host_duration: 9,
- self_device_duration: 0,
- },
- {
- name: 'aten::nll_loss_nd',
- calls: 2,
- host_duration: 113,
- device_duration: 8,
- self_host_duration: 8,
- self_device_duration: 0,
- },
- {
- name: 'aten::cross_entropy_loss',
- calls: 2,
- host_duration: 243,
- device_duration: 22,
- self_host_duration: 24,
- self_device_duration: 0,
- },
- {
- name: 'aten::fill_',
- calls: 328,
- host_duration: 4140,
- device_duration: 866,
- self_host_duration: 1851,
- self_device_duration: 866,
- },
- {
- name: 'aten::ones_like',
- calls: 2,
- host_duration: 104,
- device_duration: 2,
- self_host_duration: 14,
- self_device_duration: 0,
- },
- {
- name: 'aten::nll_loss_backward',
- calls: 2,
- host_duration: 192,
- device_duration: 9,
- self_host_duration: 84,
- self_device_duration: 6,
- },
- {
- name: 'NllLossBackward0',
- calls: 2,
- host_duration: 297,
- device_duration: 9,
- self_host_duration: 105,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: NllLossBackward0',
- calls: 2,
- host_duration: 352,
- device_duration: 9,
- self_host_duration: 55,
- self_device_duration: 0,
- },
- {
- name: 'aten::_log_softmax_backward_data',
- calls: 2,
- host_duration: 71,
- device_duration: 18,
- self_host_duration: 43,
- self_device_duration: 18,
- },
- {
- name: 'LogSoftmaxBackward0',
- calls: 2,
- host_duration: 91,
- device_duration: 18,
- self_host_duration: 20,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: LogSoftmaxBackward0',
- calls: 2,
- host_duration: 126,
- device_duration: 18,
- self_host_duration: 35,
- self_device_duration: 0,
- },
- {
- name: 'aten::mm',
- calls: 4,
- host_duration: 283,
- device_duration: 134,
- self_host_duration: 186,
- self_device_duration: 134,
- },
- {
- name: 'AddmmBackward0',
- calls: 2,
- host_duration: 418,
- device_duration: 134,
- self_host_duration: 47,
- self_device_duration: 0,
- },
- {
- name: 'aten::sum',
- calls: 2,
- host_duration: 92,
- device_duration: 14,
- self_host_duration: 62,
- self_device_duration: 14,
- },
- {
- name: 'autograd::engine::evaluate_function: AddmmBackward0',
- calls: 2,
- host_duration: 594,
- device_duration: 148,
- self_host_duration: 75,
- self_device_duration: 0,
- },
- {
- name: 'torch::autograd::AccumulateGrad',
- calls: 322,
- host_duration: 10317,
- device_duration: 1069,
- self_host_duration: 2127,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: torch::autograd::AccumulateGrad',
- calls: 322,
- host_duration: 15128,
- device_duration: 1069,
- self_host_duration: 4811,
- self_device_duration: 0,
- },
- {
- name: 'TBackward0',
- calls: 2,
- host_duration: 30,
- device_duration: 0,
- self_host_duration: 6,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: TBackward0',
- calls: 2,
- host_duration: 45,
- device_duration: 0,
- self_host_duration: 15,
- self_device_duration: 0,
- },
- {
- name: 'aten::reshape',
- calls: 2,
- host_duration: 20,
- device_duration: 0,
- self_host_duration: 10,
- self_device_duration: 0,
- },
- {
- name: 'ReshapeAliasBackward0',
- calls: 2,
- host_duration: 31,
- device_duration: 0,
- self_host_duration: 11,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: ReshapeAliasBackward0',
- calls: 2,
- host_duration: 48,
- device_duration: 0,
- self_host_duration: 17,
- self_device_duration: 0,
- },
- {
- name: 'MeanBackward1',
- calls: 2,
- host_duration: 172,
- device_duration: 75,
- self_host_duration: 18,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: MeanBackward1',
- calls: 2,
- host_duration: 201,
- device_duration: 75,
- self_host_duration: 29,
- self_device_duration: 0,
- },
- {
- name: 'aten::threshold_backward',
- calls: 98,
- host_duration: 3652,
- device_duration: 18018,
- self_host_duration: 2361,
- self_device_duration: 18018,
- },
- {
- name: 'ReluBackward0',
- calls: 98,
- host_duration: 4567,
- device_duration: 18018,
- self_host_duration: 915,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: ReluBackward0',
- calls: 98,
- host_duration: 6457,
- device_duration: 18018,
- self_host_duration: 1890,
- self_device_duration: 0,
- },
- {
- name: 'AddBackward0',
- calls: 32,
- host_duration: 26,
- device_duration: 0,
- self_host_duration: 26,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: AddBackward0',
- calls: 32,
- host_duration: 261,
- device_duration: 0,
- self_host_duration: 235,
- self_device_duration: 0,
- },
- {
- name: 'aten::cudnn_batch_norm_backward',
- calls: 106,
- host_duration: 9943,
- device_duration: 44401,
- self_host_duration: 4355,
- self_device_duration: 44401,
- },
- {
- name: 'CudnnBatchNormBackward0',
- calls: 106,
- host_duration: 11132,
- device_duration: 44401,
- self_host_duration: 1189,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: CudnnBatchNormBackward0',
- calls: 106,
- host_duration: 14696,
- device_duration: 44401,
- self_host_duration: 3564,
- self_device_duration: 0,
- },
- {
- name: 'aten::cudnn_convolution_backward_input',
- calls: 104,
- host_duration: 18813,
- device_duration: 75568,
- self_host_duration: 13997,
- self_device_duration: 75568,
- },
- {
- name: 'aten::cudnn_convolution_backward_weight',
- calls: 106,
- host_duration: 18792,
- device_duration: 88992,
- self_host_duration: 11101,
- self_device_duration: 88992,
- },
- {
- name: 'aten::cudnn_convolution_backward',
- calls: 106,
- host_duration: 40064,
- device_duration: 164560,
- self_host_duration: 2459,
- self_device_duration: 0,
- },
- {
- name: 'CudnnConvolutionBackward0',
- calls: 106,
- host_duration: 41205,
- device_duration: 164560,
- self_host_duration: 1141,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: CudnnConvolutionBackward0',
- calls: 106,
- host_duration: 45209,
- device_duration: 175014,
- self_host_duration: 2826,
- self_device_duration: 0,
- },
- {
- name: 'aten::max_pool2d_with_indices_backward',
- calls: 2,
- host_duration: 145,
- device_duration: 3016,
- self_host_duration: 61,
- self_device_duration: 2556,
- },
- {
- name: 'MaxPool2DWithIndicesBackward0',
- calls: 2,
- host_duration: 165,
- device_duration: 3016,
- self_host_duration: 20,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: MaxPool2DWithIndicesBackward0',
- calls: 2,
- host_duration: 209,
- device_duration: 3016,
- self_host_duration: 44,
- self_device_duration: 0,
- },
- {
- name: 'aten::mul_',
- calls: 322,
- host_duration: 6835,
- device_duration: 803,
- self_host_duration: 3630,
- self_device_duration: 803,
- },
- ],
- },
- path: '0',
- children: [
- {
- left: {
- name: 'multiple nodes',
- duration: 168,
- device_duration: 0,
- total_duration: 168,
- aggs: [
- {
- name: 'aten::empty',
- calls: 2,
- host_duration: 100,
- device_duration: 0,
- self_host_duration: 100,
- self_device_duration: 0,
- },
- {
- name: 'aten::zero_',
- calls: 1,
- host_duration: 4,
- device_duration: 0,
- self_host_duration: 4,
- self_device_duration: 0,
- },
- {
- name: 'aten::zeros',
- calls: 1,
- host_duration: 119,
- device_duration: 0,
- self_host_duration: 64,
- self_device_duration: 0,
- },
- ],
- },
- right: {
- name: 'multiple nodes',
- duration: 24,
- device_duration: 0,
- total_duration: 24,
- aggs: [
- {
- name: 'aten::empty',
- calls: 2,
- host_duration: 17,
- device_duration: 0,
- self_host_duration: 17,
- self_device_duration: 0,
- },
- {
- name: 'aten::zero_',
- calls: 1,
- host_duration: 1,
- device_duration: 0,
- self_host_duration: 1,
- self_device_duration: 0,
- },
- {
- name: 'aten::zeros',
- calls: 1,
- host_duration: 15,
- device_duration: 0,
- self_host_duration: 6,
- self_device_duration: 0,
- },
- ],
- },
- path: '0-0',
- },
- {
- left: {
- name: 'enumerate(DataLoader)#_SingleProcessDataLoaderIter.__next__',
- duration: 1766103,
- device_duration: 0,
- total_duration: 1766103,
- aggs: [
- {
- name: 'aten::empty',
- calls: 1413,
- host_duration: 62288,
- device_duration: 0,
- self_host_duration: 62288,
- self_device_duration: 0,
- },
- {
- name: 'aten::zero_',
- calls: 257,
- host_duration: 959,
- device_duration: 0,
- self_host_duration: 959,
- self_device_duration: 0,
- },
- {
- name: 'aten::zeros',
- calls: 257,
- host_duration: 35273,
- device_duration: 0,
- self_host_duration: 16154,
- self_device_duration: 0,
- },
- {
- name: 'aten::to',
- calls: 1344,
- host_duration: 877101,
- device_duration: 0,
- self_host_duration: 18482,
- self_device_duration: 0,
- },
- {
- name: 'detach',
- calls: 128,
- host_duration: 2191,
- device_duration: 0,
- self_host_duration: 2191,
- self_device_duration: 0,
- },
- {
- name: 'aten::detach',
- calls: 128,
- host_duration: 5301,
- device_duration: 0,
- self_host_duration: 3110,
- self_device_duration: 0,
- },
- {
- name: 'aten::as_strided',
- calls: 450,
- host_duration: 4175,
- device_duration: 0,
- self_host_duration: 4175,
- self_device_duration: 0,
- },
- {
- name: 'aten::unsqueeze',
- calls: 192,
- host_duration: 9560,
- device_duration: 0,
- self_host_duration: 8045,
- self_device_duration: 0,
- },
- {
- name: 'aten::empty_strided',
- calls: 576,
- host_duration: 24689,
- device_duration: 0,
- self_host_duration: 24689,
- self_device_duration: 0,
- },
- {
- name: 'aten::copy_',
- calls: 704,
- host_duration: 780214,
- device_duration: 0,
- self_host_duration: 780214,
- self_device_duration: 0,
- },
- {
- name: 'aten::_to_copy',
- calls: 640,
- host_duration: 858619,
- device_duration: 0,
- self_host_duration: 53009,
- self_device_duration: 0,
- },
- {
- name: 'aten::upsample_bilinear2d',
- calls: 64,
- host_duration: 224031,
- device_duration: 0,
- self_host_duration: 204660,
- self_device_duration: 0,
- },
- {
- name: 'aten::squeeze',
- calls: 64,
- host_duration: 4719,
- device_duration: 0,
- self_host_duration: 4119,
- self_device_duration: 0,
- },
- {
- name: 'aten::round',
- calls: 64,
- host_duration: 16028,
- device_duration: 0,
- self_host_duration: 16028,
- self_device_duration: 0,
- },
- {
- name: 'aten::slice',
- calls: 130,
- host_duration: 8918,
- device_duration: 0,
- self_host_duration: 7569,
- self_device_duration: 0,
- },
- {
- name: 'detach_',
- calls: 256,
- host_duration: 2092,
- device_duration: 0,
- self_host_duration: 2092,
- self_device_duration: 0,
- },
- {
- name: 'aten::detach_',
- calls: 256,
- host_duration: 7228,
- device_duration: 0,
- self_host_duration: 5136,
- self_device_duration: 0,
- },
- {
- name: 'aten::result_type',
- calls: 320,
- host_duration: 884,
- device_duration: 0,
- self_host_duration: 884,
- self_device_duration: 0,
- },
- {
- name: 'aten::pow',
- calls: 320,
- host_duration: 43030,
- device_duration: 0,
- self_host_duration: 39068,
- self_device_duration: 0,
- },
- {
- name: 'aten::sub',
- calls: 320,
- host_duration: 91440,
- device_duration: 0,
- self_host_duration: 37676,
- self_device_duration: 0,
- },
- {
- name: 'aten::gt',
- calls: 320,
- host_duration: 35514,
- device_duration: 0,
- self_host_duration: 24706,
- self_device_duration: 0,
- },
- {
- name: 'aten::_local_scalar_dense',
- calls: 384,
- host_duration: 2467,
- device_duration: 0,
- self_host_duration: 2467,
- self_device_duration: 0,
- },
- {
- name: 'aten::item',
- calls: 384,
- host_duration: 10375,
- device_duration: 0,
- self_host_duration: 7908,
- self_device_duration: 0,
- },
- {
- name: 'aten::is_nonzero',
- calls: 320,
- host_duration: 13905,
- device_duration: 0,
- self_host_duration: 5383,
- self_device_duration: 0,
- },
- {
- name: 'aten::div',
- calls: 64,
- host_duration: 87841,
- device_duration: 0,
- self_host_duration: 76794,
- self_device_duration: 0,
- },
- {
- name: 'aten::resize_',
- calls: 2,
- host_duration: 117,
- device_duration: 0,
- self_host_duration: 117,
- self_device_duration: 0,
- },
- {
- name: 'aten::narrow',
- calls: 2,
- host_duration: 142,
- device_duration: 0,
- self_host_duration: 51,
- self_device_duration: 0,
- },
- {
- name: 'aten::_cat',
- calls: 2,
- host_duration: 51526,
- device_duration: 0,
- self_host_duration: 51229,
- self_device_duration: 0,
- },
- {
- name: 'aten::cat',
- calls: 2,
- host_duration: 51674,
- device_duration: 0,
- self_host_duration: 148,
- self_device_duration: 0,
- },
- {
- name: 'aten::stack',
- calls: 2,
- host_duration: 75677,
- device_duration: 0,
- self_host_duration: 19330,
- self_device_duration: 0,
- },
- ],
- },
- right: {
- name: 'enumerate(DataLoader)#_SingleProcessDataLoaderIter.__next__',
- duration: 146745,
- device_duration: 0,
- total_duration: 146745,
- aggs: [
- {
- name: 'aten::empty',
- calls: 1413,
- host_duration: 12399,
- device_duration: 0,
- self_host_duration: 12399,
- self_device_duration: 0,
- },
- {
- name: 'aten::zero_',
- calls: 257,
- host_duration: 98,
- device_duration: 0,
- self_host_duration: 98,
- self_device_duration: 0,
- },
- {
- name: 'aten::zeros',
- calls: 257,
- host_duration: 7665,
- device_duration: 0,
- self_host_duration: 1689,
- self_device_duration: 0,
- },
- {
- name: 'aten::to',
- calls: 1344,
- host_duration: 21137,
- device_duration: 0,
- self_host_duration: 2377,
- self_device_duration: 0,
- },
- {
- name: 'detach',
- calls: 128,
- host_duration: 364,
- device_duration: 0,
- self_host_duration: 361,
- self_device_duration: 0,
- },
- {
- name: 'aten::detach',
- calls: 128,
- host_duration: 745,
- device_duration: 0,
- self_host_duration: 384,
- self_device_duration: 0,
- },
- {
- name: 'aten::as_strided',
- calls: 450,
- host_duration: 527,
- device_duration: 0,
- self_host_duration: 527,
- self_device_duration: 0,
- },
- {
- name: 'aten::unsqueeze',
- calls: 192,
- host_duration: 1050,
- device_duration: 0,
- self_host_duration: 869,
- self_device_duration: 0,
- },
- {
- name: 'aten::empty_strided',
- calls: 576,
- host_duration: 3689,
- device_duration: 0,
- self_host_duration: 3689,
- self_device_duration: 0,
- },
- {
- name: 'aten::copy_',
- calls: 704,
- host_duration: 8695,
- device_duration: 0,
- self_host_duration: 8695,
- self_device_duration: 0,
- },
- {
- name: 'aten::_to_copy',
- calls: 640,
- host_duration: 18760,
- device_duration: 0,
- self_host_duration: 6122,
- self_device_duration: 0,
- },
- {
- name: 'aten::upsample_bilinear2d',
- calls: 64,
- host_duration: 20349,
- device_duration: 0,
- self_host_duration: 17634,
- self_device_duration: 0,
- },
- {
- name: 'aten::squeeze',
- calls: 64,
- host_duration: 562,
- device_duration: 0,
- self_host_duration: 487,
- self_device_duration: 0,
- },
- {
- name: 'aten::round',
- calls: 64,
- host_duration: 6658,
- device_duration: 0,
- self_host_duration: 6658,
- self_device_duration: 0,
- },
- {
- name: 'aten::slice',
- calls: 130,
- host_duration: 1028,
- device_duration: 0,
- self_host_duration: 870,
- self_device_duration: 0,
- },
- {
- name: 'detach_',
- calls: 256,
- host_duration: 142,
- device_duration: 0,
- self_host_duration: 129,
- self_device_duration: 0,
- },
- {
- name: 'aten::detach_',
- calls: 256,
- host_duration: 755,
- device_duration: 0,
- self_host_duration: 626,
- self_device_duration: 0,
- },
- {
- name: 'aten::result_type',
- calls: 320,
- host_duration: 168,
- device_duration: 0,
- self_host_duration: 168,
- self_device_duration: 0,
- },
- {
- name: 'aten::pow',
- calls: 320,
- host_duration: 4922,
- device_duration: 0,
- self_host_duration: 4440,
- self_device_duration: 0,
- },
- {
- name: 'aten::sub',
- calls: 320,
- host_duration: 9959,
- device_duration: 0,
- self_host_duration: 4339,
- self_device_duration: 0,
- },
- {
- name: 'aten::gt',
- calls: 320,
- host_duration: 3848,
- device_duration: 0,
- self_host_duration: 2737,
- self_device_duration: 0,
- },
- {
- name: 'aten::_local_scalar_dense',
- calls: 384,
- host_duration: 209,
- device_duration: 0,
- self_host_duration: 209,
- self_device_duration: 0,
- },
- {
- name: 'aten::item',
- calls: 384,
- host_duration: 1398,
- device_duration: 0,
- self_host_duration: 1187,
- self_device_duration: 0,
- },
- {
- name: 'aten::is_nonzero',
- calls: 320,
- host_duration: 2013,
- device_duration: 0,
- self_host_duration: 812,
- self_device_duration: 0,
- },
- {
- name: 'aten::div',
- calls: 64,
- host_duration: 7421,
- device_duration: 0,
- self_host_duration: 6234,
- self_device_duration: 0,
- },
- {
- name: 'aten::resize_',
- calls: 2,
- host_duration: 36,
- device_duration: 0,
- self_host_duration: 36,
- self_device_duration: 0,
- },
- {
- name: 'aten::narrow',
- calls: 2,
- host_duration: 19,
- device_duration: 0,
- self_host_duration: 9,
- self_device_duration: 0,
- },
- {
- name: 'aten::_cat',
- calls: 2,
- host_duration: 4628,
- device_duration: 0,
- self_host_duration: 4566,
- self_device_duration: 0,
- },
- {
- name: 'aten::cat',
- calls: 2,
- host_duration: 4649,
- device_duration: 0,
- self_host_duration: 21,
- self_device_duration: 0,
- },
- {
- name: 'aten::stack',
- calls: 2,
- host_duration: 10884,
- device_duration: 0,
- self_host_duration: 5859,
- self_device_duration: 0,
- },
- ],
- },
- path: '0-1',
- },
- {
- left: {
- name: 'multiple nodes',
- duration: 5170,
- device_duration: 4402,
- total_duration: 4402,
- aggs: [
- {
- name: 'aten::empty_strided',
- calls: 2,
- host_duration: 209,
- device_duration: 0,
- self_host_duration: 209,
- self_device_duration: 0,
- },
- {
- name: 'aten::copy_',
- calls: 2,
- host_duration: 4696,
- device_duration: 4402,
- self_host_duration: 93,
- self_device_duration: 4402,
- },
- {
- name: 'aten::_to_copy',
- calls: 2,
- host_duration: 5111,
- device_duration: 4402,
- self_host_duration: 206,
- self_device_duration: 0,
- },
- {
- name: 'aten::to',
- calls: 2,
- host_duration: 5170,
- device_duration: 4402,
- self_host_duration: 59,
- self_device_duration: 0,
- },
- ],
- },
- right: {
- name: 'multiple nodes',
- duration: 4681,
- device_duration: 4350,
- total_duration: 4350,
- aggs: [
- {
- name: 'aten::empty_strided',
- calls: 2,
- host_duration: 65,
- device_duration: 0,
- self_host_duration: 65,
- self_device_duration: 0,
- },
- {
- name: 'aten::copy_',
- calls: 2,
- host_duration: 4575,
- device_duration: 4350,
- self_host_duration: 26,
- self_device_duration: 4350,
- },
- {
- name: 'aten::_to_copy',
- calls: 2,
- host_duration: 4670,
- device_duration: 4350,
- self_host_duration: 30,
- self_device_duration: 0,
- },
- {
- name: 'aten::to',
- calls: 2,
- host_duration: 4681,
- device_duration: 4350,
- self_host_duration: 11,
- self_device_duration: 0,
- },
- ],
- },
- path: '0-2',
- },
- {
- left: {
- name: 'nn.Module: ResNet',
- duration: 113664,
- device_duration: 61356,
- total_duration: 61356,
- aggs: [
- {
- name: 'aten::empty',
- calls: 318,
- host_duration: 14161,
- device_duration: 0,
- self_host_duration: 14161,
- self_device_duration: 0,
- },
- {
- name: 'aten::cudnn_convolution',
- calls: 53,
- host_duration: 22091,
- device_duration: 36599,
- self_host_duration: 17567,
- self_device_duration: 36599,
- },
- {
- name: 'aten::_convolution',
- calls: 53,
- host_duration: 25744,
- device_duration: 36599,
- self_host_duration: 3653,
- self_device_duration: 0,
- },
- {
- name: 'aten::convolution',
- calls: 53,
- host_duration: 27753,
- device_duration: 36599,
- self_host_duration: 2009,
- self_device_duration: 0,
- },
- {
- name: 'aten::conv2d',
- calls: 53,
- host_duration: 29777,
- device_duration: 36599,
- self_host_duration: 2024,
- self_device_duration: 0,
- },
- {
- name: 'aten::add',
- calls: 53,
- host_duration: 6519,
- device_duration: 54,
- self_host_duration: 5666,
- self_device_duration: 54,
- },
- {
- name: 'aten::empty_like',
- calls: 53,
- host_duration: 5624,
- device_duration: 0,
- self_host_duration: 2390,
- self_device_duration: 0,
- },
- {
- name: 'aten::view',
- calls: 53,
- host_duration: 826,
- device_duration: 0,
- self_host_duration: 826,
- self_device_duration: 0,
- },
- {
- name: 'aten::cudnn_batch_norm',
- calls: 53,
- host_duration: 35818,
- device_duration: 12974,
- self_host_duration: 20557,
- self_device_duration: 12974,
- },
- {
- name: 'aten::_batch_norm_impl_index',
- calls: 53,
- host_duration: 38324,
- device_duration: 12974,
- self_host_duration: 2506,
- self_device_duration: 0,
- },
- {
- name: 'aten::batch_norm',
- calls: 53,
- host_duration: 40105,
- device_duration: 12974,
- self_host_duration: 1781,
- self_device_duration: 0,
- },
- {
- name: 'aten::clamp_min',
- calls: 49,
- host_duration: 2702,
- device_duration: 6002,
- self_host_duration: 1935,
- self_device_duration: 6002,
- },
- {
- name: 'aten::clamp_min_',
- calls: 49,
- host_duration: 4273,
- device_duration: 6002,
- self_host_duration: 1571,
- self_device_duration: 0,
- },
- {
- name: 'aten::relu_',
- calls: 49,
- host_duration: 8371,
- device_duration: 6002,
- self_host_duration: 4098,
- self_device_duration: 0,
- },
- {
- name: 'aten::max_pool2d_with_indices',
- calls: 1,
- host_duration: 230,
- device_duration: 474,
- self_host_duration: 212,
- self_device_duration: 474,
- },
- {
- name: 'aten::max_pool2d',
- calls: 1,
- host_duration: 280,
- device_duration: 474,
- self_host_duration: 50,
- self_device_duration: 0,
- },
- {
- name: 'aten::add_',
- calls: 16,
- host_duration: 1546,
- device_duration: 5141,
- self_host_duration: 1290,
- self_device_duration: 5141,
- },
- {
- name: 'aten::mean',
- calls: 1,
- host_duration: 189,
- device_duration: 69,
- self_host_duration: 170,
- self_device_duration: 69,
- },
- {
- name: 'aten::adaptive_avg_pool2d',
- calls: 1,
- host_duration: 234,
- device_duration: 69,
- self_host_duration: 45,
- self_device_duration: 0,
- },
- {
- name: 'aten::_reshape_alias',
- calls: 1,
- host_duration: 52,
- device_duration: 0,
- self_host_duration: 52,
- self_device_duration: 0,
- },
- {
- name: 'aten::flatten',
- calls: 1,
- host_duration: 106,
- device_duration: 0,
- self_host_duration: 54,
- self_device_duration: 0,
- },
- {
- name: 'aten::as_strided',
- calls: 2,
- host_duration: 23,
- device_duration: 0,
- self_host_duration: 23,
- self_device_duration: 0,
- },
- {
- name: 'aten::transpose',
- calls: 1,
- host_duration: 55,
- device_duration: 0,
- self_host_duration: 41,
- self_device_duration: 0,
- },
- {
- name: 'aten::t',
- calls: 1,
- host_duration: 119,
- device_duration: 0,
- self_host_duration: 64,
- self_device_duration: 0,
- },
- {
- name: 'aten::expand',
- calls: 1,
- host_duration: 49,
- device_duration: 0,
- self_host_duration: 40,
- self_device_duration: 0,
- },
- {
- name: 'aten::addmm',
- calls: 1,
- host_duration: 404,
- device_duration: 43,
- self_host_duration: 302,
- self_device_duration: 43,
- },
- {
- name: 'aten::linear',
- calls: 1,
- host_duration: 591,
- device_duration: 43,
- self_host_duration: 68,
- self_device_duration: 0,
- },
- ],
- },
- right: {
- name: 'nn.Module: ResNet',
- duration: 28725,
- device_duration: 60899,
- total_duration: 60899,
- aggs: [
- {
- name: 'aten::empty',
- calls: 318,
- host_duration: 2292,
- device_duration: 0,
- self_host_duration: 2292,
- self_device_duration: 0,
- },
- {
- name: 'aten::cudnn_convolution',
- calls: 53,
- host_duration: 8713,
- device_duration: 36205,
- self_host_duration: 6819,
- self_device_duration: 36205,
- },
- {
- name: 'aten::_convolution',
- calls: 53,
- host_duration: 9298,
- device_duration: 36205,
- self_host_duration: 585,
- self_device_duration: 0,
- },
- {
- name: 'aten::convolution',
- calls: 53,
- host_duration: 9653,
- device_duration: 36205,
- self_host_duration: 355,
- self_device_duration: 0,
- },
- {
- name: 'aten::conv2d',
- calls: 53,
- host_duration: 9932,
- device_duration: 36205,
- self_host_duration: 279,
- self_device_duration: 0,
- },
- {
- name: 'aten::add',
- calls: 53,
- host_duration: 1897,
- device_duration: 58,
- self_host_duration: 1201,
- self_device_duration: 58,
- },
- {
- name: 'aten::empty_like',
- calls: 53,
- host_duration: 933,
- device_duration: 0,
- self_host_duration: 284,
- self_device_duration: 0,
- },
- {
- name: 'aten::view',
- calls: 53,
- host_duration: 130,
- device_duration: 0,
- self_host_duration: 130,
- self_device_duration: 0,
- },
- {
- name: 'aten::cudnn_batch_norm',
- calls: 53,
- host_duration: 5540,
- device_duration: 12913,
- self_host_duration: 2504,
- self_device_duration: 12913,
- },
- {
- name: 'aten::_batch_norm_impl_index',
- calls: 53,
- host_duration: 5942,
- device_duration: 12913,
- self_host_duration: 402,
- self_device_duration: 0,
- },
- {
- name: 'aten::batch_norm',
- calls: 53,
- host_duration: 6219,
- device_duration: 12913,
- self_host_duration: 277,
- self_device_duration: 0,
- },
- {
- name: 'aten::clamp_min',
- calls: 49,
- host_duration: 1108,
- device_duration: 6006,
- self_host_duration: 523,
- self_device_duration: 6006,
- },
- {
- name: 'aten::clamp_min_',
- calls: 49,
- host_duration: 1315,
- device_duration: 6006,
- self_host_duration: 207,
- self_device_duration: 0,
- },
- {
- name: 'aten::relu_',
- calls: 49,
- host_duration: 1939,
- device_duration: 6006,
- self_host_duration: 624,
- self_device_duration: 0,
- },
- {
- name: 'aten::max_pool2d_with_indices',
- calls: 1,
- host_duration: 53,
- device_duration: 472,
- self_host_duration: 38,
- self_device_duration: 472,
- },
- {
- name: 'aten::max_pool2d',
- calls: 1,
- host_duration: 61,
- device_duration: 472,
- self_host_duration: 8,
- self_device_duration: 0,
- },
- {
- name: 'aten::add_',
- calls: 16,
- host_duration: 448,
- device_duration: 5140,
- self_host_duration: 268,
- self_device_duration: 5140,
- },
- {
- name: 'aten::mean',
- calls: 1,
- host_duration: 53,
- device_duration: 63,
- self_host_duration: 39,
- self_device_duration: 63,
- },
- {
- name: 'aten::adaptive_avg_pool2d',
- calls: 1,
- host_duration: 59,
- device_duration: 63,
- self_host_duration: 6,
- self_device_duration: 0,
- },
- {
- name: 'aten::_reshape_alias',
- calls: 1,
- host_duration: 8,
- device_duration: 0,
- self_host_duration: 8,
- self_device_duration: 0,
- },
- {
- name: 'aten::flatten',
- calls: 1,
- host_duration: 15,
- device_duration: 0,
- self_host_duration: 7,
- self_device_duration: 0,
- },
- {
- name: 'aten::as_strided',
- calls: 2,
- host_duration: 3,
- device_duration: 0,
- self_host_duration: 3,
- self_device_duration: 0,
- },
- {
- name: 'aten::transpose',
- calls: 1,
- host_duration: 8,
- device_duration: 0,
- self_host_duration: 6,
- self_device_duration: 0,
- },
- {
- name: 'aten::t',
- calls: 1,
- host_duration: 15,
- device_duration: 0,
- self_host_duration: 7,
- self_device_duration: 0,
- },
- {
- name: 'aten::expand',
- calls: 1,
- host_duration: 6,
- device_duration: 0,
- self_host_duration: 5,
- self_device_duration: 0,
- },
- {
- name: 'aten::addmm',
- calls: 1,
- host_duration: 173,
- device_duration: 42,
- self_host_duration: 123,
- self_device_duration: 42,
- },
- {
- name: 'aten::linear',
- calls: 1,
- host_duration: 198,
- device_duration: 42,
- self_host_duration: 10,
- self_device_duration: 0,
- },
- ],
- },
- path: '0-3',
- },
- {
- left: {
- name: 'nn.Module: CrossEntropyLoss',
- duration: 711,
- device_duration: 11,
- total_duration: 11,
- aggs: [
- {
- name: 'aten::to',
- calls: 1,
- host_duration: 5,
- device_duration: 0,
- self_host_duration: 5,
- self_device_duration: 0,
- },
- {
- name: 'aten::_log_softmax',
- calls: 1,
- host_duration: 158,
- device_duration: 7,
- self_host_duration: 139,
- self_device_duration: 7,
- },
- {
- name: 'aten::log_softmax',
- calls: 1,
- host_duration: 241,
- device_duration: 7,
- self_host_duration: 78,
- self_device_duration: 0,
- },
- {
- name: 'aten::resize_',
- calls: 1,
- host_duration: 5,
- device_duration: 0,
- self_host_duration: 5,
- self_device_duration: 0,
- },
- {
- name: 'aten::nll_loss_forward',
- calls: 1,
- host_duration: 256,
- device_duration: 4,
- self_host_duration: 233,
- self_device_duration: 4,
- },
- {
- name: 'aten::nll_loss',
- calls: 1,
- host_duration: 290,
- device_duration: 4,
- self_host_duration: 34,
- self_device_duration: 0,
- },
- {
- name: 'aten::nll_loss_nd',
- calls: 1,
- host_duration: 313,
- device_duration: 4,
- self_host_duration: 23,
- self_device_duration: 0,
- },
- {
- name: 'aten::cross_entropy_loss',
- calls: 1,
- host_duration: 614,
- device_duration: 11,
- self_host_duration: 60,
- self_device_duration: 0,
- },
- ],
- },
- right: {
- name: 'nn.Module: CrossEntropyLoss',
- duration: 156,
- device_duration: 11,
- total_duration: 11,
- aggs: [
- {
- name: 'aten::to',
- calls: 1,
- host_duration: 2,
- device_duration: 0,
- self_host_duration: 2,
- self_device_duration: 0,
- },
- {
- name: 'aten::_log_softmax',
- calls: 1,
- host_duration: 42,
- device_duration: 7,
- self_host_duration: 28,
- self_device_duration: 7,
- },
- {
- name: 'aten::log_softmax',
- calls: 1,
- host_duration: 54,
- device_duration: 7,
- self_host_duration: 10,
- self_device_duration: 0,
- },
- {
- name: 'aten::resize_',
- calls: 1,
- host_duration: 0,
- device_duration: 0,
- self_host_duration: 0,
- self_device_duration: 0,
- },
- {
- name: 'aten::nll_loss_forward',
- calls: 1,
- host_duration: 47,
- device_duration: 4,
- self_host_duration: 34,
- self_device_duration: 4,
- },
- {
- name: 'aten::nll_loss',
- calls: 1,
- host_duration: 52,
- device_duration: 4,
- self_host_duration: 5,
- self_device_duration: 0,
- },
- {
- name: 'aten::nll_loss_nd',
- calls: 1,
- host_duration: 56,
- device_duration: 4,
- self_host_duration: 4,
- self_device_duration: 0,
- },
- {
- name: 'aten::cross_entropy_loss',
- calls: 1,
- host_duration: 119,
- device_duration: 11,
- self_host_duration: 9,
- self_device_duration: 0,
- },
- ],
- },
- path: '0-4',
- },
- {
- left: {
- name: 'aten::zeros',
- duration: 119,
- device_duration: 0,
- total_duration: 119,
- aggs: [
- {
- name: 'aten::empty',
- calls: 1,
- host_duration: 47,
- device_duration: 0,
- self_host_duration: 47,
- self_device_duration: 0,
- },
- {
- name: 'aten::zero_',
- calls: 1,
- host_duration: 4,
- device_duration: 0,
- self_host_duration: 4,
- self_device_duration: 0,
- },
- {
- name: 'aten::zeros',
- calls: 1,
- host_duration: 119,
- device_duration: 0,
- self_host_duration: 68,
- self_device_duration: 0,
- },
- ],
- },
- right: {
- name: 'aten::zeros',
- duration: 17,
- device_duration: 0,
- total_duration: 17,
- aggs: [
- {
- name: 'aten::empty',
- calls: 1,
- host_duration: 8,
- device_duration: 0,
- self_host_duration: 8,
- self_device_duration: 0,
- },
- {
- name: 'aten::zero_',
- calls: 1,
- host_duration: 2,
- device_duration: 0,
- self_host_duration: 2,
- self_device_duration: 0,
- },
- {
- name: 'aten::zeros',
- calls: 1,
- host_duration: 17,
- device_duration: 0,
- self_host_duration: 7,
- self_device_duration: 0,
- },
- ],
- },
- path: '0-5',
- },
- {
- left: {
- name: 'Optimizer.zero_grad#SGD.zero_grad',
- duration: 22960,
- device_duration: 142,
- total_duration: 142,
- aggs: [
- {
- name: 'aten::empty',
- calls: 1,
- host_duration: 38,
- device_duration: 0,
- self_host_duration: 38,
- self_device_duration: 0,
- },
- {
- name: 'aten::fill_',
- calls: 161,
- host_duration: 7097,
- device_duration: 142,
- self_host_duration: 4914,
- self_device_duration: 142,
- },
- {
- name: 'aten::zero_',
- calls: 161,
- host_duration: 14725,
- device_duration: 142,
- self_host_duration: 7628,
- self_device_duration: 0,
- },
- ],
- },
- right: {
- name: 'Optimizer.zero_grad#SGD.zero_grad',
- duration: 4075,
- device_duration: 264,
- total_duration: 264,
- aggs: [
- {
- name: 'aten::empty',
- calls: 1,
- host_duration: 6,
- device_duration: 0,
- self_host_duration: 6,
- self_device_duration: 0,
- },
- {
- name: 'aten::fill_',
- calls: 161,
- host_duration: 2036,
- device_duration: 264,
- self_host_duration: 909,
- self_device_duration: 264,
- },
- {
- name: 'aten::zero_',
- calls: 161,
- host_duration: 2855,
- device_duration: 264,
- self_host_duration: 819,
- self_device_duration: 0,
- },
- ],
- },
- path: '0-6',
- },
- {
- left: {
- name: 'aten::ones_like',
- duration: 253,
- device_duration: 1,
- total_duration: 1,
- aggs: [
- {
- name: 'aten::empty_strided',
- calls: 1,
- host_duration: 79,
- device_duration: 0,
- self_host_duration: 79,
- self_device_duration: 0,
- },
- {
- name: 'aten::empty_like',
- calls: 1,
- host_duration: 126,
- device_duration: 0,
- self_host_duration: 47,
- self_device_duration: 0,
- },
- {
- name: 'aten::fill_',
- calls: 1,
- host_duration: 50,
- device_duration: 1,
- self_host_duration: 35,
- self_device_duration: 1,
- },
- {
- name: 'aten::ones_like',
- calls: 1,
- host_duration: 253,
- device_duration: 1,
- self_host_duration: 77,
- self_device_duration: 0,
- },
- ],
- },
- right: {
- name: 'aten::ones_like',
- duration: 53,
- device_duration: 1,
- total_duration: 1,
- aggs: [
- {
- name: 'aten::empty_strided',
- calls: 1,
- host_duration: 18,
- device_duration: 0,
- self_host_duration: 18,
- self_device_duration: 0,
- },
- {
- name: 'aten::empty_like',
- calls: 1,
- host_duration: 26,
- device_duration: 0,
- self_host_duration: 8,
- self_device_duration: 0,
- },
- {
- name: 'aten::fill_',
- calls: 1,
- host_duration: 20,
- device_duration: 1,
- self_host_duration: 8,
- self_device_duration: 1,
- },
- {
- name: 'aten::ones_like',
- calls: 1,
- host_duration: 53,
- device_duration: 1,
- self_host_duration: 7,
- self_device_duration: 0,
- },
- ],
- },
- path: '0-7',
- },
- {
- left: {
- name: 'nn.Module: CrossEntropyLoss.backward',
- duration: 898,
- device_duration: 13,
- total_duration: 13,
- aggs: [
- {
- name: 'aten::fill_',
- calls: 1,
- host_duration: 69,
- device_duration: 1,
- self_host_duration: 43,
- self_device_duration: 1,
- },
- {
- name: 'aten::zero_',
- calls: 1,
- host_duration: 120,
- device_duration: 1,
- self_host_duration: 51,
- self_device_duration: 0,
- },
- {
- name: 'aten::nll_loss_backward',
- calls: 1,
- host_duration: 304,
- device_duration: 4,
- self_host_duration: 168,
- self_device_duration: 3,
- },
- {
- name: 'NllLossBackward0',
- calls: 1,
- host_duration: 368,
- device_duration: 4,
- self_host_duration: 64,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: NllLossBackward0',
- calls: 1,
- host_duration: 503,
- device_duration: 4,
- self_host_duration: 135,
- self_device_duration: 0,
- },
- {
- name: 'aten::_log_softmax_backward_data',
- calls: 1,
- host_duration: 127,
- device_duration: 9,
- self_host_duration: 105,
- self_device_duration: 9,
- },
- {
- name: 'LogSoftmaxBackward0',
- calls: 1,
- host_duration: 207,
- device_duration: 9,
- self_host_duration: 80,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: LogSoftmaxBackward0',
- calls: 1,
- host_duration: 349,
- device_duration: 9,
- self_host_duration: 142,
- self_device_duration: 0,
- },
- ],
- },
- right: {
- name: 'nn.Module: CrossEntropyLoss.backward',
- duration: 214,
- device_duration: 14,
- total_duration: 14,
- aggs: [
- {
- name: 'aten::fill_',
- calls: 1,
- host_duration: 36,
- device_duration: 2,
- self_host_duration: 13,
- self_device_duration: 2,
- },
- {
- name: 'aten::zero_',
- calls: 1,
- host_duration: 45,
- device_duration: 2,
- self_host_duration: 9,
- self_device_duration: 0,
- },
- {
- name: 'aten::nll_loss_backward',
- calls: 1,
- host_duration: 99,
- device_duration: 5,
- self_host_duration: 43,
- self_device_duration: 3,
- },
- {
- name: 'NllLossBackward0',
- calls: 1,
- host_duration: 112,
- device_duration: 5,
- self_host_duration: 13,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: NllLossBackward0',
- calls: 1,
- host_duration: 141,
- device_duration: 5,
- self_host_duration: 29,
- self_device_duration: 0,
- },
- {
- name: 'aten::_log_softmax_backward_data',
- calls: 1,
- host_duration: 35,
- device_duration: 9,
- self_host_duration: 21,
- self_device_duration: 9,
- },
- {
- name: 'LogSoftmaxBackward0',
- calls: 1,
- host_duration: 46,
- device_duration: 9,
- self_host_duration: 11,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: LogSoftmaxBackward0',
- calls: 1,
- host_duration: 64,
- device_duration: 9,
- self_host_duration: 18,
- self_device_duration: 0,
- },
- ],
- },
- path: '0-8',
- },
- {
- left: {
- name: 'nn.Module: ResNet.backward',
- duration: 180998,
- device_duration: 123177,
- total_duration: 123177,
- aggs: [
- {
- name: 'aten::as_strided',
- calls: 5,
- host_duration: 61,
- device_duration: 0,
- self_host_duration: 61,
- self_device_duration: 0,
- },
- {
- name: 'aten::transpose',
- calls: 4,
- host_duration: 226,
- device_duration: 0,
- self_host_duration: 180,
- self_device_duration: 0,
- },
- {
- name: 'aten::t',
- calls: 4,
- host_duration: 399,
- device_duration: 0,
- self_host_duration: 173,
- self_device_duration: 0,
- },
- {
- name: 'aten::mm',
- calls: 2,
- host_duration: 345,
- device_duration: 72,
- self_host_duration: 282,
- self_device_duration: 72,
- },
- {
- name: 'AddmmBackward0',
- calls: 1,
- host_duration: 854,
- device_duration: 72,
- self_host_duration: 208,
- self_device_duration: 0,
- },
- {
- name: 'aten::sum',
- calls: 1,
- host_duration: 173,
- device_duration: 8,
- self_host_duration: 153,
- self_device_duration: 8,
- },
- {
- name: 'aten::view',
- calls: 54,
- host_duration: 971,
- device_duration: 0,
- self_host_duration: 971,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: AddmmBackward0',
- calls: 1,
- host_duration: 1333,
- device_duration: 80,
- self_host_duration: 271,
- self_device_duration: 0,
- },
- {
- name: 'aten::add_',
- calls: 161,
- host_duration: 12621,
- device_duration: 501,
- self_host_duration: 9839,
- self_device_duration: 501,
- },
- {
- name: 'torch::autograd::AccumulateGrad',
- calls: 161,
- host_duration: 20767,
- device_duration: 501,
- self_host_duration: 8146,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: torch::autograd::AccumulateGrad',
- calls: 161,
- host_duration: 35735,
- device_duration: 501,
- self_host_duration: 14968,
- self_device_duration: 0,
- },
- {
- name: 'TBackward0',
- calls: 1,
- host_duration: 128,
- device_duration: 0,
- self_host_duration: 30,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: TBackward0',
- calls: 1,
- host_duration: 197,
- device_duration: 0,
- self_host_duration: 69,
- self_device_duration: 0,
- },
- {
- name: 'aten::_reshape_alias',
- calls: 1,
- host_duration: 31,
- device_duration: 0,
- self_host_duration: 31,
- self_device_duration: 0,
- },
- {
- name: 'aten::reshape',
- calls: 1,
- host_duration: 79,
- device_duration: 0,
- self_host_duration: 48,
- self_device_duration: 0,
- },
- {
- name: 'ReshapeAliasBackward0',
- calls: 1,
- host_duration: 131,
- device_duration: 0,
- self_host_duration: 52,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: ReshapeAliasBackward0',
- calls: 1,
- host_duration: 197,
- device_duration: 0,
- self_host_duration: 66,
- self_device_duration: 0,
- },
- {
- name: 'aten::expand',
- calls: 1,
- host_duration: 84,
- device_duration: 0,
- self_host_duration: 69,
- self_device_duration: 0,
- },
- {
- name: 'aten::to',
- calls: 1,
- host_duration: 6,
- device_duration: 0,
- self_host_duration: 6,
- self_device_duration: 0,
- },
- {
- name: 'aten::div',
- calls: 1,
- host_duration: 289,
- device_duration: 38,
- self_host_duration: 267,
- self_device_duration: 38,
- },
- {
- name: 'MeanBackward1',
- calls: 1,
- host_duration: 489,
- device_duration: 38,
- self_host_duration: 110,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: MeanBackward1',
- calls: 1,
- host_duration: 592,
- device_duration: 38,
- self_host_duration: 103,
- self_device_duration: 0,
- },
- {
- name: 'aten::threshold_backward',
- calls: 49,
- host_duration: 6958,
- device_duration: 8972,
- self_host_duration: 6094,
- self_device_duration: 8972,
- },
- {
- name: 'ReluBackward0',
- calls: 49,
- host_duration: 10647,
- device_duration: 8972,
- self_host_duration: 3689,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: ReluBackward0',
- calls: 49,
- host_duration: 16826,
- device_duration: 8972,
- self_host_duration: 6179,
- self_device_duration: 0,
- },
- {
- name: 'AddBackward0',
- calls: 16,
- host_duration: 129,
- device_duration: 0,
- self_host_duration: 129,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: AddBackward0',
- calls: 16,
- host_duration: 1301,
- device_duration: 0,
- self_host_duration: 1172,
- self_device_duration: 0,
- },
- {
- name: 'aten::empty',
- calls: 370,
- host_duration: 20319,
- device_duration: 0,
- self_host_duration: 20319,
- self_device_duration: 0,
- },
- {
- name: 'aten::cudnn_batch_norm_backward',
- calls: 53,
- host_duration: 31300,
- device_duration: 22267,
- self_host_duration: 18144,
- self_device_duration: 22267,
- },
- {
- name: 'CudnnBatchNormBackward0',
- calls: 53,
- host_duration: 34805,
- device_duration: 22267,
- self_host_duration: 3505,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: CudnnBatchNormBackward0',
- calls: 53,
- host_duration: 44607,
- device_duration: 22267,
- self_host_duration: 9802,
- self_device_duration: 0,
- },
- {
- name: 'aten::cudnn_convolution_backward_input',
- calls: 52,
- host_duration: 20324,
- device_duration: 38733,
- self_host_duration: 15252,
- self_device_duration: 38733,
- },
- {
- name: 'aten::cudnn_convolution_backward_weight',
- calls: 53,
- host_duration: 21997,
- device_duration: 45837,
- self_host_duration: 13786,
- self_device_duration: 45837,
- },
- {
- name: 'aten::cudnn_convolution_backward',
- calls: 53,
- host_duration: 50059,
- device_duration: 84570,
- self_host_duration: 7738,
- self_device_duration: 0,
- },
- {
- name: 'CudnnConvolutionBackward0',
- calls: 53,
- host_duration: 53558,
- device_duration: 84570,
- self_host_duration: 3499,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: CudnnConvolutionBackward0',
- calls: 53,
- host_duration: 64252,
- device_duration: 89775,
- self_host_duration: 8462,
- self_device_duration: 0,
- },
- {
- name: 'aten::add',
- calls: 16,
- host_duration: 2232,
- device_duration: 5205,
- self_host_duration: 1944,
- self_device_duration: 5205,
- },
- {
- name: 'aten::fill_',
- calls: 1,
- host_duration: 61,
- device_duration: 230,
- self_host_duration: 44,
- self_device_duration: 230,
- },
- {
- name: 'aten::zero_',
- calls: 1,
- host_duration: 104,
- device_duration: 230,
- self_host_duration: 43,
- self_device_duration: 0,
- },
- {
- name: 'aten::max_pool2d_with_indices_backward',
- calls: 1,
- host_duration: 246,
- device_duration: 1544,
- self_host_duration: 128,
- self_device_duration: 1314,
- },
- {
- name: 'MaxPool2DWithIndicesBackward0',
- calls: 1,
- host_duration: 304,
- device_duration: 1544,
- self_host_duration: 58,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: MaxPool2DWithIndicesBackward0',
- calls: 1,
- host_duration: 425,
- device_duration: 1544,
- self_host_duration: 121,
- self_device_duration: 0,
- },
- ],
- },
- right: {
- name: 'nn.Module: ResNet.backward',
- duration: 43714,
- device_duration: 120604,
- total_duration: 120604,
- aggs: [
- {
- name: 'aten::as_strided',
- calls: 5,
- host_duration: 9,
- device_duration: 0,
- self_host_duration: 9,
- self_device_duration: 0,
- },
- {
- name: 'aten::transpose',
- calls: 4,
- host_duration: 38,
- device_duration: 0,
- self_host_duration: 31,
- self_device_duration: 0,
- },
- {
- name: 'aten::t',
- calls: 4,
- host_duration: 59,
- device_duration: 0,
- self_host_duration: 21,
- self_device_duration: 0,
- },
- {
- name: 'aten::mm',
- calls: 2,
- host_duration: 139,
- device_duration: 67,
- self_host_duration: 90,
- self_device_duration: 67,
- },
- {
- name: 'AddmmBackward0',
- calls: 1,
- host_duration: 210,
- device_duration: 67,
- self_host_duration: 23,
- self_device_duration: 0,
- },
- {
- name: 'aten::sum',
- calls: 1,
- host_duration: 47,
- device_duration: 7,
- self_host_duration: 32,
- self_device_duration: 7,
- },
- {
- name: 'aten::view',
- calls: 54,
- host_duration: 166,
- device_duration: 0,
- self_host_duration: 166,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: AddmmBackward0',
- calls: 1,
- host_duration: 299,
- device_duration: 74,
- self_host_duration: 37,
- self_device_duration: 0,
- },
- {
- name: 'aten::add_',
- calls: 161,
- host_duration: 4087,
- device_duration: 534,
- self_host_duration: 2037,
- self_device_duration: 534,
- },
- {
- name: 'torch::autograd::AccumulateGrad',
- calls: 161,
- host_duration: 5134,
- device_duration: 534,
- self_host_duration: 1047,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: torch::autograd::AccumulateGrad',
- calls: 161,
- host_duration: 7473,
- device_duration: 534,
- self_host_duration: 2339,
- self_device_duration: 0,
- },
- {
- name: 'TBackward0',
- calls: 1,
- host_duration: 14,
- device_duration: 0,
- self_host_duration: 3,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: TBackward0',
- calls: 1,
- host_duration: 21,
- device_duration: 0,
- self_host_duration: 7,
- self_device_duration: 0,
- },
- {
- name: 'aten::_reshape_alias',
- calls: 1,
- host_duration: 5,
- device_duration: 0,
- self_host_duration: 5,
- self_device_duration: 0,
- },
- {
- name: 'aten::reshape',
- calls: 1,
- host_duration: 10,
- device_duration: 0,
- self_host_duration: 5,
- self_device_duration: 0,
- },
- {
- name: 'ReshapeAliasBackward0',
- calls: 1,
- host_duration: 14,
- device_duration: 0,
- self_host_duration: 4,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: ReshapeAliasBackward0',
- calls: 1,
- host_duration: 21,
- device_duration: 0,
- self_host_duration: 7,
- self_device_duration: 0,
- },
- {
- name: 'aten::expand',
- calls: 1,
- host_duration: 9,
- device_duration: 0,
- self_host_duration: 7,
- self_device_duration: 0,
- },
- {
- name: 'aten::to',
- calls: 1,
- host_duration: 1,
- device_duration: 0,
- self_host_duration: 1,
- self_device_duration: 0,
- },
- {
- name: 'aten::div',
- calls: 1,
- host_duration: 70,
- device_duration: 38,
- self_host_duration: 49,
- self_device_duration: 38,
- },
- {
- name: 'MeanBackward1',
- calls: 1,
- host_duration: 89,
- device_duration: 38,
- self_host_duration: 9,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: MeanBackward1',
- calls: 1,
- host_duration: 102,
- device_duration: 38,
- self_host_duration: 13,
- self_device_duration: 0,
- },
- {
- name: 'aten::threshold_backward',
- calls: 49,
- host_duration: 1789,
- device_duration: 9015,
- self_host_duration: 1158,
- self_device_duration: 9015,
- },
- {
- name: 'ReluBackward0',
- calls: 49,
- host_duration: 2237,
- device_duration: 9015,
- self_host_duration: 448,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: ReluBackward0',
- calls: 49,
- host_duration: 3144,
- device_duration: 9015,
- self_host_duration: 907,
- self_device_duration: 0,
- },
- {
- name: 'AddBackward0',
- calls: 16,
- host_duration: 12,
- device_duration: 0,
- self_host_duration: 12,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: AddBackward0',
- calls: 16,
- host_duration: 126,
- device_duration: 0,
- self_host_duration: 114,
- self_device_duration: 0,
- },
- {
- name: 'aten::empty',
- calls: 370,
- host_duration: 3292,
- device_duration: 0,
- self_host_duration: 3292,
- self_device_duration: 0,
- },
- {
- name: 'aten::cudnn_batch_norm_backward',
- calls: 53,
- host_duration: 4896,
- device_duration: 22157,
- self_host_duration: 2136,
- self_device_duration: 22157,
- },
- {
- name: 'CudnnBatchNormBackward0',
- calls: 53,
- host_duration: 5495,
- device_duration: 22157,
- self_host_duration: 599,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: CudnnBatchNormBackward0',
- calls: 53,
- host_duration: 7289,
- device_duration: 22157,
- self_host_duration: 1794,
- self_device_duration: 0,
- },
- {
- name: 'aten::cudnn_convolution_backward_input',
- calls: 52,
- host_duration: 9468,
- device_duration: 37714,
- self_host_duration: 7052,
- self_device_duration: 37714,
- },
- {
- name: 'aten::cudnn_convolution_backward_weight',
- calls: 53,
- host_duration: 8906,
- device_duration: 44342,
- self_host_duration: 5723,
- self_device_duration: 44342,
- },
- {
- name: 'aten::cudnn_convolution_backward',
- calls: 53,
- host_duration: 19611,
- device_duration: 82056,
- self_host_duration: 1237,
- self_device_duration: 0,
- },
- {
- name: 'CudnnConvolutionBackward0',
- calls: 53,
- host_duration: 20205,
- device_duration: 82056,
- self_host_duration: 594,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: CudnnConvolutionBackward0',
- calls: 53,
- host_duration: 22185,
- device_duration: 87283,
- self_host_duration: 1386,
- self_device_duration: 0,
- },
- {
- name: 'aten::add',
- calls: 16,
- host_duration: 594,
- device_duration: 5227,
- self_host_duration: 380,
- self_device_duration: 5227,
- },
- {
- name: 'aten::fill_',
- calls: 1,
- host_duration: 24,
- device_duration: 230,
- self_host_duration: 11,
- self_device_duration: 230,
- },
- {
- name: 'aten::zero_',
- calls: 1,
- host_duration: 32,
- device_duration: 230,
- self_host_duration: 8,
- self_device_duration: 0,
- },
- {
- name: 'aten::max_pool2d_with_indices_backward',
- calls: 1,
- host_duration: 72,
- device_duration: 1503,
- self_host_duration: 31,
- self_device_duration: 1273,
- },
- {
- name: 'MaxPool2DWithIndicesBackward0',
- calls: 1,
- host_duration: 82,
- device_duration: 1503,
- self_host_duration: 10,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: MaxPool2DWithIndicesBackward0',
- calls: 1,
- host_duration: 103,
- device_duration: 1503,
- self_host_duration: 21,
- self_device_duration: 0,
- },
- ],
- },
- path: '0-9',
- },
- {
- left: {
- name: 'aten::zeros',
- duration: 154,
- device_duration: 0,
- total_duration: 154,
- aggs: [
- {
- name: 'aten::empty',
- calls: 1,
- host_duration: 75,
- device_duration: 0,
- self_host_duration: 75,
- self_device_duration: 0,
- },
- {
- name: 'aten::zero_',
- calls: 1,
- host_duration: 4,
- device_duration: 0,
- self_host_duration: 4,
- self_device_duration: 0,
- },
- {
- name: 'aten::zeros',
- calls: 1,
- host_duration: 154,
- device_duration: 0,
- self_host_duration: 75,
- self_device_duration: 0,
- },
- ],
- },
- right: {
- name: 'aten::zeros',
- duration: 42,
- device_duration: 0,
- total_duration: 42,
- aggs: [
- {
- name: 'aten::empty',
- calls: 1,
- host_duration: 32,
- device_duration: 0,
- self_host_duration: 32,
- self_device_duration: 0,
- },
- {
- name: 'aten::zero_',
- calls: 1,
- host_duration: 1,
- device_duration: 0,
- self_host_duration: 1,
- self_device_duration: 0,
- },
- {
- name: 'aten::zeros',
- calls: 1,
- host_duration: 42,
- device_duration: 0,
- self_host_duration: 9,
- self_device_duration: 0,
- },
- ],
- },
- path: '0-10',
- },
- {
- left: {
- name: 'Optimizer.step#SGD.step',
- duration: 75880,
- device_duration: 1289,
- total_duration: 1289,
- aggs: [
- {
- name: 'aten::empty',
- calls: 1,
- host_duration: 40,
- device_duration: 0,
- self_host_duration: 40,
- self_device_duration: 0,
- },
- {
- name: 'aten::mul_',
- calls: 161,
- host_duration: 11873,
- device_duration: 396,
- self_host_duration: 9505,
- self_device_duration: 396,
- },
- {
- name: 'aten::add_',
- calls: 322,
- host_duration: 22327,
- device_duration: 893,
- self_host_duration: 17668,
- self_device_duration: 893,
- },
- ],
- },
- right: {
- name: 'Optimizer.step#SGD.step',
- duration: 16441,
- device_duration: 1305,
- total_duration: 1305,
- aggs: [
- {
- name: 'aten::empty',
- calls: 1,
- host_duration: 6,
- device_duration: 0,
- self_host_duration: 6,
- self_device_duration: 0,
- },
- {
- name: 'aten::mul_',
- calls: 161,
- host_duration: 3395,
- device_duration: 399,
- self_host_duration: 1806,
- self_device_duration: 399,
- },
- {
- name: 'aten::add_',
- calls: 322,
- host_duration: 6217,
- device_duration: 906,
- self_host_duration: 3246,
- self_device_duration: 906,
- },
- ],
- },
- path: '0-11',
- },
- {
- left: {
- name: 'multiple nodes',
- duration: 145,
- device_duration: 0,
- total_duration: 145,
- aggs: [
- {
- name: 'aten::empty',
- calls: 2,
- host_duration: 79,
- device_duration: 0,
- self_host_duration: 79,
- self_device_duration: 0,
- },
- {
- name: 'aten::zero_',
- calls: 1,
- host_duration: 4,
- device_duration: 0,
- self_host_duration: 4,
- self_device_duration: 0,
- },
- {
- name: 'aten::zeros',
- calls: 1,
- host_duration: 106,
- device_duration: 0,
- self_host_duration: 62,
- self_device_duration: 0,
- },
- ],
- },
- right: {
- name: 'multiple nodes',
- duration: 15,
- device_duration: 0,
- total_duration: 15,
- aggs: [
- {
- name: 'aten::empty',
- calls: 2,
- host_duration: 10,
- device_duration: 0,
- self_host_duration: 10,
- self_device_duration: 0,
- },
- {
- name: 'aten::zero_',
- calls: 1,
- host_duration: 0,
- device_duration: 0,
- self_host_duration: 0,
- self_device_duration: 0,
- },
- {
- name: 'aten::zeros',
- calls: 1,
- host_duration: 9,
- device_duration: 0,
- self_host_duration: 5,
- self_device_duration: 0,
- },
- ],
- },
- path: '0-12',
- },
- {
- left: {
- name: 'enumerate(DataLoader)#_SingleProcessDataLoaderIter.__next__',
- duration: 1679463,
- device_duration: 0,
- total_duration: 1679463,
- aggs: [
- {
- name: 'aten::empty',
- calls: 1413,
- host_duration: 53837,
- device_duration: 0,
- self_host_duration: 53837,
- self_device_duration: 0,
- },
- {
- name: 'aten::zero_',
- calls: 257,
- host_duration: 955,
- device_duration: 0,
- self_host_duration: 955,
- self_device_duration: 0,
- },
- {
- name: 'aten::zeros',
- calls: 257,
- host_duration: 26673,
- device_duration: 0,
- self_host_duration: 16083,
- self_device_duration: 0,
- },
- {
- name: 'aten::to',
- calls: 1344,
- host_duration: 824006,
- device_duration: 0,
- self_host_duration: 18525,
- self_device_duration: 0,
- },
- {
- name: 'detach',
- calls: 128,
- host_duration: 2188,
- device_duration: 0,
- self_host_duration: 2188,
- self_device_duration: 0,
- },
- {
- name: 'aten::detach',
- calls: 128,
- host_duration: 5295,
- device_duration: 0,
- self_host_duration: 3107,
- self_device_duration: 0,
- },
- {
- name: 'aten::as_strided',
- calls: 450,
- host_duration: 4123,
- device_duration: 0,
- self_host_duration: 4123,
- self_device_duration: 0,
- },
- {
- name: 'aten::unsqueeze',
- calls: 192,
- host_duration: 9590,
- device_duration: 0,
- self_host_duration: 8097,
- self_device_duration: 0,
- },
- {
- name: 'aten::empty_strided',
- calls: 576,
- host_duration: 24764,
- device_duration: 0,
- self_host_duration: 24764,
- self_device_duration: 0,
- },
- {
- name: 'aten::copy_',
- calls: 704,
- host_duration: 728608,
- device_duration: 0,
- self_host_duration: 728608,
- self_device_duration: 0,
- },
- {
- name: 'aten::_to_copy',
- calls: 640,
- host_duration: 805481,
- device_duration: 0,
- self_host_duration: 51350,
- self_device_duration: 0,
- },
- {
- name: 'aten::upsample_bilinear2d',
- calls: 64,
- host_duration: 236448,
- device_duration: 0,
- self_host_duration: 216887,
- self_device_duration: 0,
- },
- {
- name: 'aten::squeeze',
- calls: 64,
- host_duration: 4682,
- device_duration: 0,
- self_host_duration: 4092,
- self_device_duration: 0,
- },
- {
- name: 'aten::round',
- calls: 64,
- host_duration: 15283,
- device_duration: 0,
- self_host_duration: 15283,
- self_device_duration: 0,
- },
- {
- name: 'aten::slice',
- calls: 130,
- host_duration: 8844,
- device_duration: 0,
- self_host_duration: 7513,
- self_device_duration: 0,
- },
- {
- name: 'detach_',
- calls: 256,
- host_duration: 2102,
- device_duration: 0,
- self_host_duration: 2102,
- self_device_duration: 0,
- },
- {
- name: 'aten::detach_',
- calls: 256,
- host_duration: 7286,
- device_duration: 0,
- self_host_duration: 5184,
- self_device_duration: 0,
- },
- {
- name: 'aten::result_type',
- calls: 320,
- host_duration: 850,
- device_duration: 0,
- self_host_duration: 850,
- self_device_duration: 0,
- },
- {
- name: 'aten::pow',
- calls: 320,
- host_duration: 43219,
- device_duration: 0,
- self_host_duration: 39305,
- self_device_duration: 0,
- },
- {
- name: 'aten::sub',
- calls: 320,
- host_duration: 92093,
- device_duration: 0,
- self_host_duration: 37961,
- self_device_duration: 0,
- },
- {
- name: 'aten::gt',
- calls: 320,
- host_duration: 35770,
- device_duration: 0,
- self_host_duration: 24869,
- self_device_duration: 0,
- },
- {
- name: 'aten::_local_scalar_dense',
- calls: 384,
- host_duration: 2481,
- device_duration: 0,
- self_host_duration: 2481,
- self_device_duration: 0,
- },
- {
- name: 'aten::item',
- calls: 384,
- host_duration: 10547,
- device_duration: 0,
- self_host_duration: 8066,
- self_device_duration: 0,
- },
- {
- name: 'aten::is_nonzero',
- calls: 320,
- host_duration: 14029,
- device_duration: 0,
- self_host_duration: 5364,
- self_device_duration: 0,
- },
- {
- name: 'aten::div',
- calls: 64,
- host_duration: 79760,
- device_duration: 0,
- self_host_duration: 68841,
- self_device_duration: 0,
- },
- {
- name: 'aten::resize_',
- calls: 2,
- host_duration: 121,
- device_duration: 0,
- self_host_duration: 121,
- self_device_duration: 0,
- },
- {
- name: 'aten::narrow',
- calls: 2,
- host_duration: 138,
- device_duration: 0,
- self_host_duration: 48,
- self_device_duration: 0,
- },
- {
- name: 'aten::_cat',
- calls: 2,
- host_duration: 41467,
- device_duration: 0,
- self_host_duration: 41176,
- self_device_duration: 0,
- },
- {
- name: 'aten::cat',
- calls: 2,
- host_duration: 41608,
- device_duration: 0,
- self_host_duration: 141,
- self_device_duration: 0,
- },
- {
- name: 'aten::stack',
- calls: 2,
- host_duration: 49080,
- device_duration: 0,
- self_host_duration: 2720,
- self_device_duration: 0,
- },
- ],
- },
- right: {
- name: 'enumerate(DataLoader)#_SingleProcessDataLoaderIter.__next__',
- duration: 123490,
- device_duration: 0,
- total_duration: 123490,
- aggs: [
- {
- name: 'aten::empty',
- calls: 1413,
- host_duration: 6528,
- device_duration: 0,
- self_host_duration: 6528,
- self_device_duration: 0,
- },
- {
- name: 'aten::zero_',
- calls: 257,
- host_duration: 94,
- device_duration: 0,
- self_host_duration: 94,
- self_device_duration: 0,
- },
- {
- name: 'aten::zeros',
- calls: 257,
- host_duration: 2448,
- device_duration: 0,
- self_host_duration: 1214,
- self_device_duration: 0,
- },
- {
- name: 'aten::to',
- calls: 1344,
- host_duration: 16544,
- device_duration: 0,
- self_host_duration: 1856,
- self_device_duration: 0,
- },
- {
- name: 'detach',
- calls: 128,
- host_duration: 337,
- device_duration: 0,
- self_host_duration: 337,
- self_device_duration: 0,
- },
- {
- name: 'aten::detach',
- calls: 128,
- host_duration: 629,
- device_duration: 0,
- self_host_duration: 292,
- self_device_duration: 0,
- },
- {
- name: 'aten::as_strided',
- calls: 450,
- host_duration: 464,
- device_duration: 0,
- self_host_duration: 464,
- self_device_duration: 0,
- },
- {
- name: 'aten::unsqueeze',
- calls: 192,
- host_duration: 1024,
- device_duration: 0,
- self_host_duration: 854,
- self_device_duration: 0,
- },
- {
- name: 'aten::empty_strided',
- calls: 576,
- host_duration: 3009,
- device_duration: 0,
- self_host_duration: 3009,
- self_device_duration: 0,
- },
- {
- name: 'aten::copy_',
- calls: 704,
- host_duration: 7419,
- device_duration: 0,
- self_host_duration: 7419,
- self_device_duration: 0,
- },
- {
- name: 'aten::_to_copy',
- calls: 640,
- host_duration: 14688,
- device_duration: 0,
- self_host_duration: 4039,
- self_device_duration: 0,
- },
- {
- name: 'aten::upsample_bilinear2d',
- calls: 64,
- host_duration: 31439,
- device_duration: 0,
- self_host_duration: 29154,
- self_device_duration: 0,
- },
- {
- name: 'aten::squeeze',
- calls: 64,
- host_duration: 473,
- device_duration: 0,
- self_host_duration: 408,
- self_device_duration: 0,
- },
- {
- name: 'aten::round',
- calls: 64,
- host_duration: 4416,
- device_duration: 0,
- self_host_duration: 4416,
- self_device_duration: 0,
- },
- {
- name: 'aten::slice',
- calls: 130,
- host_duration: 864,
- device_duration: 0,
- self_host_duration: 730,
- self_device_duration: 0,
- },
- {
- name: 'detach_',
- calls: 256,
- host_duration: 136,
- device_duration: 0,
- self_host_duration: 115,
- self_device_duration: 0,
- },
- {
- name: 'aten::detach_',
- calls: 256,
- host_duration: 586,
- device_duration: 0,
- self_host_duration: 471,
- self_device_duration: 0,
- },
- {
- name: 'aten::result_type',
- calls: 320,
- host_duration: 149,
- device_duration: 0,
- self_host_duration: 149,
- self_device_duration: 0,
- },
- {
- name: 'aten::pow',
- calls: 320,
- host_duration: 3935,
- device_duration: 0,
- self_host_duration: 3519,
- self_device_duration: 0,
- },
- {
- name: 'aten::sub',
- calls: 320,
- host_duration: 7881,
- device_duration: 0,
- self_host_duration: 3349,
- self_device_duration: 0,
- },
- {
- name: 'aten::gt',
- calls: 320,
- host_duration: 3055,
- device_duration: 0,
- self_host_duration: 2164,
- self_device_duration: 0,
- },
- {
- name: 'aten::_local_scalar_dense',
- calls: 384,
- host_duration: 186,
- device_duration: 0,
- self_host_duration: 186,
- self_device_duration: 0,
- },
- {
- name: 'aten::item',
- calls: 384,
- host_duration: 1134,
- device_duration: 0,
- self_host_duration: 943,
- self_device_duration: 0,
- },
- {
- name: 'aten::is_nonzero',
- calls: 320,
- host_duration: 1588,
- device_duration: 0,
- self_host_duration: 615,
- self_device_duration: 0,
- },
- {
- name: 'aten::div',
- calls: 64,
- host_duration: 4153,
- device_duration: 0,
- self_host_duration: 3203,
- self_device_duration: 0,
- },
- {
- name: 'aten::resize_',
- calls: 2,
- host_duration: 42,
- device_duration: 0,
- self_host_duration: 42,
- self_device_duration: 0,
- },
- {
- name: 'aten::narrow',
- calls: 2,
- host_duration: 18,
- device_duration: 0,
- self_host_duration: 7,
- self_device_duration: 0,
- },
- {
- name: 'aten::_cat',
- calls: 2,
- host_duration: 4613,
- device_duration: 0,
- self_host_duration: 4547,
- self_device_duration: 0,
- },
- {
- name: 'aten::cat',
- calls: 2,
- host_duration: 4637,
- device_duration: 0,
- self_host_duration: 24,
- self_device_duration: 0,
- },
- {
- name: 'aten::stack',
- calls: 2,
- host_duration: 5311,
- device_duration: 0,
- self_host_duration: 246,
- self_device_duration: 0,
- },
- ],
- },
- path: '0-13',
- },
- {
- left: {
- name: 'multiple nodes',
- duration: 5185,
- device_duration: 4394,
- total_duration: 4394,
- aggs: [
- {
- name: 'aten::empty_strided',
- calls: 2,
- host_duration: 203,
- device_duration: 0,
- self_host_duration: 203,
- self_device_duration: 0,
- },
- {
- name: 'aten::copy_',
- calls: 2,
- host_duration: 4687,
- device_duration: 4394,
- self_host_duration: 94,
- self_device_duration: 4394,
- },
- {
- name: 'aten::_to_copy',
- calls: 2,
- host_duration: 5113,
- device_duration: 4394,
- self_host_duration: 223,
- self_device_duration: 0,
- },
- {
- name: 'aten::to',
- calls: 2,
- host_duration: 5185,
- device_duration: 4394,
- self_host_duration: 72,
- self_device_duration: 0,
- },
- ],
- },
- right: {
- name: 'multiple nodes',
- duration: 4664,
- device_duration: 4334,
- total_duration: 4334,
- aggs: [
- {
- name: 'aten::empty_strided',
- calls: 2,
- host_duration: 60,
- device_duration: 0,
- self_host_duration: 60,
- self_device_duration: 0,
- },
- {
- name: 'aten::copy_',
- calls: 2,
- host_duration: 4559,
- device_duration: 4334,
- self_host_duration: 26,
- self_device_duration: 4334,
- },
- {
- name: 'aten::_to_copy',
- calls: 2,
- host_duration: 4655,
- device_duration: 4334,
- self_host_duration: 36,
- self_device_duration: 0,
- },
- {
- name: 'aten::to',
- calls: 2,
- host_duration: 4664,
- device_duration: 4334,
- self_host_duration: 9,
- self_device_duration: 0,
- },
- ],
- },
- path: '0-14',
- },
- {
- left: {
- name: 'nn.Module: ResNet',
- duration: 112761,
- device_duration: 59848,
- total_duration: 59848,
- aggs: [
- {
- name: 'aten::empty',
- calls: 318,
- host_duration: 13992,
- device_duration: 0,
- self_host_duration: 13992,
- self_device_duration: 0,
- },
- {
- name: 'aten::cudnn_convolution',
- calls: 53,
- host_duration: 21952,
- device_duration: 35233,
- self_host_duration: 17460,
- self_device_duration: 35233,
- },
- {
- name: 'aten::_convolution',
- calls: 53,
- host_duration: 25568,
- device_duration: 35233,
- self_host_duration: 3616,
- self_device_duration: 0,
- },
- {
- name: 'aten::convolution',
- calls: 53,
- host_duration: 27534,
- device_duration: 35233,
- self_host_duration: 1966,
- self_device_duration: 0,
- },
- {
- name: 'aten::conv2d',
- calls: 53,
- host_duration: 29546,
- device_duration: 35233,
- self_host_duration: 2012,
- self_device_duration: 0,
- },
- {
- name: 'aten::add',
- calls: 53,
- host_duration: 6523,
- device_duration: 53,
- self_host_duration: 5669,
- self_device_duration: 53,
- },
- {
- name: 'aten::empty_like',
- calls: 53,
- host_duration: 5605,
- device_duration: 0,
- self_host_duration: 2378,
- self_device_duration: 0,
- },
- {
- name: 'aten::view',
- calls: 53,
- host_duration: 829,
- device_duration: 0,
- self_host_duration: 829,
- self_device_duration: 0,
- },
- {
- name: 'aten::cudnn_batch_norm',
- calls: 53,
- host_duration: 35510,
- device_duration: 12828,
- self_host_duration: 20387,
- self_device_duration: 12828,
- },
- {
- name: 'aten::_batch_norm_impl_index',
- calls: 53,
- host_duration: 38030,
- device_duration: 12828,
- self_host_duration: 2520,
- self_device_duration: 0,
- },
- {
- name: 'aten::batch_norm',
- calls: 53,
- host_duration: 39727,
- device_duration: 12828,
- self_host_duration: 1697,
- self_device_duration: 0,
- },
- {
- name: 'aten::clamp_min',
- calls: 49,
- host_duration: 2715,
- device_duration: 5998,
- self_host_duration: 1950,
- self_device_duration: 5998,
- },
- {
- name: 'aten::clamp_min_',
- calls: 49,
- host_duration: 4264,
- device_duration: 5998,
- self_host_duration: 1549,
- self_device_duration: 0,
- },
- {
- name: 'aten::relu_',
- calls: 49,
- host_duration: 8337,
- device_duration: 5998,
- self_host_duration: 4073,
- self_device_duration: 0,
- },
- {
- name: 'aten::max_pool2d_with_indices',
- calls: 1,
- host_duration: 212,
- device_duration: 466,
- self_host_duration: 193,
- self_device_duration: 466,
- },
- {
- name: 'aten::max_pool2d',
- calls: 1,
- host_duration: 262,
- device_duration: 466,
- self_host_duration: 50,
- self_device_duration: 0,
- },
- {
- name: 'aten::add_',
- calls: 16,
- host_duration: 1553,
- device_duration: 5165,
- self_host_duration: 1297,
- self_device_duration: 5165,
- },
- {
- name: 'aten::mean',
- calls: 1,
- host_duration: 187,
- device_duration: 64,
- self_host_duration: 169,
- self_device_duration: 64,
- },
- {
- name: 'aten::adaptive_avg_pool2d',
- calls: 1,
- host_duration: 231,
- device_duration: 64,
- self_host_duration: 44,
- self_device_duration: 0,
- },
- {
- name: 'aten::_reshape_alias',
- calls: 1,
- host_duration: 52,
- device_duration: 0,
- self_host_duration: 52,
- self_device_duration: 0,
- },
- {
- name: 'aten::flatten',
- calls: 1,
- host_duration: 101,
- device_duration: 0,
- self_host_duration: 49,
- self_device_duration: 0,
- },
- {
- name: 'aten::as_strided',
- calls: 2,
- host_duration: 21,
- device_duration: 0,
- self_host_duration: 21,
- self_device_duration: 0,
- },
- {
- name: 'aten::transpose',
- calls: 1,
- host_duration: 51,
- device_duration: 0,
- self_host_duration: 40,
- self_device_duration: 0,
- },
- {
- name: 'aten::t',
- calls: 1,
- host_duration: 120,
- device_duration: 0,
- self_host_duration: 69,
- self_device_duration: 0,
- },
- {
- name: 'aten::expand',
- calls: 1,
- host_duration: 49,
- device_duration: 0,
- self_host_duration: 39,
- self_device_duration: 0,
- },
- {
- name: 'aten::addmm',
- calls: 1,
- host_duration: 405,
- device_duration: 41,
- self_host_duration: 302,
- self_device_duration: 41,
- },
- {
- name: 'aten::linear',
- calls: 1,
- host_duration: 594,
- device_duration: 41,
- self_host_duration: 69,
- self_device_duration: 0,
- },
- ],
- },
- right: {
- name: 'nn.Module: ResNet',
- duration: 28459,
- device_duration: 59832,
- total_duration: 59832,
- aggs: [
- {
- name: 'aten::empty',
- calls: 318,
- host_duration: 2234,
- device_duration: 0,
- self_host_duration: 2234,
- self_device_duration: 0,
- },
- {
- name: 'aten::cudnn_convolution',
- calls: 53,
- host_duration: 8644,
- device_duration: 35209,
- self_host_duration: 6782,
- self_device_duration: 35209,
- },
- {
- name: 'aten::_convolution',
- calls: 53,
- host_duration: 9216,
- device_duration: 35209,
- self_host_duration: 572,
- self_device_duration: 0,
- },
- {
- name: 'aten::convolution',
- calls: 53,
- host_duration: 9532,
- device_duration: 35209,
- self_host_duration: 316,
- self_device_duration: 0,
- },
- {
- name: 'aten::conv2d',
- calls: 53,
- host_duration: 9818,
- device_duration: 35209,
- self_host_duration: 286,
- self_device_duration: 0,
- },
- {
- name: 'aten::add',
- calls: 53,
- host_duration: 1898,
- device_duration: 55,
- self_host_duration: 1202,
- self_device_duration: 55,
- },
- {
- name: 'aten::empty_like',
- calls: 53,
- host_duration: 941,
- device_duration: 0,
- self_host_duration: 300,
- self_device_duration: 0,
- },
- {
- name: 'aten::view',
- calls: 53,
- host_duration: 137,
- device_duration: 0,
- self_host_duration: 137,
- self_device_duration: 0,
- },
- {
- name: 'aten::cudnn_batch_norm',
- calls: 53,
- host_duration: 5543,
- device_duration: 12824,
- self_host_duration: 2527,
- self_device_duration: 12824,
- },
- {
- name: 'aten::_batch_norm_impl_index',
- calls: 53,
- host_duration: 5914,
- device_duration: 12824,
- self_host_duration: 371,
- self_device_duration: 0,
- },
- {
- name: 'aten::batch_norm',
- calls: 53,
- host_duration: 6167,
- device_duration: 12824,
- self_host_duration: 253,
- self_device_duration: 0,
- },
- {
- name: 'aten::clamp_min',
- calls: 49,
- host_duration: 1081,
- device_duration: 6004,
- self_host_duration: 507,
- self_device_duration: 6004,
- },
- {
- name: 'aten::clamp_min_',
- calls: 49,
- host_duration: 1299,
- device_duration: 6004,
- self_host_duration: 218,
- self_device_duration: 0,
- },
- {
- name: 'aten::relu_',
- calls: 49,
- host_duration: 1941,
- device_duration: 6004,
- self_host_duration: 642,
- self_device_duration: 0,
- },
- {
- name: 'aten::max_pool2d_with_indices',
- calls: 1,
- host_duration: 59,
- device_duration: 466,
- self_host_duration: 44,
- self_device_duration: 466,
- },
- {
- name: 'aten::max_pool2d',
- calls: 1,
- host_duration: 66,
- device_duration: 466,
- self_host_duration: 7,
- self_device_duration: 0,
- },
- {
- name: 'aten::add_',
- calls: 16,
- host_duration: 443,
- device_duration: 5169,
- self_host_duration: 267,
- self_device_duration: 5169,
- },
- {
- name: 'aten::mean',
- calls: 1,
- host_duration: 51,
- device_duration: 63,
- self_host_duration: 37,
- self_device_duration: 63,
- },
- {
- name: 'aten::adaptive_avg_pool2d',
- calls: 1,
- host_duration: 58,
- device_duration: 63,
- self_host_duration: 7,
- self_device_duration: 0,
- },
- {
- name: 'aten::_reshape_alias',
- calls: 1,
- host_duration: 8,
- device_duration: 0,
- self_host_duration: 8,
- self_device_duration: 0,
- },
- {
- name: 'aten::flatten',
- calls: 1,
- host_duration: 16,
- device_duration: 0,
- self_host_duration: 8,
- self_device_duration: 0,
- },
- {
- name: 'aten::as_strided',
- calls: 2,
- host_duration: 3,
- device_duration: 0,
- self_host_duration: 3,
- self_device_duration: 0,
- },
- {
- name: 'aten::transpose',
- calls: 1,
- host_duration: 10,
- device_duration: 0,
- self_host_duration: 8,
- self_device_duration: 0,
- },
- {
- name: 'aten::t',
- calls: 1,
- host_duration: 18,
- device_duration: 0,
- self_host_duration: 8,
- self_device_duration: 0,
- },
- {
- name: 'aten::expand',
- calls: 1,
- host_duration: 5,
- device_duration: 0,
- self_host_duration: 4,
- self_device_duration: 0,
- },
- {
- name: 'aten::addmm',
- calls: 1,
- host_duration: 161,
- device_duration: 42,
- self_host_duration: 111,
- self_device_duration: 42,
- },
- {
- name: 'aten::linear',
- calls: 1,
- host_duration: 188,
- device_duration: 42,
- self_host_duration: 9,
- self_device_duration: 0,
- },
- ],
- },
- path: '0-15',
- },
- {
- left: {
- name: 'nn.Module: CrossEntropyLoss',
- duration: 712,
- device_duration: 11,
- total_duration: 11,
- aggs: [
- {
- name: 'aten::to',
- calls: 1,
- host_duration: 6,
- device_duration: 0,
- self_host_duration: 6,
- self_device_duration: 0,
- },
- {
- name: 'aten::_log_softmax',
- calls: 1,
- host_duration: 150,
- device_duration: 7,
- self_host_duration: 132,
- self_device_duration: 7,
- },
- {
- name: 'aten::log_softmax',
- calls: 1,
- host_duration: 231,
- device_duration: 7,
- self_host_duration: 75,
- self_device_duration: 0,
- },
- {
- name: 'aten::resize_',
- calls: 1,
- host_duration: 5,
- device_duration: 0,
- self_host_duration: 5,
- self_device_duration: 0,
- },
- {
- name: 'aten::nll_loss_forward',
- calls: 1,
- host_duration: 266,
- device_duration: 4,
- self_host_duration: 243,
- self_device_duration: 4,
- },
- {
- name: 'aten::nll_loss',
- calls: 1,
- host_duration: 300,
- device_duration: 4,
- self_host_duration: 34,
- self_device_duration: 0,
- },
- {
- name: 'aten::nll_loss_nd',
- calls: 1,
- host_duration: 328,
- device_duration: 4,
- self_host_duration: 28,
- self_device_duration: 0,
- },
- {
- name: 'aten::cross_entropy_loss',
- calls: 1,
- host_duration: 620,
- device_duration: 11,
- self_host_duration: 61,
- self_device_duration: 0,
- },
- ],
- },
- right: {
- name: 'nn.Module: CrossEntropyLoss',
- duration: 156,
- device_duration: 11,
- total_duration: 11,
- aggs: [
- {
- name: 'aten::to',
- calls: 1,
- host_duration: 1,
- device_duration: 0,
- self_host_duration: 1,
- self_device_duration: 0,
- },
- {
- name: 'aten::_log_softmax',
- calls: 1,
- host_duration: 41,
- device_duration: 7,
- self_host_duration: 27,
- self_device_duration: 7,
- },
- {
- name: 'aten::log_softmax',
- calls: 1,
- host_duration: 52,
- device_duration: 7,
- self_host_duration: 10,
- self_device_duration: 0,
- },
- {
- name: 'aten::resize_',
- calls: 1,
- host_duration: 1,
- device_duration: 0,
- self_host_duration: 1,
- self_device_duration: 0,
- },
- {
- name: 'aten::nll_loss_forward',
- calls: 1,
- host_duration: 49,
- device_duration: 4,
- self_host_duration: 34,
- self_device_duration: 4,
- },
- {
- name: 'aten::nll_loss',
- calls: 1,
- host_duration: 53,
- device_duration: 4,
- self_host_duration: 4,
- self_device_duration: 0,
- },
- {
- name: 'aten::nll_loss_nd',
- calls: 1,
- host_duration: 57,
- device_duration: 4,
- self_host_duration: 4,
- self_device_duration: 0,
- },
- {
- name: 'aten::cross_entropy_loss',
- calls: 1,
- host_duration: 124,
- device_duration: 11,
- self_host_duration: 15,
- self_device_duration: 0,
- },
- ],
- },
- path: '0-16',
- },
- {
- left: {
- name: 'aten::zeros',
- duration: 109,
- device_duration: 0,
- total_duration: 109,
- aggs: [
- {
- name: 'aten::empty',
- calls: 1,
- host_duration: 39,
- device_duration: 0,
- self_host_duration: 39,
- self_device_duration: 0,
- },
- {
- name: 'aten::zero_',
- calls: 1,
- host_duration: 5,
- device_duration: 0,
- self_host_duration: 5,
- self_device_duration: 0,
- },
- {
- name: 'aten::zeros',
- calls: 1,
- host_duration: 109,
- device_duration: 0,
- self_host_duration: 65,
- self_device_duration: 0,
- },
- ],
- },
- right: {
- name: 'aten::zeros',
- duration: 23,
- device_duration: 0,
- total_duration: 23,
- aggs: [
- {
- name: 'aten::empty',
- calls: 1,
- host_duration: 13,
- device_duration: 0,
- self_host_duration: 13,
- self_device_duration: 0,
- },
- {
- name: 'aten::zero_',
- calls: 1,
- host_duration: 1,
- device_duration: 0,
- self_host_duration: 1,
- self_device_duration: 0,
- },
- {
- name: 'aten::zeros',
- calls: 1,
- host_duration: 23,
- device_duration: 0,
- self_host_duration: 9,
- self_device_duration: 0,
- },
- ],
- },
- path: '0-17',
- },
- {
- left: {
- name: 'Optimizer.zero_grad#SGD.zero_grad',
- duration: 24374,
- device_duration: 132,
- total_duration: 132,
- aggs: [
- {
- name: 'aten::empty',
- calls: 1,
- host_duration: 44,
- device_duration: 0,
- self_host_duration: 44,
- self_device_duration: 0,
- },
- {
- name: 'aten::fill_',
- calls: 161,
- host_duration: 7104,
- device_duration: 132,
- self_host_duration: 4941,
- self_device_duration: 132,
- },
- {
- name: 'aten::zero_',
- calls: 161,
- host_duration: 14806,
- device_duration: 132,
- self_host_duration: 7702,
- self_device_duration: 0,
- },
- ],
- },
- right: {
- name: 'Optimizer.zero_grad#SGD.zero_grad',
- duration: 4461,
- device_duration: 137,
- total_duration: 137,
- aggs: [
- {
- name: 'aten::empty',
- calls: 1,
- host_duration: 6,
- device_duration: 0,
- self_host_duration: 6,
- self_device_duration: 0,
- },
- {
- name: 'aten::fill_',
- calls: 161,
- host_duration: 1945,
- device_duration: 137,
- self_host_duration: 878,
- self_device_duration: 137,
- },
- {
- name: 'aten::zero_',
- calls: 161,
- host_duration: 2805,
- device_duration: 137,
- self_host_duration: 860,
- self_device_duration: 0,
- },
- ],
- },
- path: '0-18',
- },
- {
- left: {
- name: 'aten::ones_like',
- duration: 263,
- device_duration: 1,
- total_duration: 1,
- aggs: [
- {
- name: 'aten::empty_strided',
- calls: 1,
- host_duration: 99,
- device_duration: 0,
- self_host_duration: 99,
- self_device_duration: 0,
- },
- {
- name: 'aten::empty_like',
- calls: 1,
- host_duration: 149,
- device_duration: 0,
- self_host_duration: 50,
- self_device_duration: 0,
- },
- {
- name: 'aten::fill_',
- calls: 1,
- host_duration: 49,
- device_duration: 1,
- self_host_duration: 34,
- self_device_duration: 1,
- },
- {
- name: 'aten::ones_like',
- calls: 1,
- host_duration: 263,
- device_duration: 1,
- self_host_duration: 65,
- self_device_duration: 0,
- },
- ],
- },
- right: {
- name: 'aten::ones_like',
- duration: 51,
- device_duration: 1,
- total_duration: 1,
- aggs: [
- {
- name: 'aten::empty_strided',
- calls: 1,
- host_duration: 18,
- device_duration: 0,
- self_host_duration: 18,
- self_device_duration: 0,
- },
- {
- name: 'aten::empty_like',
- calls: 1,
- host_duration: 24,
- device_duration: 0,
- self_host_duration: 6,
- self_device_duration: 0,
- },
- {
- name: 'aten::fill_',
- calls: 1,
- host_duration: 20,
- device_duration: 1,
- self_host_duration: 8,
- self_device_duration: 1,
- },
- {
- name: 'aten::ones_like',
- calls: 1,
- host_duration: 51,
- device_duration: 1,
- self_host_duration: 7,
- self_device_duration: 0,
- },
- ],
- },
- path: '0-19',
- },
- {
- left: {
- name: 'nn.Module: CrossEntropyLoss.backward',
- duration: 845,
- device_duration: 13,
- total_duration: 13,
- aggs: [
- {
- name: 'aten::fill_',
- calls: 1,
- host_duration: 58,
- device_duration: 1,
- self_host_duration: 36,
- self_device_duration: 1,
- },
- {
- name: 'aten::zero_',
- calls: 1,
- host_duration: 112,
- device_duration: 1,
- self_host_duration: 54,
- self_device_duration: 0,
- },
- {
- name: 'aten::nll_loss_backward',
- calls: 1,
- host_duration: 269,
- device_duration: 4,
- self_host_duration: 142,
- self_device_duration: 3,
- },
- {
- name: 'NllLossBackward0',
- calls: 1,
- host_duration: 406,
- device_duration: 4,
- self_host_duration: 137,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: NllLossBackward0',
- calls: 1,
- host_duration: 522,
- device_duration: 4,
- self_host_duration: 116,
- self_device_duration: 0,
- },
- {
- name: 'aten::_log_softmax_backward_data',
- calls: 1,
- host_duration: 109,
- device_duration: 9,
- self_host_duration: 91,
- self_device_duration: 9,
- },
- {
- name: 'LogSoftmaxBackward0',
- calls: 1,
- host_duration: 178,
- device_duration: 9,
- self_host_duration: 69,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: LogSoftmaxBackward0',
- calls: 1,
- host_duration: 283,
- device_duration: 9,
- self_host_duration: 105,
- self_device_duration: 0,
- },
- ],
- },
- right: {
- name: 'nn.Module: CrossEntropyLoss.backward',
- duration: 283,
- device_duration: 13,
- total_duration: 13,
- aggs: [
- {
- name: 'aten::fill_',
- calls: 1,
- host_duration: 33,
- device_duration: 1,
- self_host_duration: 12,
- self_device_duration: 1,
- },
- {
- name: 'aten::zero_',
- calls: 1,
- host_duration: 41,
- device_duration: 1,
- self_host_duration: 8,
- self_device_duration: 0,
- },
- {
- name: 'aten::nll_loss_backward',
- calls: 1,
- host_duration: 93,
- device_duration: 4,
- self_host_duration: 41,
- self_device_duration: 3,
- },
- {
- name: 'NllLossBackward0',
- calls: 1,
- host_duration: 185,
- device_duration: 4,
- self_host_duration: 92,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: NllLossBackward0',
- calls: 1,
- host_duration: 211,
- device_duration: 4,
- self_host_duration: 26,
- self_device_duration: 0,
- },
- {
- name: 'aten::_log_softmax_backward_data',
- calls: 1,
- host_duration: 36,
- device_duration: 9,
- self_host_duration: 22,
- self_device_duration: 9,
- },
- {
- name: 'LogSoftmaxBackward0',
- calls: 1,
- host_duration: 45,
- device_duration: 9,
- self_host_duration: 9,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: LogSoftmaxBackward0',
- calls: 1,
- host_duration: 62,
- device_duration: 9,
- self_host_duration: 17,
- self_device_duration: 0,
- },
- ],
- },
- path: '0-20',
- },
- {
- left: {
- name: 'nn.Module: ResNet.backward',
- duration: 180218,
- device_duration: 120676,
- total_duration: 120676,
- aggs: [
- {
- name: 'aten::as_strided',
- calls: 5,
- host_duration: 67,
- device_duration: 0,
- self_host_duration: 67,
- self_device_duration: 0,
- },
- {
- name: 'aten::transpose',
- calls: 4,
- host_duration: 255,
- device_duration: 0,
- self_host_duration: 204,
- self_device_duration: 0,
- },
- {
- name: 'aten::t',
- calls: 4,
- host_duration: 430,
- device_duration: 0,
- self_host_duration: 175,
- self_device_duration: 0,
- },
- {
- name: 'aten::mm',
- calls: 2,
- host_duration: 323,
- device_duration: 68,
- self_host_duration: 265,
- self_device_duration: 68,
- },
- {
- name: 'AddmmBackward0',
- calls: 1,
- host_duration: 844,
- device_duration: 68,
- self_host_duration: 209,
- self_device_duration: 0,
- },
- {
- name: 'aten::sum',
- calls: 1,
- host_duration: 197,
- device_duration: 7,
- self_host_duration: 175,
- self_device_duration: 7,
- },
- {
- name: 'aten::view',
- calls: 54,
- host_duration: 963,
- device_duration: 0,
- self_host_duration: 963,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: AddmmBackward0',
- calls: 1,
- host_duration: 1377,
- device_duration: 75,
- self_host_duration: 296,
- self_device_duration: 0,
- },
- {
- name: 'aten::add_',
- calls: 161,
- host_duration: 12404,
- device_duration: 496,
- self_host_duration: 9659,
- self_device_duration: 496,
- },
- {
- name: 'torch::autograd::AccumulateGrad',
- calls: 161,
- host_duration: 20417,
- device_duration: 496,
- self_host_duration: 8013,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: torch::autograd::AccumulateGrad',
- calls: 161,
- host_duration: 35211,
- device_duration: 496,
- self_host_duration: 14794,
- self_device_duration: 0,
- },
- {
- name: 'TBackward0',
- calls: 1,
- host_duration: 152,
- device_duration: 0,
- self_host_duration: 34,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: TBackward0',
- calls: 1,
- host_duration: 231,
- device_duration: 0,
- self_host_duration: 79,
- self_device_duration: 0,
- },
- {
- name: 'aten::_reshape_alias',
- calls: 1,
- host_duration: 35,
- device_duration: 0,
- self_host_duration: 35,
- self_device_duration: 0,
- },
- {
- name: 'aten::reshape',
- calls: 1,
- host_duration: 91,
- device_duration: 0,
- self_host_duration: 56,
- self_device_duration: 0,
- },
- {
- name: 'ReshapeAliasBackward0',
- calls: 1,
- host_duration: 133,
- device_duration: 0,
- self_host_duration: 42,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: ReshapeAliasBackward0',
- calls: 1,
- host_duration: 205,
- device_duration: 0,
- self_host_duration: 72,
- self_device_duration: 0,
- },
- {
- name: 'aten::expand',
- calls: 1,
- host_duration: 95,
- device_duration: 0,
- self_host_duration: 79,
- self_device_duration: 0,
- },
- {
- name: 'aten::to',
- calls: 1,
- host_duration: 7,
- device_duration: 0,
- self_host_duration: 7,
- self_device_duration: 0,
- },
- {
- name: 'aten::div',
- calls: 1,
- host_duration: 324,
- device_duration: 37,
- self_host_duration: 301,
- self_device_duration: 37,
- },
- {
- name: 'MeanBackward1',
- calls: 1,
- host_duration: 547,
- device_duration: 37,
- self_host_duration: 121,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: MeanBackward1',
- calls: 1,
- host_duration: 662,
- device_duration: 37,
- self_host_duration: 115,
- self_device_duration: 0,
- },
- {
- name: 'aten::threshold_backward',
- calls: 49,
- host_duration: 6880,
- device_duration: 9012,
- self_host_duration: 6037,
- self_device_duration: 9012,
- },
- {
- name: 'ReluBackward0',
- calls: 49,
- host_duration: 10536,
- device_duration: 9012,
- self_host_duration: 3656,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: ReluBackward0',
- calls: 49,
- host_duration: 16666,
- device_duration: 9012,
- self_host_duration: 6130,
- self_device_duration: 0,
- },
- {
- name: 'AddBackward0',
- calls: 16,
- host_duration: 122,
- device_duration: 0,
- self_host_duration: 122,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: AddBackward0',
- calls: 16,
- host_duration: 1278,
- device_duration: 0,
- self_host_duration: 1156,
- self_device_duration: 0,
- },
- {
- name: 'aten::empty',
- calls: 370,
- host_duration: 21126,
- device_duration: 0,
- self_host_duration: 21126,
- self_device_duration: 0,
- },
- {
- name: 'aten::cudnn_batch_norm_backward',
- calls: 53,
- host_duration: 30875,
- device_duration: 22166,
- self_host_duration: 17909,
- self_device_duration: 22166,
- },
- {
- name: 'CudnnBatchNormBackward0',
- calls: 53,
- host_duration: 34355,
- device_duration: 22166,
- self_host_duration: 3480,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: CudnnBatchNormBackward0',
- calls: 53,
- host_duration: 44006,
- device_duration: 22166,
- self_host_duration: 9651,
- self_device_duration: 0,
- },
- {
- name: 'aten::cudnn_convolution_backward_input',
- calls: 52,
- host_duration: 20496,
- device_duration: 37887,
- self_host_duration: 15516,
- self_device_duration: 37887,
- },
- {
- name: 'aten::cudnn_convolution_backward_weight',
- calls: 53,
- host_duration: 22878,
- device_duration: 44271,
- self_host_duration: 13672,
- self_device_duration: 44271,
- },
- {
- name: 'aten::cudnn_convolution_backward',
- calls: 53,
- host_duration: 50961,
- device_duration: 82158,
- self_host_duration: 7587,
- self_device_duration: 0,
- },
- {
- name: 'CudnnConvolutionBackward0',
- calls: 53,
- host_duration: 54406,
- device_duration: 82158,
- self_host_duration: 3445,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: CudnnConvolutionBackward0',
- calls: 53,
- host_duration: 64877,
- device_duration: 87386,
- self_host_duration: 8284,
- self_device_duration: 0,
- },
- {
- name: 'aten::add',
- calls: 16,
- host_duration: 2187,
- device_duration: 5228,
- self_host_duration: 1909,
- self_device_duration: 5228,
- },
- {
- name: 'aten::fill_',
- calls: 1,
- host_duration: 53,
- device_duration: 230,
- self_host_duration: 36,
- self_device_duration: 230,
- },
- {
- name: 'aten::zero_',
- calls: 1,
- host_duration: 96,
- device_duration: 230,
- self_host_duration: 43,
- self_device_duration: 0,
- },
- {
- name: 'aten::max_pool2d_with_indices_backward',
- calls: 1,
- host_duration: 237,
- device_duration: 1504,
- self_host_duration: 129,
- self_device_duration: 1274,
- },
- {
- name: 'MaxPool2DWithIndicesBackward0',
- calls: 1,
- host_duration: 295,
- device_duration: 1504,
- self_host_duration: 58,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: MaxPool2DWithIndicesBackward0',
- calls: 1,
- host_duration: 411,
- device_duration: 1504,
- self_host_duration: 116,
- self_device_duration: 0,
- },
- ],
- },
- right: {
- name: 'nn.Module: ResNet.backward',
- duration: 45132,
- device_duration: 121137,
- total_duration: 121137,
- aggs: [
- {
- name: 'aten::as_strided',
- calls: 5,
- host_duration: 7,
- device_duration: 0,
- self_host_duration: 7,
- self_device_duration: 0,
- },
- {
- name: 'aten::transpose',
- calls: 4,
- host_duration: 29,
- device_duration: 0,
- self_host_duration: 23,
- self_device_duration: 0,
- },
- {
- name: 'aten::t',
- calls: 4,
- host_duration: 53,
- device_duration: 0,
- self_host_duration: 24,
- self_device_duration: 0,
- },
- {
- name: 'aten::mm',
- calls: 2,
- host_duration: 144,
- device_duration: 67,
- self_host_duration: 96,
- self_device_duration: 67,
- },
- {
- name: 'AddmmBackward0',
- calls: 1,
- host_duration: 208,
- device_duration: 67,
- self_host_duration: 24,
- self_device_duration: 0,
- },
- {
- name: 'aten::sum',
- calls: 1,
- host_duration: 45,
- device_duration: 7,
- self_host_duration: 30,
- self_device_duration: 7,
- },
- {
- name: 'aten::view',
- calls: 54,
- host_duration: 163,
- device_duration: 0,
- self_host_duration: 163,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: AddmmBackward0',
- calls: 1,
- host_duration: 295,
- device_duration: 74,
- self_host_duration: 38,
- self_device_duration: 0,
- },
- {
- name: 'aten::add_',
- calls: 161,
- host_duration: 4103,
- device_duration: 535,
- self_host_duration: 2037,
- self_device_duration: 535,
- },
- {
- name: 'torch::autograd::AccumulateGrad',
- calls: 161,
- host_duration: 5183,
- device_duration: 535,
- self_host_duration: 1080,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: torch::autograd::AccumulateGrad',
- calls: 161,
- host_duration: 7655,
- device_duration: 535,
- self_host_duration: 2472,
- self_device_duration: 0,
- },
- {
- name: 'TBackward0',
- calls: 1,
- host_duration: 16,
- device_duration: 0,
- self_host_duration: 3,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: TBackward0',
- calls: 1,
- host_duration: 24,
- device_duration: 0,
- self_host_duration: 8,
- self_device_duration: 0,
- },
- {
- name: 'aten::_reshape_alias',
- calls: 1,
- host_duration: 5,
- device_duration: 0,
- self_host_duration: 5,
- self_device_duration: 0,
- },
- {
- name: 'aten::reshape',
- calls: 1,
- host_duration: 10,
- device_duration: 0,
- self_host_duration: 5,
- self_device_duration: 0,
- },
- {
- name: 'ReshapeAliasBackward0',
- calls: 1,
- host_duration: 17,
- device_duration: 0,
- self_host_duration: 7,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: ReshapeAliasBackward0',
- calls: 1,
- host_duration: 27,
- device_duration: 0,
- self_host_duration: 10,
- self_device_duration: 0,
- },
- {
- name: 'aten::expand',
- calls: 1,
- host_duration: 10,
- device_duration: 0,
- self_host_duration: 9,
- self_device_duration: 0,
- },
- {
- name: 'aten::to',
- calls: 1,
- host_duration: 1,
- device_duration: 0,
- self_host_duration: 1,
- self_device_duration: 0,
- },
- {
- name: 'aten::div',
- calls: 1,
- host_duration: 63,
- device_duration: 37,
- self_host_duration: 45,
- self_device_duration: 37,
- },
- {
- name: 'MeanBackward1',
- calls: 1,
- host_duration: 83,
- device_duration: 37,
- self_host_duration: 9,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: MeanBackward1',
- calls: 1,
- host_duration: 99,
- device_duration: 37,
- self_host_duration: 16,
- self_device_duration: 0,
- },
- {
- name: 'aten::threshold_backward',
- calls: 49,
- host_duration: 1863,
- device_duration: 9003,
- self_host_duration: 1203,
- self_device_duration: 9003,
- },
- {
- name: 'ReluBackward0',
- calls: 49,
- host_duration: 2330,
- device_duration: 9003,
- self_host_duration: 467,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: ReluBackward0',
- calls: 49,
- host_duration: 3313,
- device_duration: 9003,
- self_host_duration: 983,
- self_device_duration: 0,
- },
- {
- name: 'AddBackward0',
- calls: 16,
- host_duration: 14,
- device_duration: 0,
- self_host_duration: 14,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: AddBackward0',
- calls: 16,
- host_duration: 135,
- device_duration: 0,
- self_host_duration: 121,
- self_device_duration: 0,
- },
- {
- name: 'aten::empty',
- calls: 370,
- host_duration: 4638,
- device_duration: 0,
- self_host_duration: 4638,
- self_device_duration: 0,
- },
- {
- name: 'aten::cudnn_batch_norm_backward',
- calls: 53,
- host_duration: 5047,
- device_duration: 22244,
- self_host_duration: 2219,
- self_device_duration: 22244,
- },
- {
- name: 'CudnnBatchNormBackward0',
- calls: 53,
- host_duration: 5637,
- device_duration: 22244,
- self_host_duration: 590,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: CudnnBatchNormBackward0',
- calls: 53,
- host_duration: 7407,
- device_duration: 22244,
- self_host_duration: 1770,
- self_device_duration: 0,
- },
- {
- name: 'aten::cudnn_convolution_backward_input',
- calls: 52,
- host_duration: 9345,
- device_duration: 37854,
- self_host_duration: 6945,
- self_device_duration: 37854,
- },
- {
- name: 'aten::cudnn_convolution_backward_weight',
- calls: 53,
- host_duration: 9886,
- device_duration: 44650,
- self_host_duration: 5378,
- self_device_duration: 44650,
- },
- {
- name: 'aten::cudnn_convolution_backward',
- calls: 53,
- host_duration: 20453,
- device_duration: 82504,
- self_host_duration: 1222,
- self_device_duration: 0,
- },
- {
- name: 'CudnnConvolutionBackward0',
- calls: 53,
- host_duration: 21000,
- device_duration: 82504,
- self_host_duration: 547,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: CudnnConvolutionBackward0',
- calls: 53,
- host_duration: 23024,
- device_duration: 87731,
- self_host_duration: 1440,
- self_device_duration: 0,
- },
- {
- name: 'aten::add',
- calls: 16,
- host_duration: 584,
- device_duration: 5227,
- self_host_duration: 374,
- self_device_duration: 5227,
- },
- {
- name: 'aten::fill_',
- calls: 1,
- host_duration: 26,
- device_duration: 230,
- self_host_duration: 12,
- self_device_duration: 230,
- },
- {
- name: 'aten::zero_',
- calls: 1,
- host_duration: 33,
- device_duration: 230,
- self_host_duration: 7,
- self_device_duration: 0,
- },
- {
- name: 'aten::max_pool2d_with_indices_backward',
- calls: 1,
- host_duration: 73,
- device_duration: 1513,
- self_host_duration: 30,
- self_device_duration: 1283,
- },
- {
- name: 'MaxPool2DWithIndicesBackward0',
- calls: 1,
- host_duration: 83,
- device_duration: 1513,
- self_host_duration: 10,
- self_device_duration: 0,
- },
- {
- name: 'autograd::engine::evaluate_function: MaxPool2DWithIndicesBackward0',
- calls: 1,
- host_duration: 106,
- device_duration: 1513,
- self_host_duration: 23,
- self_device_duration: 0,
- },
- ],
- },
- path: '0-21',
- },
- {
- left: {
- name: 'aten::zeros',
- duration: 160,
- device_duration: 0,
- total_duration: 160,
- aggs: [
- {
- name: 'aten::empty',
- calls: 1,
- host_duration: 87,
- device_duration: 0,
- self_host_duration: 87,
- self_device_duration: 0,
- },
- {
- name: 'aten::zero_',
- calls: 1,
- host_duration: 4,
- device_duration: 0,
- self_host_duration: 4,
- self_device_duration: 0,
- },
- {
- name: 'aten::zeros',
- calls: 1,
- host_duration: 160,
- device_duration: 0,
- self_host_duration: 69,
- self_device_duration: 0,
- },
- ],
- },
- right: {
- name: 'aten::zeros',
- duration: 119,
- device_duration: 0,
- total_duration: 119,
- aggs: [
- {
- name: 'aten::empty',
- calls: 1,
- host_duration: 105,
- device_duration: 0,
- self_host_duration: 105,
- self_device_duration: 0,
- },
- {
- name: 'aten::zero_',
- calls: 1,
- host_duration: 2,
- device_duration: 0,
- self_host_duration: 2,
- self_device_duration: 0,
- },
- {
- name: 'aten::zeros',
- calls: 1,
- host_duration: 119,
- device_duration: 0,
- self_host_duration: 12,
- self_device_duration: 0,
- },
- ],
- },
- path: '0-22',
- },
- {
- left: {
- name: 'Optimizer.step#SGD.step',
- duration: 75435,
- device_duration: 1295,
- total_duration: 1295,
- aggs: [
- {
- name: 'aten::empty',
- calls: 1,
- host_duration: 40,
- device_duration: 0,
- self_host_duration: 40,
- self_device_duration: 0,
- },
- {
- name: 'aten::mul_',
- calls: 161,
- host_duration: 11945,
- device_duration: 401,
- self_host_duration: 9568,
- self_device_duration: 401,
- },
- {
- name: 'aten::add_',
- calls: 322,
- host_duration: 22480,
- device_duration: 894,
- self_host_duration: 17805,
- self_device_duration: 894,
- },
- ],
- },
- right: {
- name: 'Optimizer.step#SGD.step',
- duration: 16687,
- device_duration: 1298,
- total_duration: 1298,
- aggs: [
- {
- name: 'aten::empty',
- calls: 1,
- host_duration: 8,
- device_duration: 0,
- self_host_duration: 8,
- self_device_duration: 0,
- },
- {
- name: 'aten::mul_',
- calls: 161,
- host_duration: 3440,
- device_duration: 404,
- self_host_duration: 1824,
- self_device_duration: 404,
- },
- {
- name: 'aten::add_',
- calls: 322,
- host_duration: 6161,
- device_duration: 894,
- self_host_duration: 3186,
- self_device_duration: 894,
- },
- ],
- },
- path: '0-23',
- },
- ],
- });
- }
-}
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/api/openapi.yaml b/plugins/tensorboard-plugins/tb_plugin/fe/src/api/openapi.yaml
deleted file mode 100644
index 0218adb9d74ed1505d6b86b5ac6550ec33539144..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/api/openapi.yaml
+++ /dev/null
@@ -1,1204 +0,0 @@
-openapi: 3.0.1
-info:
- title: Pytorch profile API
- version: 1.0.0
-servers:
- - url: .
-paths:
- /runs:
- get:
- responses:
- '200':
- description: successful operation
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/Runs'
- /views:
- get:
- parameters:
- - in: query
- name: run
- required: true
- schema:
- type: string
- responses:
- '200':
- description: successful views
- content:
- '*/*':
- schema:
- type: array
- items:
- type: string
- enum:
- - Overview
- - Operator
- - Kernel
- - Trace
- - Distributed
- - Memory
- /workers:
- get:
- parameters:
- - in: query
- name: run
- required: true
- schema:
- type: string
- - in: query
- name: view
- required: true
- schema:
- type: string
- responses:
- '200':
- description: successful workers
- content:
- '*/*':
- schema:
- type: array
- items:
- type: string
- /spans:
- get:
- parameters:
- - in: query
- name: run
- required: true
- schema:
- type: string
- - in: query
- name: worker
- required: true
- schema:
- type: string
- responses:
- '200':
- description: successful spans
- content:
- '*/*':
- schema:
- type: array
- items:
- type: string
- /overview:
- get:
- parameters:
- - in: query
- name: run
- required: true
- schema:
- type: string
- - in: query
- name: worker
- required: true
- schema:
- type: string
- - in: query
- name: span
- required: true
- schema:
- type: string
- responses:
- '200':
- description: successful operation
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/Overview'
- /operation:
- get:
- parameters:
- - in: query
- name: run
- required: true
- schema:
- type: string
- - in: query
- name: worker
- required: true
- schema:
- type: string
- - in: query
- name: span
- required: true
- schema:
- type: string
- - in: query
- name: group_by
- required: true
- schema:
- type: string
- enum:
- - Operation
- - OperationAndInputShape
- description: Group By
- responses:
- '200':
- description: successful operation
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/OperatorGraph'
- /operation/table:
- get:
- parameters:
- - in: query
- name: run
- required: true
- schema:
- type: string
- - in: query
- name: worker
- required: true
- schema:
- type: string
- - in: query
- name: span
- required: true
- schema:
- type: string
- - in: query
- name: group_by
- required: true
- schema:
- type: string
- enum:
- - Operation
- - OperationAndInputShape
- description: Group By
- responses:
- '200':
- description: successful operation
- content:
- '*/*':
- schema:
- type: object
- required:
- - metadata
- - data
- properties:
- metadata:
- $ref: '#/components/schemas/TableMetadata'
- data:
- $ref: '#/components/schemas/OperationTableData'
- /operation/stack:
- get:
- parameters:
- - in: query
- name: run
- required: true
- schema:
- type: string
- - in: query
- name: worker
- required: true
- schema:
- type: string
- - in: query
- name: span
- required: true
- schema:
- type: string
- - in: query
- name: group_by
- required: true
- schema:
- type: string
- enum:
- - Operation
- - OperationAndInputShape
- description: Group By
- - in: query
- name: op_name
- required: true
- schema:
- type: string
- - in: query
- name: input_shape
- schema:
- type: string
- responses:
- '200':
- description: successful operation
- content:
- '*/*':
- schema:
- type: object
- required:
- - metadata
- - data
- properties:
- metadata:
- $ref: '#/components/schemas/TableMetadata'
- data:
- $ref: '#/components/schemas/CallStackTableData'
- /distributed/overlap:
- get:
- parameters:
- - in: query
- name: run
- required: true
- schema:
- type: string
- - in: query
- name: worker
- required: true
- schema:
- type: string
- - in: query
- name: span
- required: true
- schema:
- type: string
- responses:
- '200':
- description: successful operation
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/DistributedGraph'
- /distributed/waittime:
- get:
- parameters:
- - in: query
- name: run
- required: true
- schema:
- type: string
- - in: query
- name: worker
- required: true
- schema:
- type: string
- - in: query
- name: span
- required: true
- schema:
- type: string
- responses:
- '200':
- description: successful operation
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/DistributedGraph'
- /distributed/commops:
- get:
- parameters:
- - in: query
- name: run
- required: true
- schema:
- type: string
- - in: query
- name: worker
- required: true
- schema:
- type: string
- - in: query
- name: span
- required: true
- schema:
- type: string
- responses:
- '200':
- description: successful operation
- content:
- '*/*':
- schema:
- type: object
- required:
- - metadata
- - data
- properties:
- metadata:
- type: object
- required:
- - title
- properties:
- title:
- type: string
- data:
- type: object
- /distributed/gpuinfo:
- get:
- parameters:
- - in: query
- name: run
- required: true
- schema:
- type: string
- - in: query
- name: worker
- required: true
- schema:
- type: string
- - in: query
- name: span
- required: true
- schema:
- type: string
- responses:
- '200':
- description: successful operation
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/GpuInfo'
- /memory:
- get:
- parameters:
- - in: query
- name: run
- required: true
- schema:
- type: string
- - in: query
- name: worker
- required: true
- schema:
- type: string
- - in: query
- name: span
- required: true
- schema:
- type: string
- - in: query
- name: start_ts
- required: false
- schema:
- type: number
- - in: query
- name: end_ts
- required: false
- schema:
- type: number
- responses:
- '200':
- description: successful operation
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/MemoryStatsData'
- /memory_curve:
- get:
- parameters:
- - in: query
- name: run
- required: true
- schema:
- type: string
- - in: query
- name: worker
- required: true
- schema:
- type: string
- - in: query
- name: span
- required: true
- schema:
- type: string
- responses:
- '200':
- description: successful operation
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/MemoryCurveData'
- /memory_events:
- get:
- parameters:
- - in: query
- name: run
- required: true
- schema:
- type: string
- - in: query
- name: worker
- required: true
- schema:
- type: string
- - in: query
- name: span
- required: true
- schema:
- type: string
- - in: query
- name: start_ts
- required: false
- schema:
- type: number
- - in: query
- name: end_ts
- required: false
- schema:
- type: number
- responses:
- '200':
- description: successful operation
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/MemoryEventsData'
- /kernel:
- get:
- parameters:
- - in: query
- name: run
- required: true
- schema:
- type: string
- - in: query
- name: worker
- required: true
- schema:
- type: string
- - in: query
- name: span
- required: true
- schema:
- type: string
- - in: query
- name: group_by
- required: true
- schema:
- type: string
- enum:
- - Kernel
- - KernelNameAndOpName
- description: Group By
- responses:
- '200':
- description: successful operation
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/KernelGraph'
- /kernel/table:
- get:
- parameters:
- - in: query
- name: run
- required: true
- schema:
- type: string
- - in: query
- name: worker
- required: true
- schema:
- type: string
- - in: query
- name: span
- required: true
- schema:
- type: string
- - in: query
- name: group_by
- required: false
- schema:
- type: string
- enum:
- - Kernel
- - KernelNameAndOpName
- description: Group By
- responses:
- '200':
- description: successful kernel
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/TableData'
- /kernel/tc_pie:
- get:
- parameters:
- - in: query
- name: run
- required: true
- schema:
- type: string
- - in: query
- name: worker
- required: true
- schema:
- type: string
- - in: query
- name: span
- required: true
- schema:
- type: string
- responses:
- '200':
- description: successful operation
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/TensorCoresGraph'
- /trace:
- get:
- parameters:
- - in: query
- name: run
- required: true
- schema:
- type: string
- - in: query
- name: worker
- required: true
- schema:
- type: string
- - in: query
- name: span
- required: true
- schema:
- type: string
- responses:
- '200':
- description: successful trace data
- content:
- '*/*':
- schema:
- type: object
- /module:
- get:
- parameters:
- - in: query
- name: run
- required: true
- schema:
- type: string
- - in: query
- name: worker
- required: true
- schema:
- type: string
- - in: query
- name: span
- required: true
- schema:
- type: string
- responses:
- '200':
- description: successful operation
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/ModuleViewData'
- /tree:
- get:
- parameters:
- - in: query
- name: run
- required: true
- schema:
- type: string
- - in: query
- name: worker
- required: true
- schema:
- type: string
- - in: query
- name: span
- required: true
- schema:
- type: string
- responses:
- '200':
- description: successful operation
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/OperatorNode'
- /diffnode:
- get:
- parameters:
- - in: query
- name: run
- required: true
- schema:
- type: string
- - in: query
- name: worker
- required: true
- schema:
- type: string
- - in: query
- name: span
- required: true
- schema:
- type: string
- - in: query
- name: exp_run
- required: true
- schema:
- type: string
- - in: query
- name: exp_worker
- required: true
- schema:
- type: string
- - in: query
- name: exp_span
- required: true
- schema:
- type: string
- - in: query
- name: path
- required: false
- schema:
- type: string
- responses:
- '200':
- description: successful operation
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/DiffNode'
-components:
- schemas:
- Runs:
- type: object
- required:
- - runs
- - loading
- properties:
- runs:
- type: array
- items:
- type: string
- loading:
- type: boolean
- Performance:
- type: object
- required:
- - name
- properties:
- name:
- type: string
- description:
- type: string
- value:
- type: string
- extra:
- type: string
- children:
- type: array
- items:
- $ref: '#/components/schemas/Performance'
- Environment:
- type: object
- required:
- - title
- - value
- properties:
- title:
- type: string
- value:
- type: string
- GraphColumn:
- type: object
- required:
- - type
- - name
- properties:
- type:
- type: string
- name:
- type: string
- role:
- type: string
- p:
- type: object
- properties:
- html:
- type: boolean
- ValueAndFormat:
- type: object
- required:
- - v
- - f
- properties:
- v:
- oneOf:
- - type: string
- - type: number
- - type: boolean
- f:
- type: string
- Graph:
- type: object
- required:
- - columns
- - rows
- properties:
- title:
- type: string
- columns:
- type: array
- items:
- $ref: '#/components/schemas/GraphColumn'
- rows:
- type: array
- items:
- type: array
- items:
- oneOf:
- - type: string
- - type: number
- - type: boolean
- - $ref: '#/components/schemas/ValueAndFormat'
- Overview:
- type: object
- required:
- - performance
- - environments
- - steps
- - recommendations
- properties:
- performance:
- type: array
- items:
- $ref: '#/components/schemas/Performance'
- environments:
- type: array
- items:
- $ref: '#/components/schemas/Environment'
- steps:
- $ref: '#/components/schemas/Graph'
- recommendations:
- type: string
- gpu_metrics:
- $ref: '#/components/schemas/GpuMetrics'
- OperatorGraph:
- type: object
- required:
- - device_total_time
- - device_self_time
- - host_total_time
- - host_self_time
- properties:
- device_total_time:
- $ref: '#/components/schemas/Graph'
- device_self_time:
- $ref: '#/components/schemas/Graph'
- host_total_time:
- $ref: '#/components/schemas/Graph'
- host_self_time:
- $ref: '#/components/schemas/Graph'
- TableMetadata:
- type: object
- required:
- - sort
- properties:
- sort:
- type: string
- tooltips:
- type: object
- TableData:
- type: object
- required:
- - metadata
- - data
- properties:
- data:
- $ref: '#/components/schemas/Graph'
- metadata:
- $ref: '#/components/schemas/TableMetadata'
- KernelGraph:
- type: object
- required:
- - total
- properties:
- total:
- $ref: '#/components/schemas/Graph'
- TensorCoresGraph:
- type: object
- required:
- - total
- properties:
- total:
- $ref: '#/components/schemas/Graph'
- OperationTableData:
- type: array
- items:
- type: object
- required:
- - name
- - calls
- - host_self_duration
- - host_total_duration
- - has_call_stack
- properties:
- name:
- type: string
- input_shape:
- type: string
- calls:
- type: number
- device_self_duration:
- type: number
- device_total_duration:
- type: number
- host_self_duration:
- type: number
- host_total_duration:
- type: number
- has_call_stack:
- type: boolean
- tc_eligible:
- type: string
- tc_self_ratio:
- type: number
- tc_total_ratio:
- type: number
- CallStackTableData:
- type: array
- items:
- type: object
- required:
- - name
- - calls
- - host_self_duration
- - host_total_duration
- properties:
- name:
- type: string
- input_shape:
- type: string
- calls:
- type: number
- device_self_duration:
- type: number
- device_total_duration:
- type: number
- host_self_duration:
- type: number
- host_total_duration:
- type: number
- call_stack:
- type: string
- tc_eligible:
- type: string
- tc_self_ratio:
- type: number
- tc_total_ratio:
- type: number
- DistributedGraph:
- type: object
- required:
- - metadata
- - data
- properties:
- metadata:
- type: object
- required:
- - title
- - legends
- - units
- properties:
- title:
- type: string
- legends:
- type: array
- items:
- type: string
- units:
- type: string
- data:
- type: object
- GpuInfo:
- type: object
- required:
- - metadata
- - data
- properties:
- metadata:
- type: object
- required:
- - title
- properties:
- title:
- type: string
- data:
- type: object
- GpuMetrics:
- type: object
- required:
- - data
- - tooltip
- properties:
- data:
- type: array
- items:
- $ref: '#/components/schemas/GpuMetric'
- tooltip:
- type: string
- GpuMetric:
- type: object
- required:
- - title
- - value
- properties:
- title:
- type: string
- value:
- type: string
- MemoryStatsData:
- type: object
- required:
- - metadata
- - columns
- - rows
- properties:
- metadata:
- $ref: '#/components/schemas/MemoryStatsTableMetadata'
- columns:
- type: array
- items:
- $ref: '#/components/schemas/GraphColumn'
- rows:
- type: object
- MemoryEventsData:
- type: object
- required:
- - metadata
- - columns
- - rows
- properties:
- metadata:
- $ref: '#/components/schemas/MemoryEventsTableMetadata'
- columns:
- type: array
- items:
- $ref: '#/components/schemas/GraphColumn'
- rows:
- type: object
- MemoryEventsTableMetadata:
- type: object
- required:
- - title
- - default_device
- - value
- properties:
- title:
- type: string
- default_device:
- type: string
- search:
- type: string
- sort:
- type: string
- MemoryStatsTableMetadata:
- type: object
- required:
- - title
- - default_device
- - search
- - sort
- - value
- properties:
- title:
- type: string
- default_device:
- type: string
- search:
- type: string
- sort:
- type: string
- MemoryCurveDataMetadata:
- type: object
- required:
- - default_device
- - devices
- - peaks
- - totals
- - first_ts
- - time_metric
- - memory_metric
- - time_factor
- - memory_factor
- properties:
- default_device:
- type: string
- devices:
- type: array
- items:
- type: string
- peaks:
- type: object
- totals:
- type: object
- first_ts:
- type: number
- time_metric:
- type: string
- memory_metric:
- type: string
- time_factor:
- type: number
- memory_factor:
- type: number
- MemoryCurveData:
- type: object
- required:
- - metadata
- - columns
- - rows
- properties:
- metadata:
- $ref: '#/components/schemas/MemoryCurveDataMetadata'
- columns:
- type: array
- items:
- $ref: '#/components/schemas/GraphColumn'
- rows:
- type: object
- KeyedColumn:
- type: object
- required:
- - type
- - name
- - key
- properties:
- type:
- type: string
- name:
- type: string
- key:
- type: string
- ModuleViewData:
- type: object
- required:
- - columns
- - data
- properties:
- columns:
- type: array
- items:
- $ref: '#/components/schemas/KeyedColumn'
- data:
- type: array
- items:
- $ref: '#/components/schemas/ModuleStats'
- ModuleStats:
- type: object
- required:
- - name
- - id
- - occurences
- - operators
- - host_duration
- - self_host_duration
- - device_duration
- - self_device_duration
- - avg_duration
- - children
- properties:
- name:
- type: string
- id:
- type: string
- occurences:
- type: number
- operators:
- type: number
- host_duration:
- type: number
- self_host_duration:
- type: number
- device_duration:
- type: number
- self_device_duration:
- type: number
- avg_duration:
- type: number
- children:
- type: array
- items:
- $ref: '#/components/schemas/ModuleStats'
- OperatorNode:
- type: object
- required:
- - name
- - start_time
- - end_time
- - type
- - tid
- - children
- properties:
- name:
- type: string
- start_time:
- type: number
- end_time:
- type: number
- type:
- type: string
- tid:
- type: number
- children:
- type: array
- items:
- $ref: '#/components/schemas/OperatorNode'
- OpAgg:
- type: object
- required:
- - name
- - calls
- - host_duration
- - device_duration
- - self_host_duration
- - self_device_duration
- properties:
- name:
- type: string
- calls:
- type: number
- host_duration:
- type: number
- device_duration:
- type: number
- self_host_duration:
- type: number
- self_device_duration:
- type: number
- OpStats:
- type: object
- required:
- - name
- - duration
- - device_duration
- - total_duration
- - aggs
- properties:
- name:
- type: string
- duration:
- type: number
- device_duration:
- type: number
- total_duration:
- type: number
- aggs:
- type: array
- items:
- $ref: '#/components/schemas/OpAgg'
- DiffNode:
- type: object
- required:
- - left
- - right
- - children
- - path
- properties:
- left:
- $ref: '#/components/schemas/OpStats'
- right:
- $ref: '#/components/schemas/OpStats'
- path:
- type: string
- children:
- type: array
- items:
- $ref: '#/components/schemas/DiffNode'
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/app.tsx b/plugins/tensorboard-plugins/tb_plugin/fe/src/app.tsx
deleted file mode 100644
index 19eb4b112529073c6b8db9a86b8d68a7633598db..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/app.tsx
+++ /dev/null
@@ -1,625 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------
- * Copyright (c) 2023, Huawei Technologies.
- * All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Modifications: Add visualization of PyTorch Ascend profiling.
- *--------------------------------------------------------------------------------------------*/
-
-import Box from '@material-ui/core/Box';
-import Card from '@material-ui/core/Card';
-import CardContent from '@material-ui/core/CardContent';
-import CardHeader from '@material-ui/core/CardHeader';
-import ClickAwayListener from '@material-ui/core/ClickAwayListener';
-import CssBaseline from '@material-ui/core/CssBaseline';
-import Divider from '@material-ui/core/Divider';
-import Drawer from '@material-ui/core/Drawer';
-import Fab from '@material-ui/core/Fab';
-import FormControl from '@material-ui/core/FormControl';
-import IconButton from '@material-ui/core/IconButton';
-import ListSubheader from '@material-ui/core/ListSubheader';
-import MenuItem from '@material-ui/core/MenuItem';
-import Select, { SelectProps } from '@material-ui/core/Select';
-import { makeStyles } from '@material-ui/core/styles';
-import Tab from '@material-ui/core/Tab';
-import Tabs from '@material-ui/core/Tabs';
-import Typography from '@material-ui/core/Typography';
-import ChevronLeftIcon from '@material-ui/icons/ChevronLeft';
-import ChevronRightIcon from '@material-ui/icons/ChevronRight';
-import { message } from 'antd';
-import 'antd/es/button/style/css';
-import 'antd/es/list/style/css';
-import 'antd/es/table/style/css';
-import clsx from 'clsx';
-import * as React from 'react';
-import * as api from './api';
-import { AccuracyLeftPanel } from './components/Accuracy/AccuracyLeftPanel';
-import { FileInfo } from './components/Accuracy/entity';
-import { LossComparison } from './components/Accuracy/LossComparison';
-import { DiffOverview } from './components/DiffOverview';
-import { DistributedView } from './components/DistributedView';
-import { FullCircularProgress } from './components/FullCircularProgress';
-import { Kernel as KernelView } from './components/Kernel';
-import { MemoryView } from './components/MemoryView';
-import { ModuleView } from './components/ModuleView';
-import { Operator as OperatorView } from './components/Operator';
-import { Overview as OverviewPage } from './components/Overview';
-import { TraceView } from './components/TraceView';
-import { setup } from './setup';
-import './styles.css';
-import { firstOrUndefined, sleep } from './utils';
-
-export enum Views {
- Overview = 'Overview',
- Operator = 'Operator',
- Kernel = 'Kernel',
- Trace = 'Trace',
- Distributed = 'Distributed',
- Memory = 'Memory',
- Module = 'Module',
- Lightning = 'Lightning',
-}
-
-const viewNames = {
- [Views.Overview]: Views.Overview,
- [Views.Operator]: Views.Operator,
- [Views.Kernel]: 'Kernel',
- [Views.Trace]: Views.Trace,
- [Views.Distributed]: Views.Distributed,
- [Views.Memory]: Views.Memory,
- [Views.Module]: Views.Module,
- [Views.Lightning]: Views.Lightning,
-};
-
-const drawerWidth = 340;
-const useStyles = makeStyles((theme) => ({
- root: {
- display: 'flex',
- height: '100%',
- },
- appBar: {
- zIndex: theme.zIndex.drawer + 1,
- transition: theme.transitions.create(['width', 'margin'], {
- easing: theme.transitions.easing.sharp,
- duration: theme.transitions.duration.leavingScreen,
- }),
- },
- appBarShift: {
- marginLeft: drawerWidth,
- width: `calc(100% - ${drawerWidth}px)`,
- transition: theme.transitions.create(['width', 'margin'], {
- easing: theme.transitions.easing.sharp,
- duration: theme.transitions.duration.enteringScreen,
- }),
- },
- menuButton: {
- marginRight: 36,
- },
- hide: {
- display: 'none',
- },
- drawer: {
- width: drawerWidth,
- flexShrink: 0,
- whiteSpace: 'nowrap',
- },
- drawerOpen: {
- width: drawerWidth,
- zIndex: 999,
- transition: theme.transitions.create('width', {
- easing: theme.transitions.easing.sharp,
- duration: theme.transitions.duration.enteringScreen,
- }),
- },
- drawerClose: {
- transition: theme.transitions.create('width', {
- easing: theme.transitions.easing.sharp,
- duration: theme.transitions.duration.leavingScreen,
- }),
- overflowX: 'hidden',
- width: 0,
- [theme.breakpoints.up('sm')]: {
- width: 0,
- },
- },
- toolbar: {
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'flex-end',
- padding: theme.spacing(0, 1),
- // necessary for content to be below app bar
- ...theme.mixins.toolbar,
- },
- content: {
- flexGrow: 1,
- padding: theme.spacing(3),
- overflowX: 'hidden',
- },
- formControl: {
- margin: theme.spacing(1),
- minWidth: 120,
- },
- fab: {
- marginLeft: theme.spacing(1),
- marginTop: theme.spacing(1),
- position: 'absolute',
- },
- iconButton: {
- padding: '8px',
- },
-}));
-
-export const App = (): JSX.Element => {
- const classes = useStyles();
-
- // #region - State
- const [selectedTab, setSelectedTab] = React.useState(0);
-
- const [run, setRun] = React.useState('');
- const [runs, setRuns] = React.useState([]);
- const [runsLoading, setRunsLoading] = React.useState(true);
-
- const [workers, setWorkers] = React.useState([]);
- const [worker, setWorker] = React.useState('');
-
- const [spans, setSpans] = React.useState([]);
- const [span, setSpan] = React.useState('');
-
- const [views, setViews] = React.useState([]);
- const [view, setView] = React.useState('');
- const [loaded, setLoaded] = React.useState(false);
- const iframeRef = React.useRef(null);
- const [deviceTarget, setDeviceTarget] = React.useState('GPU');
-
- const [diffLeftWorkerOptions, setDiffLeftWorkerOptions] = React.useState([]);
- const [diffLeftSpansOptions, setDiffLeftSpansOptions] = React.useState([]);
- const [diffLeftRun, setDiffLeftRun] = React.useState('');
- const [diffLeftWorker, setDiffLeftWorker] = React.useState('');
- const [diffLeftSpan, setDiffLeftSpan] = React.useState('');
-
- const [diffRightWorkerOptions, setDiffRightWorkerOptions] = React.useState([]);
- const [diffRightSpansOptions, setDiffRightSpansOptions] = React.useState([]);
- const [diffRightRun, setDiffRightRun] = React.useState('');
- const [diffRightWorker, setDiffRightWorker] = React.useState('');
- const [diffRightSpan, setDiffRightSpan] = React.useState('');
-
- const [open, setOpen] = React.useState(true);
-
- const [topTab, setTopTab] = React.useState(0);
- const [fileList, setFileList] = React.useState([]);
- const [uploadedCount, setUploadedCount] = React.useState(0); // #endregion
-
- React.useEffect(() => {
- setup()
- .catch(() => {
- message.warning('google chart is not supported offline');
- })
- .finally(() => {
- setLoaded(true);
- });
- }, []);
-
- const continuouslyFetchRuns = async (): Promise => {
- while (true) {
- try {
- const result = await api.defaultApi.runsGet();
- setRuns(result.runs);
- setRunsLoading(result.loading);
- } catch (e) {
- message.warning(`Cannot fetch runs: ${e}`);
- }
- await sleep(5000);
- }
- };
-
- React.useEffect(() => {
- continuouslyFetchRuns();
- }, []);
-
- React.useEffect(() => {
- if (!run || !runs.includes(run)) {
- setRun(firstOrUndefined(runs) ?? '');
- }
- }, [runs]); // #region - Diff Left
-
- React.useEffect(() => {
- if (diffLeftRun) {
- api.defaultApi.workersGet(diffLeftRun, Views.Overview).then((data) => {
- setDiffLeftWorkerOptions(data);
- });
- }
- }, [diffLeftRun]);
-
- React.useEffect(() => {
- if (diffLeftRun && diffLeftWorker) {
- api.defaultApi.spansGet(diffLeftRun, diffLeftWorker).then((data) => {
- setDiffLeftSpansOptions(data);
- });
- }
- }, [diffLeftRun, diffLeftWorker]);
-
- // #endregion
- // #region - Diff Right
- React.useEffect(() => {
- if (diffRightRun) {
- api.defaultApi.workersGet(diffRightRun, Views.Overview).then((data) => {
- setDiffRightWorkerOptions(data);
- });
- }
- }, [diffRightRun]);
-
- React.useEffect(() => {
- if (diffRightRun && diffRightWorker) {
- api.defaultApi.spansGet(diffRightRun, diffRightWorker).then((data) => {
- setDiffRightSpansOptions(data);
- });
- }
- }, [diffRightRun, diffRightWorker]);
-
- // #endregion
- // #region - normal
- React.useEffect(() => {
- if (run) {
- api.defaultApi.viewsGet(run).then((rawViews) => {
- const result = rawViews.views.map((v) => Views[Views[v as Views]]).filter(Boolean);
- setDeviceTarget(rawViews.device_target);
- setViews(result);
- });
- }
- }, [run]);
-
- React.useEffect(() => {
- setView(firstOrUndefined(views) ?? '');
- }, [views]);
-
- React.useEffect(() => {
- if (run && view) {
- api.defaultApi.workersGet(run, view).then((data) => {
- setWorkers(data);
- });
- }
- }, [run, view]);
-
- React.useEffect(() => {
- setWorker(firstOrUndefined(workers) ?? '');
- }, [workers]);
-
- React.useEffect(() => {
- if (run && worker) {
- api.defaultApi.spansGet(run, worker).then((data) => {
- setSpans(data);
- });
- }
- }, [run, worker]);
-
- React.useEffect(() => {
- setSpan(firstOrUndefined(spans) ?? '');
- }, [spans]);
-
- // #endregion
-
- // #region - Event Handler
- const handleTabChange = (event: React.ChangeEvent>, value: any): void => {
- setSelectedTab(value as number);
- };
-
- const handleTopTabChange = (event: React.ChangeEvent>, value: any): void => {
- setTopTab(value as number);
- };
-
- const handleRunChange: SelectProps['onChange'] = (event) => {
- setRun(event.target.value as string);
- setView('');
- setWorker('');
- setSpan('');
- };
-
- const handleViewChange: SelectProps['onChange'] = (event) => {
- setView(event.target.value as Views);
- setWorker('');
- setSpan('');
- };
-
- const handleWorkerChange: SelectProps['onChange'] = (event) => {
- setWorker(event.target.value as string);
- setSpan('');
- };
-
- const handleSpanChange: SelectProps['onChange'] = (event) => {
- setSpan(event.target.value as string);
- };
-
- const handleDiffLeftRunChange: SelectProps['onChange'] = (event) => {
- setDiffLeftRun(event.target.value as string);
- setDiffLeftWorker('');
- setDiffLeftSpan('');
- };
-
- const handleDiffLeftWorkerChange: SelectProps['onChange'] = (event) => {
- setDiffLeftWorker(event.target.value as string);
- setDiffLeftSpan('');
- };
-
- const handleDiffLeftSpanChange: SelectProps['onChange'] = (event) => {
- setDiffLeftSpan(event.target.value as string);
- };
-
- const handleDiffRightRunChange: SelectProps['onChange'] = (event) => {
- setDiffRightRun(event.target.value as string);
- setDiffRightWorker('');
- setDiffRightSpan('');
- };
-
- const handleDiffRightWorkerChange: SelectProps['onChange'] = (event) => {
- setDiffRightWorker(event.target.value as string);
- setDiffRightSpan('');
- };
-
- const handleDiffRightSpanChange: SelectProps['onChange'] = (event) => {
- setDiffRightSpan(event.target.value as string);
- };
-
- const handleDrawerOpen = (): void => {
- setOpen(true);
- setIframeActive();
- };
-
- const handleDrawerClose = (): void => {
- setOpen(false);
- setIframeActive();
- };
-
- const setIframeActive = (): void => {
- iframeRef.current?.focus();
- };
-
- const _changeFileList = (files: FileInfo[]): void => {
- if (JSON.stringify(files) !== JSON.stringify(fileList)) {
- setFileList(files);
- }
- };
-
- const _getViews = (viewName: Views): string => {
- if (viewName === Views.Kernel) {
- return deviceTarget === 'Ascend' ? `NPU ${viewNames[viewName]}` : `GPU ${viewNames[viewName]}`;
- } else {
- return viewNames[viewName];
- }
- };
-
- const _changeUploadCount = (count: number): void => {
- setUploadedCount(count);
- }; // #endregion
-
- const renderContent = (): JSX.Element => {
- if (!runsLoading && runs.length === 0) {
- return (
-
-
-
- There are not any runs in the log folder.
-
-
- );
- }
- const notReady = !loaded || !run || !worker || !view || !span;
- if (notReady) {
- return ;
- }
-
- if (selectedTab === 0) {
- switch (view) {
- case Views.Overview:
- return ;
- case Views.Operator:
- return ;
- case Views.Kernel:
- return ;
- case Views.Trace:
- return ;
- case Views.Distributed:
- return ;
- case Views.Memory:
- return ;
- case Views.Module:
- case Views.Lightning:
- return ;
- default:
- return <>>;
- }
- } else {
- return (
-
- );
- }
- };
-
- const spanComponent = (): JSX.Element => {
- const spanFragment = (
-
- Spans
-
-
-
- {spans.map((item) => (
- {item}
- ))}
-
-
-
-
- );
-
- if (!spans || spans.length <= 1) {
- return {spanFragment}
;
- } else {
- return spanFragment;
- }
- };
-
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {topTab === 0 ? (
- <>
-
-
-
-
-
-
- {selectedTab === 0 ? (
- <>
- Runs
-
-
-
- {runs.map((item) => (
- {item}
- ))}
-
-
-
- Views
-
-
-
- {views.map((item) => (
- {_getViews(item)}
- ))}
-
-
-
- Workers
-
-
-
- {workers.map((worker1) => (
- {worker1}
- ))}
-
-
-
- {spanComponent()}
- >
- ) : (
- <>
- Baseline
- Runs
-
-
- {runs.map((item) => (
- {item}
- ))}
-
-
- Workers
-
-
-
- {diffLeftWorkerOptions.map((worker2) => (
- {worker2}
- ))}
-
-
- Spans
-
-
- {diffLeftSpansOptions.map((span1) => (
- {span1}
- ))}
-
-
-
-
-
- Experimental
- Runs
-
-
- {runs.map((item) => (
- {item}
- ))}
-
-
- Workers
-
-
- {diffRightWorkerOptions.map((worker3) => (
- {worker3}
- ))}
-
-
- Spans
-
-
- {diffRightSpansOptions.map((span2) => (
- {span2}
- ))}
-
-
- >
- )}
- >
- ) : (
-
- )}
-
- {!open && (
-
-
-
- )}
-
- {topTab === 0 ? renderContent() : }
-
-
- );
-};
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/Accuracy/AccuracyLeftPanel.tsx b/plugins/tensorboard-plugins/tb_plugin/fe/src/components/Accuracy/AccuracyLeftPanel.tsx
deleted file mode 100644
index c7b7d7cf0841e7dc3686138b584e101e5052f4a6..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/Accuracy/AccuracyLeftPanel.tsx
+++ /dev/null
@@ -1,334 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------
- * Copyright (c) 2023, Huawei Technologies.
- * All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the 'License')
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an 'AS IS' BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *--------------------------------------------------------------------------------------------*/
-
-import * as React from 'react';
-import { useState, useEffect, useCallback, useRef } from 'react';
-import { makeStyles } from '@material-ui/core/styles';
-import { Button, Checkbox, Spin, Modal, message } from 'antd';
-import { CheckboxChangeEvent } from 'antd/es/checkbox';
-import { DeleteOutlined, DownloadOutlined, ImportOutlined, SettingOutlined, WarningTwoTone } from '@ant-design/icons';
-import { RegexConfigModal } from './RegexConfigModal';
-import { FileInfo } from './entity';
-
-interface IProps {
- onChangeCheckedFileList: (files: FileInfo[]) => void;
- onChangeUploadedCount: (count: number) => void;
-}
-
-// 匹配数字包括科学计数法
-const LOSS_REG_EXP = /[+-]?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/;
-// 匹配自然数
-const ITER_REG_EXP = /\d+/;
-// 单个文件最大大小
-const FILE_MAX_SIZE = 50 * 1024 * 1024;
-// 最大文件上传数量
-export const MAX_FILE_COUNT = 6;
-
-const useStyles = makeStyles(() => ({
- root: {
- height: '100%',
- },
- btnPanel: {
- height: 50,
- lineHeight: '50px',
- borderBottom: '1px solid #DFE5EF',
- display: 'flex',
- '& .ant-btn': {
- margin: 'auto',
- },
- },
- fileContainer: {
- height: 54,
- padding: '0 24px',
- display: 'flex',
- alignItems: 'center',
- '& .fileNameLabel': {
- display: 'inline-block',
- marginLeft: 12,
- width: 200,
- fontSize: 14,
- overflow: 'hidden',
- textOverflow: 'ellipsis',
- whiteSpace: 'nowrap',
- },
- '& .btns': {
- display: 'inline-block',
- marginLeft: 'auto',
- '& .icon': {
- cursor: 'pointer',
- '&:hover': {
- color: '#1890ff',
- },
- },
- '& .iconLeft': {
- marginRight: 8,
- },
- },
- },
- deleteModal: {
- '& .ant-modal-title': {
- fontWeight: 'bold',
- },
- '& .deleteModalBody': {
- display: 'flex',
- alignItems: 'center',
- height: 80,
- '& .warningIcon': {
- display: 'inline-block',
- fontSize: 50,
- },
- '& .warningText': {
- display: 'inline-block',
- marginLeft: 16,
- overflow: 'hidden',
- wordBreak: 'break-all',
- flex: 1,
- },
- },
- },
-}));
-
-export const AccuracyLeftPanel: React.FC = (props) => {
- const { onChangeCheckedFileList, onChangeUploadedCount } = props;
- const classes = useStyles();
- const [configModalVis, setConfigModalVis] = useState(false);
- const [deleteModalVis, setDeleteModalVis] = useState(false);
- const [fileList, setFileList] = useState([]);
- const [importSpin, setImportSpin] = useState(false);
- const [selectedFile, setSelectedFile] = useState(undefined);
- const downLoadRef = useRef(null);
-
- const parseFile = (file: FileInfo): FileInfo => {
- file.losses = [];
- file.iterLosses = {};
- file.iters = [];
- const lines = file.fileContent.split(/\r\n|\n|\r/);
- for (let i = 0; i < lines.length; i++) {
- const iter = parseByTag(lines[i], file.iterTag, false);
- const loss = parseByTag(lines[i], file.lossTag, true);
- if (iter !== null && loss !== null) {
- file.iters.push(iter);
- file.losses.push([iter, loss]);
- file.iterLosses[iter] = loss;
- }
- }
- return file;
- };
-
- const parseByTag = (line: string, tag: string, isLoss: boolean): number | null => {
- let pos = line.indexOf(tag);
- let result: number | null = null;
- if (pos !== -1) {
- const res = (isLoss ? LOSS_REG_EXP : ITER_REG_EXP).exec(
- line
- .substring(pos + tag.length)
- .trim()
- .split(/\s+/)[0]
- );
- if (res !== null) {
- if (isLoss) {
- result = parseFloat(res[0]);
- } else {
- result = parseInt(res[0]);
- }
- } else {
- console.warn(`Found ${isLoss ? 'loss' : 'iteration'} text, but parse value with error: [${line}]`);
- }
- }
- return result;
- };
-
- const importFile = (): void => {
- document.getElementById('accComparisonSelectFile')?.click();
- };
-
- const uploadFile = (e: React.ChangeEvent): void => {
- setImportSpin(true);
- const file = e.target.files?.[0];
- if (file) {
- if (file.size > FILE_MAX_SIZE) {
- message.warn('Sorry, the file size cannot be greater than 50MB.');
- setImportSpin(false);
- // 防止同名文件不触发事件
- e.target.value = '';
- return;
- }
- const reader = new FileReader();
- reader.onload = ((loadedFile) => {
- return (event) => {
- addFile(loadedFile.name.trim(), event.target?.result as string);
- setImportSpin(false);
- };
- })(file);
- reader.readAsText(file);
- }
- // 防止同名文件不触发事件
- e.target.value = '';
- };
-
- const addFile = (fileName: string, fileContent: string): void => {
- const fileLength = fileName.length;
- const tempList: FileInfo[] = JSON.parse(JSON.stringify(fileList));
- let updatedFileName = fileName; // 新变量用于存储更新后的文件名
- // 上传同名文件加上(1~最大文件数减1)标识
- if (!!tempList.find((item) => item.fileName === fileName)) {
- for (let i = 1; i < MAX_FILE_COUNT; i++) {
- let temp = `${fileName.slice(0, fileLength - 4)}(${i})${fileName.slice(fileLength - 4)}`;
- if (tempList.find((item) => item.fileName === temp) === undefined) {
- updatedFileName = temp;
- break;
- }
- }
- }
- const file: FileInfo = {
- id: fileList.length,
- fileName: updatedFileName,
- fileContent,
- checked: true,
- lossTag: 'loss:',
- iterTag: 'iteration',
- iters: [],
- losses: [],
- iterLosses: {},
- };
- tempList.push(parseFile(file));
- setFileList(tempList);
- };
-
- const exportCsv = (data: FileInfo): void => {
- let csvContent = `data:text/csv;charset=utf-8,${data.iterTag},${data.lossTag}\n`;
- data.losses.forEach((item) => {
- csvContent += `${item[0]},${item[1]}\n`;
- });
- downLoadRef.current?.setAttribute('href', encodeURI(csvContent));
- downLoadRef.current?.setAttribute('download', `${data.fileName}.csv`);
- downLoadRef.current?.click();
- };
-
- const onCheckChange = (e: CheckboxChangeEvent, index: number): void => {
- const tempList: FileInfo[] = JSON.parse(JSON.stringify(fileList));
- tempList[index].checked = e.target.checked;
- setFileList(tempList);
- };
-
- const onConfigIconClick = (data: FileInfo): void => {
- setSelectedFile(data);
- setConfigModalVis(true);
- };
-
- const onDeleteIconClick = (data: FileInfo): void => {
- setSelectedFile(data);
- setDeleteModalVis(true);
- };
-
- const configModalOk = (data: FileInfo): void => {
- const tempList = fileList.map((item) => {
- return item.id === data.id ? parseFile(data) : item;
- });
- setFileList(tempList);
- setConfigModalVis(false);
- };
-
- const configModalCancel = (): void => {
- setConfigModalVis(false);
- };
-
- const deleteModalOk = (): void => {
- const tempList = JSON.parse(JSON.stringify(fileList));
- let founded = false;
- let index = 0;
- for (let i = 0; i < tempList.length; i++) {
- if (founded) {
- tempList[i].id -= 1;
- continue;
- }
- if (tempList[i].id === selectedFile?.id) {
- founded = true;
- index = i;
- }
- }
- tempList.splice(index, 1);
- setFileList(tempList);
- setSelectedFile(undefined);
- setDeleteModalVis(false);
- };
-
- const renderFileItems = useCallback(() => {
- return fileList.map((item) => {
- return (
-
-
onCheckChange(e, item.id)} />
-
- {item.fileName}
-
-
- onConfigIconClick(item)} />
- exportCsv(item)} />
- onDeleteIconClick(item)} />
-
-
- );
- });
- }, [JSON.stringify(fileList)]);
-
- useEffect(() => {
- onChangeCheckedFileList(fileList.filter((item) => item.checked));
- onChangeUploadedCount(fileList.length);
- }, [JSON.stringify(fileList)]);
-
- return (
-
-
-
- }
- onClick={importFile}
- disabled={fileList.length >= MAX_FILE_COUNT}
- title={`You can import no more than ${MAX_FILE_COUNT} files.`}
- >
- Import files
-
-
-
- {renderFileItems()}
-
- {configModalVis && (
-
- )}
-
setDeleteModalVis(false)}
- onOk={deleteModalOk}
- width={500}
- className={classes.deleteModal}
- >
-
-
-
- Are you sure to delete "{selectedFile?.fileName} "?
-
-
-
-
-
- );
-};
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/Accuracy/ComparisonPanel.tsx b/plugins/tensorboard-plugins/tb_plugin/fe/src/components/Accuracy/ComparisonPanel.tsx
deleted file mode 100644
index 500d29764c5209958ba19630ac1d4e08c10f24a5..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/Accuracy/ComparisonPanel.tsx
+++ /dev/null
@@ -1,322 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------
- * Copyright (c) 2023, Huawei Technologies.
- * All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the 'License')
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an 'AS IS' BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *--------------------------------------------------------------------------------------------*/
-
-import * as React from 'react';
-import { useState, useLayoutEffect, useRef, useEffect } from 'react';
-import { makeStyles } from '@material-ui/core/styles';
-import { FileInfo } from './entity';
-import { Empty, Popover, Radio, RadioChangeEvent, Select, Table } from 'antd';
-import { ColumnsType } from 'antd/es/table';
-import * as echarts from 'echarts';
-import { InfoCircleOutlined } from '@ant-design/icons';
-
-interface IProps {
- fileList: FileInfo[];
-}
-
-interface ILineDataList {
- normal: number[][];
- absolute: number[][];
- relative: number[][];
-}
-
-const useStyles = makeStyles(() => ({
- root: {
- height: '50%',
- width: '100%',
- padding: '0 24px 24px',
- display: 'flex',
- flexDirection: 'column',
- },
- title: {
- height: 24,
- lineHeight: '24px',
- fontFamily: 'sans-serif',
- fontSize: 16,
- fontWeight: 700,
- },
- filter: {
- height: 40,
- lineHeight: '40px',
- '& .comparisonSelect': {
- margin: '0 8px',
- },
- '& .comparisonLabel': {
- marginRight: 8,
- },
- '& .comparisonBtn': {
- marginLeft: 20,
- },
- '& .infoLabel': {
- fontSize: 20,
- },
- },
- empty: {
- marginTop: 60,
- },
- content: {
- flex: 1,
- display: 'flex',
- },
- lossChart: {
- height: '100%',
- flex: 1,
- },
- lossTable: {
- height: '100%',
- width: '32%',
- },
- tableHeader: {
- display: 'inline-block',
- width: 134,
- position: 'absolute',
- top: '50%',
- transform: 'translateY(-50%)',
- overflow: 'hidden',
- textOverflow: 'ellipsis',
- whiteSpace: 'nowrap',
- },
-}));
-
-export const ComparisonPanel: React.FC = (props) => {
- const { fileList } = props;
- const classes = useStyles();
- const [selectedFiles, setSelectedFiles] = useState([]);
- const [compareWay, setCompareWay] = useState(0);
- const [pageSize, setPageSize] = useState(20);
- const [lineData, setLineData] = useState(undefined);
- const [tableData, setTableData] = useState([]);
- const chartRef = useRef(null);
-
- const getColumns = (): ColumnsType => {
- const columns: ColumnsType = [
- {
- title: 'Iteration',
- key: 'iter',
- dataIndex: 'iter',
- },
- ];
- selectedFiles.forEach((item, index) => {
- columns.push({
- title: () => (
-
- {item}
-
- ),
- key: index,
- dataIndex: item,
- width: '40%',
- });
- });
- return columns;
- };
-
- const compareFile = (fileNames: string[]): void => {
- if (fileNames.length < 2) {
- return;
- }
- const baseFile = fileList.find((item) => item.fileName === fileNames[0]);
- const expFile = fileList.find((item) => item.fileName === fileNames[1]);
- if (!!baseFile && !!expFile) {
- const commonIters: number[] = [];
- const lessIters = baseFile.iters.length <= expFile.iters.length ? baseFile.iters : expFile.iters;
- const moreIters = baseFile.iters.length > expFile.iters.length ? baseFile.iters : expFile.iters;
- lessIters.forEach((iter) => {
- if (moreIters.includes(iter)) {
- commonIters.push(iter);
- }
- });
- commonIters.sort((a, b) => a - b);
- const tempTableData: any[] = [];
- const tempChartData: ILineDataList = {
- normal: [],
- absolute: [],
- relative: [],
- };
- commonIters.forEach((iter, index) => {
- const baseLoss = baseFile.iterLosses[iter];
- const expLoss = expFile.iterLosses[iter];
- tempTableData.push({
- key: `${iter}_${index}`,
- iter,
- [baseFile.fileName]: baseLoss,
- [expFile.fileName]: expLoss,
- });
- tempChartData.normal.push([iter, expLoss - baseLoss]);
- tempChartData.absolute.push([iter, Math.abs(expLoss - baseLoss)]);
- tempChartData.relative.push([iter, baseLoss === 0 ? 0 : Math.abs(expLoss - baseLoss) / baseLoss]);
- });
- setTableData(tempTableData);
- setLineData(tempChartData);
- }
- };
-
- const onSelectChange = (value: string[]): void => {
- setSelectedFiles(value);
- compareFile(value);
- };
-
- const onRadioChange = (e: RadioChangeEvent): void => {
- setCompareWay(e.target.value);
- };
-
- const onShowSizeChange = (current: number, size: number): void => {
- setPageSize(size);
- };
-
- useLayoutEffect(() => {
- const element = chartRef.current;
- if (!element || !lineData) {
- return undefined;
- }
- const echart = echarts.init(element);
- let dataSource: number[][] = [];
- if (compareWay === 0) {
- dataSource = lineData.normal;
- } else if (compareWay === 1) {
- dataSource = lineData.absolute;
- } else {
- dataSource = lineData.relative;
- }
- const option: echarts.EChartsOption = {
- title: {
- text: 'Comparison Chart',
- textStyle: {
- fontSize: 12,
- color: '#000',
- },
- },
- legend: { bottom: 0 },
- xAxis: {
- type: 'category',
- boundaryGap: false,
- name: 'Iteration',
- },
- yAxis: {
- type: 'value',
- name: 'Difference',
- scale: true,
- },
- tooltip: {
- trigger: 'axis',
- valueFormatter: (value) => (value as number).toFixed(6),
- },
- dataZoom: {
- type: 'inside',
- },
- dataset: {
- source: dataSource,
- },
- series: {
- type: 'line',
- name: 'Difference',
- symbol: 'none',
- },
- };
-
- if (option) {
- echart.setOption(option, true);
- }
- return () => {
- echart.dispose();
- };
- }, [compareWay, lineData]);
-
- useEffect(() => {
- const tempValue = selectedFiles.filter((item) => {
- return !!fileList.find((file) => file.fileName === item);
- });
- if (JSON.stringify(tempValue) === JSON.stringify(selectedFiles)) {
- compareFile(tempValue);
- }
- setSelectedFiles(tempValue);
- }, [fileList]);
-
- return (
-
-
Comparison Data
-
-
Comparison objects:
-
{
- return {
- value: file.fileName,
- label: file.fileName,
- disabled: !selectedFiles.includes(file.fileName) && selectedFiles.length > 1,
- };
- })}
- />
- Comparison Setting:
-
- Comparison Normal
- Comparison Absolute
- Comparison Relative
-
-
-
- Normal: The real difference.
-
-
- Absolute: The absolute value of difference.
-
-
- Relative: The absolute value of difference divided by the loss value of the first file.
-
- >
- }
- >
-
-
-
- {selectedFiles.length < 2 ? (
-
- ) : (
-
-
-
`Total ${total} items`,
- onShowSizeChange,
- }}
- />
-
- )}
-
- );
-};
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/Accuracy/LossComparison.tsx b/plugins/tensorboard-plugins/tb_plugin/fe/src/components/Accuracy/LossComparison.tsx
deleted file mode 100644
index fcf1c67953460c367246ee7a0374c7e6676ffda4..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/Accuracy/LossComparison.tsx
+++ /dev/null
@@ -1,87 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------
- * Copyright (c) 2023, Huawei Technologies.
- * All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *--------------------------------------------------------------------------------------------*/
-
-import * as React from 'react';
-import { makeStyles } from '@material-ui/core/styles';
-import { FileInfo } from './entity';
-import { Empty, message } from 'antd';
-import { LossDisplayPanel } from './LossDisplayPanel';
-import { ComparisonPanel } from './ComparisonPanel';
-import { MAX_FILE_COUNT } from './AccuracyLeftPanel';
-
-interface IProps {
- fileList: FileInfo[];
- fileCount: number;
-}
-
-const useStyles = makeStyles(() => ({
- root: {
- display: 'flex',
- flexDirection: 'column',
- alignItems: 'center',
- backgroundColor: 'white',
- height: '100%',
- overflowY: 'auto',
- '& .welcomeLabel': {
- marginTop: '18%',
- font: '36px bold',
- },
- '& .importText': {
- fontSize: 20,
- fontWeight: 400,
- margin: '24px 0',
- '& span': {
- cursor: 'pointer',
- color: '#0077ff',
- },
- },
- },
-}));
-
-export const LossComparison: React.FC = (props) => {
- const { fileList, fileCount } = props;
- const classes = useStyles();
-
- const onImportFile = (): void => {
- if (fileCount >= MAX_FILE_COUNT) {
- message.warn(`You can import no more than ${MAX_FILE_COUNT} files.`);
- return;
- }
- document.getElementById('accComparisonSelectFile')?.click();
- };
-
- return (
-
- {fileList.length <= 0 ? (
- <>
-
Welcome to loss comparison
-
- Select left files or Import files
-
-
- >
- ) : (
- <>
-
- {fileList.length > 1 &&
}
- >
- )}
-
- );
-};
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/Accuracy/LossDisplayPanel.tsx b/plugins/tensorboard-plugins/tb_plugin/fe/src/components/Accuracy/LossDisplayPanel.tsx
deleted file mode 100644
index 87190756e58bb951c30edd381b512ce4c91d1afc..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/Accuracy/LossDisplayPanel.tsx
+++ /dev/null
@@ -1,228 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------
- * Copyright (c) 2023, Huawei Technologies.
- * All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the 'License')
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an 'AS IS' BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *--------------------------------------------------------------------------------------------*/
-
-import * as React from 'react';
-import { useState, useLayoutEffect, useRef } from 'react';
-import { makeStyles } from '@material-ui/core/styles';
-import { FileInfo } from './entity';
-import * as echarts from 'echarts';
-import { Table } from 'antd';
-import { ColumnsType } from 'antd/es/table';
-
-interface IProps {
- fileList: FileInfo[];
-}
-
-const useStyles = makeStyles(() => ({
- root: {
- padding: 24,
- width: '100%',
- display: 'flex',
- flexDirection: 'column',
- height: '50%',
- },
- title: {
- height: 24,
- lineHeight: '24px',
- fontFamily: 'sans-serif',
- fontSize: 16,
- fontWeight: 700,
- },
- content: {
- flex: 1,
- display: 'flex',
- },
- lossChart: {
- height: '100%',
- flex: 1,
- },
- lossTable: {
- height: '100%',
- width: '32%',
- },
- tableHeader: {
- display: 'inline-block',
- width: 134,
- position: 'absolute',
- top: '50%',
- transform: 'translateY(-50%)',
- overflow: 'hidden',
- textOverflow: 'ellipsis',
- whiteSpace: 'nowrap',
- },
-}));
-
-export const LossDisplayPanel: React.FC = (props) => {
- const { fileList } = props;
- const classes = useStyles();
- const chartRef = useRef(null);
- const [pageSize, setPageSize] = useState(20);
- const totalRef = useRef(0);
-
- const getColumns = (): ColumnsType => {
- const columns: ColumnsType = [
- {
- title: 'Iteration',
- key: 'iter',
- dataIndex: 'iter',
- width: '20%',
- fixed: 'left',
- },
- ];
- fileList.forEach((item, index) => {
- columns.push({
- title: () => (
-
- {item.fileName}
-
- ),
- key: index,
- dataIndex: item.fileName,
- width: 150,
- });
- });
- return columns;
- };
-
- const getTableData = (): readonly any[] => {
- const dataSource: any[] = [];
- let allIters: number[] = [];
- fileList.forEach((file) => {
- allIters = allIters.concat(file.iters);
- });
- const uniqueIter = new Set(allIters.sort((a, b) => a - b));
- uniqueIter.forEach((iter, index) => {
- const fileLosses: { [fileName: string]: number | string } = {};
- fileList.forEach((file) => {
- fileLosses[file.fileName] = file.iterLosses[iter] ?? 'NA';
- });
- dataSource.push({
- key: `${iter}_${index}`,
- iter,
- ...fileLosses,
- });
- });
- totalRef.current = dataSource.length;
- return dataSource;
- };
-
- const onShowSizeChange = (current: number, size: number): void => {
- setPageSize(size);
- };
-
- useLayoutEffect(() => {
- const element = chartRef.current;
- if (!element) {
- return undefined;
- }
- const echart = echarts.init(element);
- const dataset: echarts.DatasetComponentOption[] = [];
- const series: echarts.SeriesOption[] = [];
- fileList.forEach((item, index) => {
- dataset.push({
- source: item.losses,
- });
- series.push({
- type: 'line',
- name: item.fileName,
- datasetIndex: index,
- symbol: 'none',
- });
- });
- let option: echarts.EChartsOption = {
- title: {
- text: 'Loss Chart',
- textStyle: {
- fontSize: 12,
- color: '#000',
- },
- },
- tooltip: {
- trigger: 'axis',
- confine: true,
- axisPointer: {
- label: {
- precision: 0,
- },
- },
- },
- legend: {
- type: 'scroll',
- bottom: 0,
- tooltip: {
- show: true,
- },
- formatter: (name) => {
- // Show ellipsis and set tooltip for legends with too long name
- return name.length > 50 ? `${name.slice(0, 48)}...` : name;
- },
- },
- xAxis: {
- type: 'value',
- boundaryGap: false,
- name: 'Iteration',
- minInterval: 1,
- },
- yAxis: {
- type: 'value',
- name: 'Loss',
- scale: true,
- },
- dataZoom: {
- type: 'inside',
- },
- dataset,
- series,
- };
-
- if (option) {
- echart.setOption(option, true);
- }
-
- return () => {
- echart.dispose();
- };
- }, [fileList]);
-
- return (
-
-
Loss Data
-
-
-
`Total ${total} items`,
- onShowSizeChange,
- }}
- />
-
-
- );
-};
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/Accuracy/RegexConfigModal.tsx b/plugins/tensorboard-plugins/tb_plugin/fe/src/components/Accuracy/RegexConfigModal.tsx
deleted file mode 100644
index 456fa2d9a2b6359ed5f03ad5763ef17373544ea4..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/Accuracy/RegexConfigModal.tsx
+++ /dev/null
@@ -1,116 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------
- * Copyright (c) 2023, Huawei Technologies.
- * All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the 'License')
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an 'AS IS' BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *--------------------------------------------------------------------------------------------*/
-
-import { Input, message, Modal } from 'antd';
-import * as React from 'react';
-import { useState } from 'react';
-import { makeStyles } from '@material-ui/core/styles';
-import { FileInfo } from './entity';
-
-interface IProps {
- file: FileInfo;
- onOk: (file: FileInfo) => void;
- onCancel: () => void;
-}
-
-const useStyles = makeStyles(() => ({
- root: {
- '& .ant-modal-title': {
- width: 500,
- overflow: 'hidden',
- textOverflow: 'ellipsis',
- whiteSpace: 'nowrap',
- fontWeight: 'bold',
- },
- },
- filterItem: {
- display: 'flex',
- height: 56,
- width: '100%',
- alignItems: 'center',
- '& .tagLabel': {
- display: 'inline-block',
- width: 100,
- },
- '& .ant-input': {
- width: 320,
- height: 32,
- },
- '& .ant-checkbox-wrapper': {
- marginLeft: 'auto',
- },
- },
-}));
-
-export const RegexConfigModal: React.FC = (props) => {
- const classes = useStyles();
- const [lossTag, setLossTag] = useState(props.file.lossTag);
- const [iterTag, setIterTag] = useState(props.file.iterTag);
-
- const lossTagChange = (e: React.ChangeEvent): void => {
- setLossTag(e.target.value);
- };
-
- const iterTagChange = (e: React.ChangeEvent): void => {
- setIterTag(e.target.value);
- };
-
- const configModalOk = (): void => {
- if (lossTag.trim() === '') {
- message.warning('Loss Tag cannot be empty or only spaces!');
- return;
- }
- if (iterTag.trim() === '') {
- message.warning('Iteration Tag cannot be empty or only spaces!');
- return;
- }
- if (lossTag === props.file.lossTag && iterTag === props.file.iterTag) {
- props.onCancel();
- } else {
- const configFile: FileInfo = {
- ...props.file,
- lossTag,
- iterTag,
- };
- props.onOk(configFile);
- }
- };
-
- return (
-
-
- Loss Tag
-
-
-
- Iteration Tag
-
-
-
- );
-};
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/Accuracy/entity.ts b/plugins/tensorboard-plugins/tb_plugin/fe/src/components/Accuracy/entity.ts
deleted file mode 100644
index 270c4cb6535633f9a03e5b9fe02dca6121cd3ba7..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/Accuracy/entity.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------
- * Copyright (c) 2023, Huawei Technologies.
- * All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the 'License')
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an 'AS IS' BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *--------------------------------------------------------------------------------------------*/
-
-export interface FileInfo {
- id: number;
- fileName: string;
- fileContent: string;
- checked: boolean;
- lossTag: string;
- iterTag: string;
- iters: number[];
- losses: number[][];
- iterLosses: { [iter: number]: number };
-}
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/DataLoading.tsx b/plugins/tensorboard-plugins/tb_plugin/fe/src/components/DataLoading.tsx
deleted file mode 100644
index 3c5d353ce641c409b51a7aaef8c00ff2f57df6e8..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/DataLoading.tsx
+++ /dev/null
@@ -1,19 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-import * as React from 'react';
-import { FullCircularProgress } from './FullCircularProgress';
-
-interface IProps {
- value?: T | null;
- children: (t: T) => JSX.Element;
-}
-
-export function DataLoading(props: IProps): JSX.Element {
- if (props.value === undefined || props.value === null) {
- return ;
- }
-
- return props.children(props.value);
-}
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/DiffOverview.tsx b/plugins/tensorboard-plugins/tb_plugin/fe/src/components/DiffOverview.tsx
deleted file mode 100644
index ed029d5020ed1eaf8caea159b25d33c7a5ad03e3..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/DiffOverview.tsx
+++ /dev/null
@@ -1,942 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-import Button from '@material-ui/core/Button';
-import Card from '@material-ui/core/Card';
-import CardContent from '@material-ui/core/CardContent';
-import CardHeader from '@material-ui/core/CardHeader';
-import Grid from '@material-ui/core/Grid';
-import { makeStyles } from '@material-ui/core/styles';
-import Typography from '@material-ui/core/Typography';
-import ChevronLeftIcon from '@material-ui/icons/ChevronLeft';
-import { Select, Table } from 'antd';
-import * as React from 'react';
-import * as api from '../api';
-import { useResizeEventDependency } from '../utils/resize';
-import { FullCircularProgress } from './FullCircularProgress';
-import * as echarts from 'echarts';
-
-const { Option } = Select;
-
-const topGraphHeight = 230;
-
-const useStyles = makeStyles((theme) => ({
- root: {
- flexGrow: 1,
- },
- pre: {
- '& ul': {
- margin: 0,
- paddingLeft: theme.spacing(3),
- ...theme.typography.body1,
- },
- '& li': {},
- '& a': {
- color: '#ffa726',
- },
- '& a:active': {
- color: '#ffa726',
- },
- '& p': {
- margin: 0,
- ...theme.typography.subtitle1,
- fontWeight: theme.typography.fontWeightBold,
- },
- },
- topGraph: {
- height: topGraphHeight + 40,
- },
- iconButton: {
- padding: '8px',
- },
-}));
-
-const getAngleByDataLength = (data: number): number => {
- if (data < 10) {
- return 0;
- } else {
- // 数量越大越趋近于旋转90度
- return 90 * (1 - (10 / data));
- }
-};
-
-export interface DiffColumnChartIProps {
- rawData: any[];
- selectCallback: (row: number, column: number) => void;
-}
-
-export interface DiffStepChartIProps {
- rawData: any[];
-}
-
-const DiffColumnChart: React.FC = (props: DiffColumnChartIProps) => {
- const { rawData, selectCallback } = props;
- const graphRef = React.useRef(null);
- const [resizeEventDependency] = useResizeEventDependency();
-
- React.useLayoutEffect(() => {
- const element = graphRef.current;
- if (!element) {
- return undefined;
- }
-
- const chart = echarts.init(element);
-
- const options: echarts.EChartsOption = {
- title: {
- text: 'Execution Comparsion',
- },
- legend: {
- top: 10,
- right: 10,
- },
- tooltip: {
- trigger: 'axis',
- formatter: function (params: any) {
- const index = params[0].name.indexOf('@');
- const safeName = params[0].name.replace(//g, '>');
- let res = `${index > -1 ? safeName.slice(index + 1) : safeName} `;
- for (const item of params) {
- if (typeof item.value[item.encode.y[0]] === 'number') {
- res += `
-
- ${item.seriesName}: ${item.value[item.encode.y[0]]} `;
- }
- }
- return res;
- },
- },
- series: [
- {
- type: 'bar',
- itemStyle: {
- color: '#3366cc',
- },
- yAxisIndex: 0,
- },
- {
- type: 'bar',
- itemStyle: {
- color: '#dc3912',
- },
- yAxisIndex: 0,
- },
- {
- type: 'line',
- itemStyle: {
- color: '#ff9900',
- },
- yAxisIndex: 1,
- },
- {
- type: 'line',
- itemStyle: {
- color: '#109618',
- },
- yAxisIndex: 1,
- },
- ],
- xAxis: {
- type: 'category',
- axisLabel: {
- interval: 0,
- rotate: getAngleByDataLength(rawData.length),
- formatter: (name: string) => {
- const index = name.indexOf('@');
- const displayName = index > -1 ? name.slice(index + 1) : name; // 创建新变量
- return displayName.length > 16 ? `${displayName.slice(0, 14)}...` : displayName;
- },
- },
- },
- yAxis: [
- {
- type: 'value',
- name: 'Time Difference(us)',
- scale: true,
- },
- {
- type: 'value',
- name: 'Accumulated Difference(us)',
- scale: true,
- },
- ],
- dataset: {
- source: rawData.map((item, idx) => {
- // 添加索引保证x轴刻度不重复
- let param: any[] = [...item];
- param[0] = `${idx}@${param[0]}`;
- return param;
- }),
- },
- };
-
- if (options) {
- chart.setOption(options, true);
- }
- chart.on('click', (param) => {
- if (param.seriesIndex !== undefined) {
- selectCallback(param.dataIndex, param.seriesIndex + 1);
- }
- });
-
- return () => {
- chart.dispose();
- };
- }, [rawData, resizeEventDependency]);
-
- return (
-
- );
-};
-
-const DiffStepChart: React.FC = (props: DiffStepChartIProps) => {
- const { rawData } = props;
- const graphRef = React.useRef(null);
- const [resizeEventDependency] = useResizeEventDependency();
-
- React.useLayoutEffect(() => {
- const element = graphRef.current;
- if (!element) {
- return undefined;
- }
- const chart = echarts.init(element);
- const options: echarts.EChartsOption = {
- title: {
- text: 'Execution Diff',
- },
- legend: {
- top: 10,
- right: 10,
- },
- dataset: {
- source: rawData.map((item, idx) => {
- // 添加索引保证x轴刻度不重复
- let param: any[] = [...item];
- param[0] = `${idx}@${param[0]}`;
- return param;
- }),
- },
- xAxis: {
- type: 'category',
- axisLabel: {
- interval: 0,
- rotate: getAngleByDataLength(rawData.length),
- formatter: (name: string) => {
- const index = name.indexOf('@');
- const displayName = index > -1 ? name.slice(index + 1) : name; // 创建新变量
- return displayName.length > 16 ? `${displayName.slice(0, 14)}...` : displayName;
- },
- },
- },
- yAxis: {
- type: 'value',
- scale: true,
- },
- tooltip: {
- trigger: 'axis',
- formatter: function (params: any) {
- const index = params[0].name.indexOf('@');
- const safeName = params[0].name.replace(//g, '>');
- let res = `${index > -1 ? safeName.slice(index + 1) : safeName} `;
- for (const item of params) {
- if (typeof item.value[item.encode.y[0]] === 'number') {
- res += `
-
- ${item.seriesName}: ${item.value[item.encode.y[0]]} `;
- }
- }
- return res;
- },
- },
- series: [
- {
- type: 'line',
- color: '#3366cc',
- symbolSize: 0,
- step: 'middle',
- areaStyle: {
- color: '#c1d1ef',
- opacity: 1,
- },
- },
- {
- type: 'line',
- color: '#dc3912',
- symbolSize: 0,
- step: 'middle',
- areaStyle: {
- color: '#f4c3b7',
- opacity: 1,
- },
- },
- ],
- };
-
- if (options) {
- chart.setOption(options, true);
- }
- return () => {
- chart.dispose();
- };
- }, [rawData, resizeEventDependency]);
-
- return (
-
- );
-};
-
-export interface IProps {
- run: string;
- worker: string;
- span: string;
- expRun: string;
- expWorker: string;
- expSpan: string;
-}
-
-export interface ColumnUnderlyingData {
- name: string;
- path: string;
- leftAggs: any[];
- rightAggs: any[];
-}
-
-export interface TableRow {
- key: number;
-
- operator: string;
- baselineCalls?: number;
- expCalls?: number;
- deltaCalls?: number;
- deltaCallsPercentNumber?: number;
- deltaCallsPercent?: string;
-
- baselineHostDuration: number;
- expHostDuration: number;
- deltaHostDuration: number;
- deltaHostDurationPercentNumber: number;
- deltaHostDurationPercent: string;
-
- baselineSelfHostDuration: number;
- expSelfHostDuration: number;
- deltaSelfHostDuration: number;
- deltaSelfHostDurationPercentNumber: number;
- deltaSelfHostDurationPercent: string;
-
- baselineDeviceDuration: number;
- expDeviceDuration: number;
- deltaDeviceDuration: number;
- deltaDeviceDurationPercentNumber: number;
- deltaDeviceDurationPercent: string;
-
- baselineSelfDeviceDuration: number;
- expSelfDeviceDuration: number;
- deltaSelfDeviceDuration: number;
- deltaSelfDeviceDurationPercentNumber: number;
- deltaSelfDeviceDurationPercent: string;
-}
-
-let columnChartDataStack: any[][] = [];
-let stepChartDataStack: any[][] = [];
-let columnUnderlyingDataStack: ColumnUnderlyingData[][] = [];
-let columnTableDataSourceStack: TableRow[][] = [];
-
-export const DiffOverview: React.FC = (props: IProps) => {
- // #region - Constant
- const COMPOSITE_NODES_NAME = 'CompositeNodes';
-
- const hostDurationColumns = [
- {
- title: 'Baseline Host Duration (us)',
- dataIndex: 'baselineHostDuration',
- key: 'baselineHostDuration',
- sorter: (a: TableRow, b: TableRow): number => {
- const aBaselineHost = a.baselineHostDuration ?? 0;
- const bBaselineHost = b.baselineHostDuration ?? 0;
- return aBaselineHost - bBaselineHost;
- },
- },
- {
- title: 'Exp Host Duration (us)',
- dataIndex: 'expHostDuration',
- key: 'expHostDuration',
- sorter: (a: TableRow, b: TableRow): number => {
- const aExpHost = a.expHostDuration ?? 0;
- const bExpHost = b.expHostDuration ?? 0;
- return aExpHost - bExpHost;
- },
- },
- {
- title: 'Delta Host Duration (us)',
- dataIndex: 'deltaHostDuration',
- key: 'deltaHostDuration',
- sorter: (a: TableRow, b: TableRow): number => {
- const aDeltaHost = a.deltaHostDuration ?? 0;
- const bDeltaHost = b.deltaHostDuration ?? 0;
- return aDeltaHost - bDeltaHost;
- },
- },
- {
- title: 'Delta Host Duration%',
- dataIndex: 'deltaHostDurationPercent',
- key: 'deltaHostDurationPercent',
- sorter: (a: TableRow, b: TableRow): number => {
- const aPercent = a.deltaHostDurationPercentNumber ?? 0;
- const bPercent = b.deltaHostDurationPercentNumber ?? 0;
- return aPercent - bPercent;
- },
- },
- ];
-
- const selfHostDurationColumns = [
- {
- title: 'Baseline Self Host Duration (us)',
- dataIndex: 'baselineSelfHostDuration',
- key: 'baselineSelfHostDuration',
- sorter: (a: TableRow, b: TableRow): number => a.baselineSelfHostDuration - b.baselineSelfHostDuration,
- },
- {
- title: 'Exp Self Host Duration (us)',
- dataIndex: 'expSelfHostDuration',
- key: 'expSelfHostDuration',
- sorter: (a: TableRow, b: TableRow): number => a.expSelfHostDuration - b.expSelfHostDuration,
- },
- {
- title: 'Delta Self Host Duration (us)',
- dataIndex: 'deltaSelfHostDuration',
- key: 'deltaSelfHostDuration',
- sorter: (a: TableRow, b: TableRow): number => {
- const aDeltaSelfHost = a.deltaSelfHostDuration ?? 0;
- const bDeltaSelfHost = b.deltaSelfHostDuration ?? 0;
- return aDeltaSelfHost - bDeltaSelfHost;
- },
- },
- {
- title: 'Delta Self Host Duration%',
- dataIndex: 'deltaSelfHostDurationPercent',
- key: 'deltaSelfHostDurationPercent',
- sorter: (a: TableRow, b: TableRow): number => {
- const aSelfPercent = a.deltaSelfHostDurationPercentNumber ?? 0;
- const bSelfPercent = b.deltaSelfHostDurationPercentNumber ?? 0;
- return aSelfPercent - bSelfPercent;
- },
- },
- ];
-
- const deviceDurationColumns = [
- {
- title: 'Baseline Device Duration (us)',
- dataIndex: 'baselineDeviceDuration',
- key: 'baselineDeviceDuration',
- sorter: (a: TableRow, b: TableRow): number => a.baselineDeviceDuration - b.baselineDeviceDuration,
- },
- {
- title: 'Exp Device Duration (us)',
- dataIndex: 'expDeviceDuration',
- key: 'expDeviceDuration',
- sorter: (a: TableRow, b: TableRow): number => a.expDeviceDuration - b.expDeviceDuration,
- },
- {
- title: 'Delta Device Duration (us)',
- dataIndex: 'deltaDeviceDuration',
- key: 'deltaDeviceDuration',
- sorter: (a: TableRow, b: TableRow): number => {
- const aDeltaDeviceDuration = a.deltaDeviceDuration ?? 0;
- const bdeltaDeviceDuration = b.deltaDeviceDuration ?? 0;
- return aDeltaDeviceDuration - bdeltaDeviceDuration;
- },
- },
- {
- title: 'Delta Device Duration%',
- dataIndex: 'deltaDeviceDurationPercent',
- key: 'deltaDeviceDurationPercent',
- sorter: (a: TableRow, b: TableRow): number => {
- const aDeltaDeviceDurationPercentNumber = a.deltaDeviceDurationPercentNumber ?? 0;
- const bDeltaDeviceDurationPercentNumber = b.deltaDeviceDurationPercentNumber ?? 0;
- return aDeltaDeviceDurationPercentNumber - bDeltaDeviceDurationPercentNumber;
- },
- },
- ];
-
- const selfDeviceDurationColumns = [
- {
- title: 'Baseline Self Device Duration (us)',
- dataIndex: 'baselineSelfDeviceDuration',
- key: 'baselineSelfDeviceDuration',
- sorter: (a: TableRow, b: TableRow): number => a.baselineSelfDeviceDuration - b.baselineSelfDeviceDuration,
- },
- {
- title: 'Exp Self Device Duration (us)',
- dataIndex: 'expSelfDeviceDuration',
- key: 'expSelfDeviceDuration',
- sorter: (a: TableRow, b: TableRow): number => a.expSelfDeviceDuration - b.expSelfDeviceDuration,
- },
- {
- title: 'Delta Self Device Duration (us)',
- dataIndex: 'deltaSelfDeviceDuration',
- key: 'deltaSelfDeviceDuration',
- sorter: (a: TableRow, b: TableRow): number => {
- const aDeltaSelfDeviceDuration = a.deltaSelfDeviceDuration ?? 0;
- const bDeltaSelfDeviceDuration = b.deltaSelfDeviceDuration ?? 0;
- return aDeltaSelfDeviceDuration - bDeltaSelfDeviceDuration;
- },
- },
- {
- title: 'Delta Self Device Duration%',
- dataIndex: 'deltaSelfDeviceDurationPercent',
- key: 'deltaSelfDeviceDurationPercent',
- sorter: (a: TableRow, b: TableRow): number => {
- const aDeltaSelfDeviceDurationPercentNumber = a.deltaSelfDeviceDurationPercentNumber ?? 0;
- const bDeltaSelfDeviceDurationPercentNumber = b.deltaSelfDeviceDurationPercentNumber ?? 0;
- return aDeltaSelfDeviceDurationPercentNumber - bDeltaSelfDeviceDurationPercentNumber;
- },
- },
- ];
-
- interface IColumnMap {
- [key: string]: any;
- }
- type IColumnMapType = IColumnMap;
-
- const tableSourceColumnMap: IColumnMapType = {
- selfHostDuration: selfHostDurationColumns,
- hostDuration: hostDurationColumns,
- deviceDuration: deviceDurationColumns,
- selfDeviceDuration: selfDeviceDurationColumns,
- };
-
- const baseTableColumns = [
- {
- title: 'Operator',
- dataIndex: 'operator',
- key: 'operator',
- sorter: (a: TableRow, b: TableRow) => a.operator.localeCompare(b.operator),
- },
- {
- title: 'Baseline Calls',
- dataIndex: 'baselineCalls',
- key: 'baselineCalls',
- sorter: (a: TableRow, b: TableRow) => a.baselineCalls ?? 0 - (b.baselineCalls ?? 0),
- },
- {
- title: 'Exp Calls',
- dataIndex: 'expCalls',
- key: 'expCalls',
- sorter: (a: TableRow, b: TableRow) => a.expCalls ?? 0 - (b.expCalls ?? 0),
- },
- {
- title: 'Delta Calls',
- dataIndex: 'deltaCalls',
- key: 'deltaCalls',
- sorter: (a: TableRow, b: TableRow) => a.deltaCalls ?? 0 - (b.deltaCalls ?? 0),
- },
- {
- title: 'Delta Calls%',
- dataIndex: 'deltaCallsPercent',
- key: 'deltaCallsPercent',
- sorter: (a: TableRow, b: TableRow) => a.deltaCallsPercentNumber ?? 0 - (b.deltaCallsPercentNumber ?? 0),
- },
- ];
-
- // #endregion
-
- // #region - State
- const [tableDataSource, setTableDataSource] = React.useState([]);
- const { run, worker, span, expRun, expWorker, expSpan } = props;
-
- const [columnUnderlyingData, setColumnUnderlyingData] = React.useState([]);
-
- const [rootUnderlyingData, setRootUnderlyingData] = React.useState();
-
- const [columnChartData, setColumnChartData] = React.useState([]);
- const [stepChartData, setStepChartData] = React.useState([]);
-
- const [selectedTableColumnsOptions, setSelectedTableColumnsOptions] = React.useState<[key: string]>(['hostDuration']);
- const [selectedTableColumns, setSelectedTableColumns] = React.useState([
- ...baseTableColumns,
- ...hostDurationColumns,
- ]);
-
- const [dataStackLevel, setDataStackLevel] = React.useState(0);
- const [loading, setLoading] = React.useState(false);
-
- // #endregion
- const classes = useStyles();
-
- // #region - Event Handler
- const handleChartColumnSelect = (row: number, column: number): void => {
- if (columnUnderlyingData.length === 0) {
- return;
- }
-
- let selectedUnderlyingData = columnUnderlyingData[row];
- if (!selectedUnderlyingData) {
- return;
- }
-
- let tableDataSource1 = generateDataSourceFromUnderlyingData(selectedUnderlyingData);
- setTableDataSource(tableDataSource1);
- columnTableDataSourceStack.push(tableDataSource1);
-
- setLoading(true);
-
- api.defaultApi
- .diffnodeGet(run, worker, span, expRun, expWorker, expSpan, selectedUnderlyingData.path)
- .then((resp) => handleDiffNodeResp(resp))
- .finally(() => setLoading(false));
- };
-
- const handleGoBack = (): void => {
- if (columnChartDataStack.length > 1) {
- columnChartDataStack.pop();
- let top = columnChartDataStack[columnChartDataStack.length - 1];
- setColumnChartData(top);
- }
-
- if (stepChartDataStack.length > 1) {
- stepChartDataStack.pop();
- let top = stepChartDataStack[stepChartDataStack.length - 1];
- setStepChartData(top);
- }
-
- if (columnUnderlyingDataStack.length > 0) {
- columnUnderlyingDataStack.pop();
- let top = columnUnderlyingDataStack[columnUnderlyingDataStack.length - 1];
- setColumnUnderlyingData(top);
- }
-
- if (columnTableDataSourceStack.length > 0) {
- columnTableDataSourceStack.pop();
- let top = columnTableDataSourceStack[columnTableDataSourceStack.length - 1];
-
- if (top) {
- setTableDataSource(top);
- } else {
- let tableDataSource2 = generateDataSourceFromUnderlyingData(rootUnderlyingData);
- setTableDataSource(tableDataSource2);
- }
- }
-
- setDataStackLevel(dataStackLevel - 1);
- };
-
- const toPercentString = (percentNumber: number): string => {
- if (isNaN(percentNumber)) {
- return 'N/A';
- }
-
- return `${percentNumber.toFixed(2)}%`;
- };
-
- const handleColumnSelectionChange = (value: [key: string]): void => {
- let columns = value.map((x) => tableSourceColumnMap[x]).flat();
- let r = [...baseTableColumns, ...columns];
- setSelectedTableColumnsOptions(value);
- setSelectedTableColumns(r);
- };
-
- const generateDataSourceFromUnderlyingData = (selectedUnderlyingData?: ColumnUnderlyingData): TableRow[] => {
- if (!selectedUnderlyingData) {
- return [];
- }
- let newTableDataSource: TableRow[] = [];
-
- for (let i = 0; i < selectedUnderlyingData.leftAggs.length; i++) {
- let left = selectedUnderlyingData.leftAggs[i];
- let right = selectedUnderlyingData.rightAggs[i];
-
- let deltaCallsPercentNumber = ((right.calls - left.calls) / left.calls) * 100;
-
- let deltaHostDurationPercentNumber = ((right.host_duration - left.host_duration) / left.host_duration) * 100;
-
- let deltaSelfHostDurationPercentNumber =
- ((right.self_host_duration - left.self_host_duration) / left.self_host_duration) * 100;
-
- let deltaDeviceDurationPercentNumber =
- ((right.device_duration - left.device_duration) / left.device_duration) * 100;
-
- let deltaSelfDeviceDurationPercentNumber =
- ((right.self_device_duration - left.self_device_duration) / left.self_device_duration) * 100;
-
- newTableDataSource.push({
- key: i,
- operator: left.name,
- baselineCalls: left.calls,
- expCalls: right.calls,
- deltaCalls: right.calls - left.calls,
- deltaCallsPercentNumber: deltaCallsPercentNumber,
- deltaCallsPercent: toPercentString(deltaCallsPercentNumber),
-
- baselineHostDuration: left.host_duration,
- expHostDuration: right.host_duration,
- deltaHostDuration: parseFloat((right.host_duration - left.host_duration).toFixed(3)),
- deltaHostDurationPercentNumber: deltaHostDurationPercentNumber,
- deltaHostDurationPercent: toPercentString(deltaHostDurationPercentNumber),
-
- baselineSelfHostDuration: left.self_host_duration,
- expSelfHostDuration: right.self_host_duration,
- deltaSelfHostDuration: parseFloat((right.self_host_duration - left.self_host_duration).toFixed(3)),
- deltaSelfHostDurationPercentNumber: deltaSelfHostDurationPercentNumber,
- deltaSelfHostDurationPercent: toPercentString(deltaSelfHostDurationPercentNumber),
-
- baselineDeviceDuration: left.device_duration,
- expDeviceDuration: right.device_duration,
- deltaDeviceDuration: parseFloat((right.device_duration - left.device_duration).toFixed(3)),
- deltaDeviceDurationPercentNumber: deltaDeviceDurationPercentNumber,
- deltaDeviceDurationPercent: toPercentString(deltaDeviceDurationPercentNumber),
-
- baselineSelfDeviceDuration: left.self_device_duration,
- expSelfDeviceDuration: right.self_device_duration,
- deltaSelfDeviceDuration: parseFloat((right.self_device_duration - left.self_device_duration).toFixed(3)),
- deltaSelfDeviceDurationPercentNumber: deltaSelfDeviceDurationPercentNumber,
- deltaSelfDeviceDurationPercent: toPercentString(deltaSelfDeviceDurationPercentNumber),
- });
- }
-
- return newTableDataSource;
- };
-
- React.useEffect(() => {
- const hasData =
- run.length > 0 &&
- worker.length > 0 &&
- span.length > 0 &&
- expRun.length > 0 &&
- expWorker.length > 0 &&
- expSpan.length > 0;
- if (hasData) {
- setLoading(true);
-
- columnChartDataStack = [];
- stepChartDataStack = [];
- columnUnderlyingDataStack = [];
- columnTableDataSourceStack = [];
-
- api.defaultApi
- .diffnodeGet(run, worker, span, expRun, expWorker, expSpan)
- .then((resp) => {
- handleDiffNodeResp(resp);
- let newRootUnderlyingData = {
- name: 'rootNode',
- path: resp.path,
- leftAggs: resp.left.aggs,
- rightAggs: resp.right.aggs,
- };
-
- setRootUnderlyingData(newRootUnderlyingData);
- let tableDataSource3 = generateDataSourceFromUnderlyingData(newRootUnderlyingData);
- setTableDataSource(tableDataSource3);
- })
- .finally(() => setLoading(false));
-
- setSelectedTableColumns([...baseTableColumns, ...hostDurationColumns]);
- }
- }, [run, worker, span, expRun, expWorker, expSpan]);
-
- const handleDiffNodeResp = (resp: any): void => {
- let newColumnChartData: any[] = [];
- let newStepChartData: any[] = [];
- let underlyingData: ColumnUnderlyingData[] = [];
-
- newColumnChartData.push(['Call', 'Baseline', 'Experiment', 'Baseline Trend', 'Exp Trend']);
- newStepChartData.push(['Call', 'Diff', 'Accumulated Diff']);
-
- if (resp.children.length > 0) {
- let accumulatedLeftDuration = 0;
- let accumulatedRightDuration = 0;
- let accumulatedStepDiff = 0;
- for (let i = 0; i < resp.children.length; i++) {
- let left = resp.children[i].left;
- let right = resp.children[i].right;
- let currColumn: any[] = [];
- let currStep: any[] = [];
-
- let name = left.name;
- if (name === COMPOSITE_NODES_NAME) {
- continue;
- }
-
- if (name.startsWith('aten::')) {
- // Ignore aten operators
- continue;
- }
-
- if (name.startsWith('enumerate(DataLoader)')) {
- name = name.substring(21);
- }
-
- if (name.startsWith('enumerate(DataPipe)')) {
- name = name.substring(19);
- }
-
- if (name.startsWith('nn.Module: ')) {
- name = name.substring(11);
- }
-
- if (name.startsWith('Optimizer.zero_grad')) {
- name = 'Optimizer.zero_grad';
- }
-
- if (name.startsWith('Optimizer.step')) {
- name = 'Optimizer.step';
- }
-
- currColumn.push(name);
- currColumn.push(left.total_duration);
- currColumn.push(right.total_duration);
-
- accumulatedLeftDuration += left.total_duration;
- currColumn.push(accumulatedLeftDuration);
-
- accumulatedRightDuration += right.total_duration;
- currColumn.push(accumulatedRightDuration);
- newColumnChartData.push(currColumn);
-
- underlyingData.push({
- name: name,
- path: resp.children[i].path,
- leftAggs: left.aggs,
- rightAggs: right.aggs,
- });
-
- currStep.push(name);
- let stepDiff = right.total_duration - left.total_duration;
- currStep.push(stepDiff);
-
- accumulatedStepDiff += stepDiff;
- currStep.push(accumulatedStepDiff);
-
- newStepChartData.push(currStep);
- }
- } else {
- let left = resp.left;
- let right = resp.right;
- let currColumn: any[] = [];
- let currStep: any[] = [];
- let name = left.name;
-
- if (name.startsWith('nn.Module: ')) {
- name = name.substring(11);
- }
-
- currColumn.push(name);
- currColumn.push(left.total_duration);
- currColumn.push(right.total_duration);
- currColumn.push(left.total_duration);
- currColumn.push(right.total_duration);
-
- newColumnChartData.push(currColumn);
-
- currStep.push(name);
- let stepDiff = right.total_duration - left.total_duration;
- currStep.push(stepDiff);
- currStep.push(stepDiff);
- newStepChartData.push(currStep);
- }
-
- setColumnChartData(newColumnChartData);
- columnChartDataStack.push(newColumnChartData);
-
- setStepChartData(newStepChartData);
- stepChartDataStack.push(newStepChartData);
-
- setColumnUnderlyingData(underlyingData);
- columnUnderlyingDataStack.push(underlyingData);
-
- setDataStackLevel(columnChartDataStack.length);
- }; // #endregion
-
- if (!loading && columnUnderlyingDataStack.length === 0) {
- return (
-
-
-
- There is no run selected for diff.
-
-
- );
- }
-
- if (loading) {
- return ;
- }
-
- return (
-
-
-
-
-
-
-
- }
- onClick={handleGoBack}
- variant='outlined'
- disabled={dataStackLevel < 2}
- >
- Go Back
-
- {columnChartData.length > 1 && (
- <>
-
-
- >
- )}
- {columnChartData.length === 1 && No more level to show. }
-
-
-
-
-
-
-
-
-
-
-
- Host Duration
-
-
- Self Host Duration
-
-
- Device Duration
-
-
- Self Device Duration
-
-
-
-
-
-
-
-
-
-
- );
-};
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/DistributedView.tsx b/plugins/tensorboard-plugins/tb_plugin/fe/src/components/DistributedView.tsx
deleted file mode 100644
index 096501b61bc9ce41978c65dc24f6b3640ab960f3..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/DistributedView.tsx
+++ /dev/null
@@ -1,313 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-import Card from '@material-ui/core/Card';
-import CardContent from '@material-ui/core/CardContent';
-import CardHeader from '@material-ui/core/CardHeader';
-import Grid from '@material-ui/core/Grid';
-import InputLabel from '@material-ui/core/InputLabel';
-import MenuItem from '@material-ui/core/MenuItem';
-import Select, { SelectProps } from '@material-ui/core/Select';
-import { makeStyles } from '@material-ui/core/styles';
-import { Table } from 'antd';
-import { ColumnsType } from 'antd/es/table';
-import * as React from 'react';
-import * as api from '../api';
-import { DistributedGraph, GpuInfo, Graph } from '../api';
-import { firstOrUndefined } from '../utils';
-import { ColumnChart } from './charts/ColumnChart';
-import { DataLoading } from './DataLoading';
-import { GpuInfoTable } from './GpuInfoTable';
-import { makeChartHeaderRenderer, useTooltipCommonStyles } from './helpers';
-import {
- distributedCommopsTableTooltip,
- distributedGpuInfoTableTooltip,
- distributedOverlapGraphTooltip,
- distributedWaittimeGraphTooltip,
-} from './TooltipDescriptions';
-
-export interface IProps {
- run: string;
- worker: string;
- span: string;
-}
-
-const useStyles = makeStyles((theme) => ({
- root: {
- flexGrow: 1,
- },
- verticalInput: {
- display: 'flex',
- alignItems: 'center',
- },
- inputWidth: {
- width: '4em',
- },
- inputWidthOverflow: {
- minWidth: '15em',
- whiteSpace: 'nowrap',
- },
- description: {
- marginLeft: theme.spacing(1),
- },
- table: {
- height: '100%',
- border: '1px solid #efefef',
- '& .ant-table-tbody > tr': {
- height: 20,
- fontSize: '10pt',
- '& > td': {
- padding: '0 8px!important',
- },
- },
- },
-}));
-
-export const DistributedView: React.FC = (props) => {
- const tooltipCommonClasses = useTooltipCommonStyles();
- const chartHeaderRenderer = React.useMemo(
- () => makeChartHeaderRenderer(tooltipCommonClasses),
- [tooltipCommonClasses]
- );
-
- let { run, worker, span } = props;
- const classes = useStyles();
-
- const [overlapGraph, setOverlapGraph] = React.useState(undefined);
- const [waittimeGraph, setWaittimeGraph] = React.useState(undefined);
- const [commopsTableData, setCommopsTableData] = React.useState(undefined);
- const [gpuInfo, setGpuInfo] = React.useState(undefined);
- const [commopsTableTitle, setCommopsTableTitle] = React.useState('');
- const [commopsWorkers, setCommopsWorkers] = React.useState([]);
- const [overlapSteps, setOverlapSteps] = React.useState([]);
- const [waittimeSteps, setWaittimeSteps] = React.useState([]);
- const [overlapStep, setOverlapStep] = React.useState('');
- const [waittimeStep, setWaittimeStep] = React.useState('');
- const [commopsWorker, setCommopsWorker] = React.useState('');
- const [columns, setColumns] = React.useState>([]);
- const [pageSize, setPageSize] = React.useState(30);
-
- React.useEffect(() => {
- if (waittimeSteps.includes('all')) {
- setWaittimeStep('all');
- } else {
- setWaittimeStep(firstOrUndefined(waittimeSteps) ?? '');
- }
- }, [waittimeSteps]);
-
- React.useEffect(() => {
- if (overlapSteps.includes('all')) {
- setOverlapStep('all');
- } else {
- setOverlapStep(firstOrUndefined(overlapSteps) ?? '');
- }
- }, [overlapSteps]);
-
- React.useEffect(() => {
- setCommopsWorker(firstOrUndefined(commopsWorkers) ?? '');
- }, [commopsWorkers]);
-
- React.useEffect(() => {
- api.defaultApi.distributedOverlapGet(run, 'All', span).then((resp) => {
- setOverlapGraph(resp);
- setOverlapSteps(Object.keys(resp.data));
- });
- api.defaultApi.distributedWaittimeGet(run, 'All', span).then((resp) => {
- setWaittimeGraph(resp);
- setWaittimeSteps(Object.keys(resp.data));
- });
- api.defaultApi.distributedCommopsGet(run, 'All', span).then((resp) => {
- setCommopsTableData(resp.data);
- setCommopsWorkers(Object.keys(resp.data));
- setCommopsTableTitle(resp.metadata.title);
- });
- api.defaultApi.distributedGpuinfoGet(run, 'All', span).then((resp) => {
- setGpuInfo(resp);
- });
- }, [run, worker, span]);
-
- const onCommopsWorkerChanged: SelectProps['onChange'] = (event) => {
- setCommopsWorker(event.target.value as string);
- };
-
- const onOverlapStepChanged: SelectProps['onChange'] = (event) => {
- setOverlapStep(event.target.value as string);
- };
-
- const onWaittimeStepChanged: SelectProps['onChange'] = (event) => {
- setWaittimeStep(event.target.value as string);
- };
-
- const getColumnChartData = (distributedGraph?: DistributedGraph, step?: string): any => {
- if (!distributedGraph || !step) {
- return undefined;
- }
- const barLabels = Object.keys(distributedGraph.data[step]);
- return {
- legends: distributedGraph.metadata.legends,
- barLabels,
- barHeights: barLabels.map((label) => distributedGraph.data[step][label]),
- };
- };
- const overlapData = React.useMemo(() => getColumnChartData(overlapGraph, overlapStep), [overlapGraph, overlapStep]);
- const waittimeData = React.useMemo(
- () => getColumnChartData(waittimeGraph, waittimeStep),
- [waittimeGraph, waittimeStep]
- );
-
- const getTableData = (tableData?: any, opsWorker?: string): any[] => {
- if (!tableData || !opsWorker) {
- return [];
- }
- let dataInfo: api.Graph = tableData[opsWorker];
- const stringCompare = (a: string, b: string): number => a.localeCompare(b);
- const numberCompare = (a: number, b: number): number => a - b;
- let column: any[] = dataInfo.columns.map((item) => {
- return {
- title: item.name,
- key: item.name,
- dataIndex: item.name,
- sorter:
- item.type === 'string'
- ? (a: any, b: any): number => stringCompare(a[item.name], b[item.name])
- : (a: any, b: any): number => numberCompare(a[item.name], b[item.name]),
- };
- });
- setColumns(column);
- return dataInfo.rows.map((row, index) => {
- if (row.length !== dataInfo.columns.length) {
- return null;
- }
- const dataRow: { [column: string]: number | string } = { key: index };
- dataInfo.columns.forEach((item, idx) => {
- dataRow[item.name] = row[idx] as string | number;
- });
- return dataRow;
- });
- };
- const commopsTable: any[] = React.useMemo(() => {
- return getTableData(commopsTableData, commopsWorker);
- }, [commopsTableData, commopsWorker]);
-
- const onShowSizeChange = (current: number, size: number): void => {
- setPageSize(size);
- };
-
- return (
-
-
-
-
-
- {gpuInfo && (
-
-
-
-
-
-
-
-
- )}
-
-
- {(chartData): JSX.Element => (
-
-
-
-
- Step
-
-
-
- {overlapSteps.map((step) => (
- {step}
- ))}
-
-
-
-
- {overlapGraph?.metadata?.title && (
-
- )}
-
-
- )}
-
-
-
-
- {(chartData): JSX.Element => (
-
-
-
-
- Step
-
-
-
- {waittimeSteps.map((step) => (
- {step}
- ))}
-
-
-
-
- {waittimeGraph?.metadata?.title && (
-
- )}
-
-
- )}
-
-
-
-
-
-
-
-
-
- Worker
-
-
-
- {commopsWorkers.map((item) => (
- {item}
- ))}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- );
-};
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/FullCircularProgress.tsx b/plugins/tensorboard-plugins/tb_plugin/fe/src/components/FullCircularProgress.tsx
deleted file mode 100644
index 3f4c0fbaf15a15d402aa205574a28df045d24aec..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/FullCircularProgress.tsx
+++ /dev/null
@@ -1,23 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-import CircularProgress from '@material-ui/core/CircularProgress';
-import { makeStyles } from '@material-ui/core/styles';
-import * as React from 'react';
-
-const useStyles = makeStyles(() => ({
- root: {
- width: '100%',
- display: 'flex',
- justifyContent: 'center',
- },
-}));
-
-export const FullCircularProgress: React.FC = () => {
- const classes = useStyles();
- return (
-
-
-
- );
-};
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/GpuInfoTable.tsx b/plugins/tensorboard-plugins/tb_plugin/fe/src/components/GpuInfoTable.tsx
deleted file mode 100644
index 07f6f1d78c88abab5f62f844356b47ca517a2561..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/GpuInfoTable.tsx
+++ /dev/null
@@ -1,130 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-import { makeStyles } from '@material-ui/core/styles';
-import * as React from 'react';
-
-export interface IProps {
- gpuInfo: any;
-}
-
-const useStyles = makeStyles((theme) => ({
- root: {
- border: '1px solid #E0E0E0',
- borderCollapse: 'collapse',
- width: '100%',
- },
- td: {
- borderTop: '1px solid #E0E0E0',
- borderBottom: '1px solid #E0E0E0',
- borderCollapse: 'collapse',
- paddingLeft: 10,
- paddingRight: 10,
- },
- nodeTd: {
- fontWeight: 'bold',
- },
- pidTd: {
- fontWeight: 'normal',
- },
- gpuTd: {
- fontWeight: 'normal',
- },
- keyTd: {
- fontWeight: 'normal',
- textAlign: 'right',
- },
- valueTd: {
- fontWeight: 'bold',
- },
-}));
-
-interface TableCellInfo {
- content: string;
- rowspan: number;
- cellType: 'node' | 'pid' | 'gpu' | 'key' | 'value';
- last?: boolean;
-}
-
-function makeTableCellInfo(gpuInfo: any): TableCellInfo[][] {
- const rows: TableCellInfo[][] = [];
- let currRow: TableCellInfo[] = [];
- rows.push(currRow);
- Object.keys(gpuInfo.data).forEach((nodeName) => {
- const nodeCell = {
- content: nodeName,
- rowspan: 0,
- cellType: 'node' as const,
- };
- const i = rows.length;
- currRow.push(nodeCell);
- Object.keys(gpuInfo.data[nodeName]).forEach((pid) => {
- const pidCell = { content: pid, rowspan: 0, cellType: 'pid' as const };
- const j = rows.length;
- currRow.push(pidCell);
- Object.keys(gpuInfo.data[nodeName][pid]).forEach((gpu) => {
- const gpuCell = { content: gpu, rowspan: 0, cellType: 'gpu' as const };
- const k = rows.length;
- currRow.push(gpuCell);
- Object.keys(gpuInfo.data[nodeName][pid][gpu]).forEach((keyName) => {
- currRow.push({
- content: keyName,
- rowspan: 1,
- cellType: 'key' as const,
- });
- const value: string = gpuInfo.data[nodeName][pid][gpu][keyName];
- currRow.push({
- content: value,
- rowspan: 1,
- cellType: 'value' as const,
- });
- currRow = [];
- rows.push(currRow);
- });
- gpuCell.rowspan = rows.length - k;
- });
- pidCell.rowspan = rows.length - j;
- });
- nodeCell.rowspan = rows.length - i;
- });
- rows.pop();
- return rows;
-}
-
-export const GpuInfoTable: React.FC = (props) => {
- const classes = useStyles();
- interface TableCellInfoNoLast {
- content: string;
- rowspan: number;
- cellType: 'node' | 'pid' | 'gpu' | 'key' | 'value';
- }
-
- const rows = React.useMemo(() => makeTableCellInfo(props.gpuInfo), [props.gpuInfo]);
-
- const cellToClass = {
- node: classes.nodeTd,
- pid: classes.pidTd,
- gpu: classes.gpuTd,
- key: classes.keyTd,
- value: classes.valueTd,
- };
-
- const renderCell = function (info: TableCellInfoNoLast): JSX.Element {
- let cellClass = cellToClass[info.cellType];
- let content = info.cellType === 'key' ? `${info.content}:` : info.content;
- return (
-
- {content}
-
- );
- };
-
- return (
-
- {rows.map((row) => (
- {row.map(renderCell)}
- ))}
-
- );
-};
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/Kernel.tsx b/plugins/tensorboard-plugins/tb_plugin/fe/src/components/Kernel.tsx
deleted file mode 100644
index 66e05695153a853f68d382a2f3b6a68931861abf..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/Kernel.tsx
+++ /dev/null
@@ -1,301 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------
- * Copyright (c) 2023, Huawei Technologies.
- * All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Modifications: Add visualization of PyTorch Ascend profiling.
- *--------------------------------------------------------------------------------------------*/
-
-import Card from '@material-ui/core/Card';
-import CardContent from '@material-ui/core/CardContent';
-import CardHeader from '@material-ui/core/CardHeader';
-import FormControlLabel from '@material-ui/core/FormControlLabel';
-import Grid from '@material-ui/core/Grid';
-import InputLabel from '@material-ui/core/InputLabel';
-import MenuItem from '@material-ui/core/MenuItem';
-import Radio from '@material-ui/core/Radio';
-import RadioGroup, { RadioGroupProps } from '@material-ui/core/RadioGroup';
-import Select, { SelectProps } from '@material-ui/core/Select';
-import { makeStyles } from '@material-ui/core/styles';
-import TextField, { StandardTextFieldProps, TextFieldProps } from '@material-ui/core/TextField';
-import * as React from 'react';
-import * as api from '../api';
-import { Graph } from '../api';
-import { KernelGroupBy } from '../constants/groupBy';
-import { useSearch } from '../utils/search';
-import { topIsValid, UseTop, useTopN } from '../utils/top';
-import { AntTableChart } from './charts/AntTableChart';
-import { PieChart } from './charts/PieChart';
-import { DataLoading } from './DataLoading';
-import { makeChartHeaderRenderer, useTooltipCommonStyles } from './helpers';
-import {
- gpuKernelTotalTimeTooltip,
- tensorCoresPieChartTooltip,
- tensorCoresPieChartTooltipAscend,
-} from './TooltipDescriptions';
-
-export interface IProps {
- run: string;
- worker: string;
- span: string;
- deviceTarget: string;
-}
-
-const useStyles = makeStyles((theme) => ({
- root: {
- flexGrow: 1,
- },
- verticalInput: {
- display: 'flex',
- alignItems: 'center',
- },
- inputWidth: {
- width: '4em',
- },
- inputWidthOverflow: {
- minWidth: '15em',
- whiteSpace: 'nowrap',
- },
- description: {
- marginLeft: theme.spacing(1),
- },
-}));
-
-export const Kernel: React.FC = (props) => {
- const { run, worker, span, deviceTarget } = props;
- const classes = useStyles();
- const tooltipCommonClasses = useTooltipCommonStyles();
- const chartHeaderRenderer = React.useMemo(
- () => makeChartHeaderRenderer(tooltipCommonClasses),
- [tooltipCommonClasses]
- );
-
- const [kernelGraph, setKernelGraph] = React.useState(undefined);
- const [tcGraph, setTcGraph] = React.useState(undefined);
- const [kernelTable, setKernelTable] = React.useState(undefined);
- const [groupBy, setGroupBy] = React.useState(KernelGroupBy.KERNEL);
- const [searchKernelName, setSearchKernelName] = React.useState('');
- const [searchOpName, setSearchOpName] = React.useState('');
- const [sortColumn, setSortColumn] = React.useState('');
- const [hasStep, setHasStep] = React.useState(false);
-
- const [topText, actualTop, useTop, setTopText, setUseTop] = useTopN({
- defaultUseTop: UseTop.USE,
- defaultTop: 10,
- });
-
- React.useEffect(() => {
- setSearchOpName('');
- }, [groupBy]);
-
- React.useEffect(() => {
- if (kernelGraph) {
- setTopText(String(Math.min(kernelGraph.rows?.length, 10)));
- }
- }, [kernelGraph]);
-
- React.useEffect(() => {
- api.defaultApi.kernelTableGet(run, worker, span, groupBy).then((resp) => {
- setSortColumn(resp.metadata.sort);
- setKernelTable(resp.data);
- const nameColumnIdx = resp.data.columns.findIndex((c) => c.name.toLowerCase() === 'step id');
- setHasStep(nameColumnIdx > -1);
- });
- }, [run, worker, span, groupBy]);
-
- React.useEffect(() => {
- api.defaultApi.kernelGet(run, worker, span, KernelGroupBy.KERNEL).then((resp) => {
- setKernelGraph(resp.total);
- setGroupBy(resp.device_target === 'Ascend' ? KernelGroupBy.KERNEL_NAME_AND_OP_NAME : KernelGroupBy.KERNEL);
- });
- }, [run, worker, span]);
-
- React.useEffect(() => {
- api.defaultApi.kernelTcPieGet(run, worker, span).then((resp) => {
- setTcGraph(resp.total);
- });
- }, [run, worker, span]);
-
- const [searchedKernelTable] = useSearch(searchKernelName, 'name', kernelTable);
- const [searchedOpTable] = useSearch(
- searchOpName,
- deviceTarget === 'Ascend' ? 'step id' : 'operator',
- searchedKernelTable
- );
-
- const onGroupByChanged: SelectProps['onChange'] = (event) => {
- setGroupBy(event.target.value as KernelGroupBy);
- };
-
- const onSearchKernelChanged: TextFieldProps['onChange'] = (event) => {
- setSearchKernelName(event.target.value as string);
- };
-
- const onSearchOpChanged: TextFieldProps['onChange'] = (event) => {
- setSearchOpName(event.target.value as string);
- };
-
- const onUseTopChanged: RadioGroupProps['onChange'] = (event) => {
- setUseTop(event.target.value as UseTop);
- };
-
- const onTopChanged = (event: React.ChangeEvent): void => {
- setTopText(event.target.value);
- };
-
- const inputProps: StandardTextFieldProps['inputProps'] = {
- min: 1,
- };
-
- const GPUKernelTotalTimeTitle = React.useMemo(
- () => chartHeaderRenderer('Total Time (us)', gpuKernelTotalTimeTooltip),
- [chartHeaderRenderer]
- );
-
- const TensorCoresTitle = React.useMemo(
- () =>
- deviceTarget === 'Ascend'
- ? chartHeaderRenderer('Accelerator Core Utilization', tensorCoresPieChartTooltipAscend)
- : chartHeaderRenderer('Tensor Cores Utilization', tensorCoresPieChartTooltip),
- [chartHeaderRenderer, deviceTarget]
- );
-
- return (
-
-
-
-
-
-
-
-
- } label='All kernels' />
- } label='Top kernels to show' />
-
-
- {useTop === UseTop.USE && (
-
-
-
- )}
-
-
-
- {(graph): JSX.Element => (
-
-
-
-
- )}
-
-
-
-
- {(graph): JSX.Element => (
-
-
-
-
- )}
-
-
-
-
-
-
- Group By
-
-
- {deviceTarget === 'Ascend' ? 'Statistic' : 'Kernel Properties + Op Name'}
-
-
- {deviceTarget === 'Ascend' ? 'All' : 'Kernel Name'}
-
-
-
-
-
-
-
-
- {deviceTarget === 'Ascend'
- ? groupBy === KernelGroupBy.KERNEL &&
- hasStep && (
-
-
-
- )
- : groupBy === KernelGroupBy.KERNEL_NAME_AND_OP_NAME && (
-
-
-
- )}
-
-
-
-
-
- {(graph): JSX.Element => }
-
-
-
-
-
-
-
-
- );
-};
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/MemoryView.tsx b/plugins/tensorboard-plugins/tb_plugin/fe/src/components/MemoryView.tsx
deleted file mode 100644
index 225f28a931e969d7cfd40d3f490e7cb45c64a305..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/MemoryView.tsx
+++ /dev/null
@@ -1,531 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------
- * Copyright (c) 2023, Huawei Technologies.
- * All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Modifications: Add visualization of PyTorch Ascend profiling.
- *--------------------------------------------------------------------------------------------*/
-
-import Card from '@material-ui/core/Card';
-import CardContent from '@material-ui/core/CardContent';
-import CardHeader from '@material-ui/core/CardHeader';
-import Grid from '@material-ui/core/Grid';
-import InputLabel from '@material-ui/core/InputLabel';
-import MenuItem from '@material-ui/core/MenuItem';
-import Select, { SelectProps } from '@material-ui/core/Select';
-import Slider from '@material-ui/core/Slider';
-import { makeStyles } from '@material-ui/core/styles';
-import TextField, { TextFieldProps } from '@material-ui/core/TextField';
-import * as React from 'react';
-import * as api from '../api';
-import {
- Graph,
- GraphAscend,
- MemoryCurveDataAll,
- MemoryCurveData,
- MemoryCurveDataAscend,
- MemoryEventsData,
- MemoryEventsDataAll,
- MemoryStatsData,
-} from '../api';
-import { useSearchDirectly } from '../utils/search';
-import { AntTableChart } from './charts/AntTableChart';
-import { LineChart } from './charts/NewLineChart';
-import { DataLoading } from './DataLoading';
-import { MemoryStatsTable } from './tables/MemoryStatsTable';
-
-const useStyles = makeStyles((theme) => ({
- root: {
- flexGrow: 1,
- },
- curve: {
- marginBottom: 20,
- },
- verticalInput: {
- display: 'flex',
- alignItems: 'center',
- },
- inputWidth: {
- width: '4em',
- },
- inputWidthOverflow: {
- minWidth: '15em',
- whiteSpace: 'nowrap',
- },
- full: {
- width: '100%',
- },
- description: {
- marginLeft: theme.spacing(1),
- },
- filterSlider: {
- marginTop: 15,
- marginRight: 6,
- width: 250,
- },
- filterInput: {
- width: 100,
- },
-}));
-
-export interface IProps {
- run: string;
- worker: string;
- span: string;
- deviceTarget: string;
-}
-
-const tags = ['Operator', 'Component'];
-
-export const MemoryView: React.FC = React.memo((props) => {
- interface EventSizeFilter {
- [deviceName: string]: Array;
- }
-
- interface MaxEventSize {
- [deviceName: string]: number;
- }
-
- const { run, worker, span, deviceTarget } = props;
- const classes = useStyles();
-
- const [memoryStatsData, setMemoryStatsData] = React.useState(undefined);
-
- // for backward compatability, old profile do not have events to show
- const showEvents = (): boolean | undefined => {
- return memoryEventsData && Object.keys(memoryEventsData.rows).length !== 0;
- };
- const [memoryEventsData, setMemoryEventsData] = React.useState(undefined);
-
- // for backward compatability, old profile do not have curve to show
- const showCurve = (): boolean | undefined => {
- return memoryCurveData && Object.keys(memoryCurveData.rows).length !== 0;
- };
- const [memoryCurveData, setMemoryCurveData] = React.useState(
- undefined
- );
-
- const [lineChartData, setLineChartData] = React.useState(undefined);
-
- const [devices, setDevices] = React.useState([]);
- const [device, setDevice] = React.useState('');
- const [tag, setTag] = React.useState('Operator');
- const memoryCurveDataAllRef = React.useRef(undefined);
- const memoryEventDataAllRef = React.useRef(undefined);
-
- interface SelectedRange {
- start: number;
- end: number;
- startTs: number;
- endTs: number;
- }
- const [selectedRange, setSelectedRange] = React.useState();
- const [searchOperatorName, setSearchOperatorName] = React.useState('');
- const [searchEventOperatorName, setSearchEventOperatorName] = React.useState('');
- const [filterEventSize, setFilterEventSize] = React.useState({});
- const [maxSize, setMaxSize] = React.useState({});
-
- const getSearchIndex = function (): number {
- if (!memoryStatsData) {
- return -1;
- }
- for (let i = 0; i < memoryStatsData.columns.length; i++) {
- if (memoryStatsData.columns[i].name === memoryStatsData.metadata.search) {
- return i;
- }
- }
- return -1;
- };
-
- const getStep = (size: number, indexBias: number): number => {
- return 10 ** (Math.floor(Math.log10(size !== 0 ? size : 1)) - indexBias);
- };
-
- const filterByEventSize = (rows: T[] | undefined, size: Array): T[] | undefined => {
- const result = React.useMemo(() => {
- if (!rows) {
- return undefined;
- }
-
- // workaround type system
- const field = (row: any): number => {
- const sizeColIndex = 1;
- return row[sizeColIndex];
- };
-
- return rows.filter((row) => {
- return field(row) >= size[0] && field(row) <= size[1];
- });
- }, [rows, size]);
-
- return result;
- };
-
- const searchIndex = getSearchIndex();
- const getName = React.useCallback((row: any) => row[searchIndex], [searchIndex]);
- const getNameAscend = (row: any): any => row[0];
- const [searchedTableDataRows] = useSearchDirectly(searchOperatorName, getName, memoryStatsData?.rows[device] ?? []);
- const [searchedEventsTableDataRows] = useSearchDirectly(
- searchEventOperatorName,
- deviceTarget === 'Ascend' ? getNameAscend : getName,
- filterByEventSize(memoryEventsData?.rows[device], filterEventSize[device] ?? [0, Infinity]) ?? []
- );
-
- const onSearchOperatorChanged: TextFieldProps['onChange'] = (event) => {
- setSearchOperatorName(event.target.value as string);
- };
-
- const onSearchEventOperatorChanged: TextFieldProps['onChange'] = (event) => {
- setSearchEventOperatorName(event.target.value as string);
- };
-
- const [selectedRecord, setSelectedRecord] = React.useState();
- const onRowSelected = (record?: object, rowIndex?: number): void => {
- setSelectedRecord(record);
- };
-
- const onFilterEventSizeChanged = (event: any, newValue: number | number[]): void => {
- setFilterEventSize({
- ...filterEventSize,
- [device]: newValue as number[],
- });
- };
-
- const onFilterEventMinSizeInputChanged = (event: React.ChangeEvent): void => {
- setFilterEventSize({
- ...filterEventSize,
- [device]: [Number(event.target.value), filterEventSize[device][1]],
- });
- };
-
- const onFilterEventMaxSizeInputChanged = (event: React.ChangeEvent): void => {
- setFilterEventSize({
- ...filterEventSize,
- [device]: [filterEventSize[device][0], Number(event.target.value)],
- });
- };
-
- React.useEffect(() => {
- if (deviceTarget !== 'Ascend') {
- api.defaultApi.memoryGet(run, worker, span, selectedRange?.startTs, selectedRange?.endTs).then((resp) => {
- setMemoryStatsData(resp);
- if (!devices || devices.length === 0) {
- // setDevices only execute on view load. Since selection on curve
- // might filter all events later, some devices might is missing.
- setDevices(Object.keys(resp.rows));
- setDevice(resp.metadata.default_device);
- }
- });
- }
- }, [run, worker, span, selectedRange]);
-
- React.useEffect(() => {
- api.defaultApi.memoryEventsGet(run, worker, span, selectedRange?.startTs, selectedRange?.endTs).then((resp) => {
- const tempRes = deviceTarget === 'Ascend' ? (resp as MemoryEventsDataAll).operator : (resp as MemoryEventsData);
- if (deviceTarget === 'Ascend') {
- memoryEventDataAllRef.current = resp as MemoryEventsDataAll;
- }
- let curMaxSize: MaxEventSize = {};
- let curFilterEventSize: EventSizeFilter = {};
- Object.keys(tempRes.rows).forEach((deviceName) => {
- curMaxSize[deviceName] = 0;
- for (let i = 0; i < tempRes.rows[deviceName].length; i++) {
- curMaxSize[deviceName] = Math.max(curMaxSize[deviceName], tempRes.rows[deviceName][i][1]);
- }
- curFilterEventSize[deviceName] = [curMaxSize[deviceName] / 4, curMaxSize[deviceName]];
- curMaxSize[deviceName] = curMaxSize[deviceName];
- });
- setMaxSize(curMaxSize);
- setFilterEventSize(curFilterEventSize);
- setMemoryEventsData(tempRes);
- });
- }, [run, worker, span, selectedRange]);
-
- React.useEffect(() => {
- api.defaultApi.memoryCurveGet(run, worker, span).then((resp) => {
- // Reset the select range to null whenever run/worker/span changes
- setSelectedRange(undefined);
- if (deviceTarget === 'Ascend') {
- const allCurveData = resp as MemoryCurveDataAll;
- memoryCurveDataAllRef.current = allCurveData;
- setDevice(allCurveData.default_device);
- setDevices(allCurveData.devices);
- setMemoryCurveData(allCurveData.total);
- setTag('Operator');
- } else {
- setMemoryCurveData(resp as MemoryCurveData);
- }
- });
- }, [run, worker, span]);
-
- React.useEffect(() => {
- if (memoryCurveData !== undefined) {
- if (deviceTarget === 'Ascend') {
- setLineChartData({
- title: memoryCurveData.metadata.peaks[device] ?? '',
- columns: memoryCurveData.columns[device] ?? [],
- rows: memoryCurveData.rows[device] ?? {},
- });
- } else {
- setLineChartData({
- title: memoryCurveData.metadata.peaks[device],
- columns: memoryCurveData.columns,
- rows: memoryCurveData.rows[device] ?? [],
- });
- }
- }
- }, [memoryCurveData, device]);
-
- const onDeviceChanged: SelectProps['onChange'] = (event) => {
- setDevice(event.target.value as string);
- setSelectedRange(undefined);
- };
-
- const onTagChanged: SelectProps['onChange'] = (event) => {
- setTag(event.target.value as string);
- if (event.target.value === 'Operator') {
- setMemoryCurveData(memoryCurveDataAllRef.current?.total);
- setMemoryEventsData(memoryEventDataAllRef.current?.operator);
- setSelectedRange(undefined);
- } else {
- setMemoryCurveData(memoryCurveDataAllRef.current?.ptaGe);
- setMemoryEventsData(memoryEventDataAllRef.current?.component);
- }
- };
-
- const onSelectedRangeChanged = (start: number, end: number): void => {
- if (start > end) {
- setSelectedRange(undefined);
- return;
- }
-
- let allDatas = deviceTarget === 'Ascend' ? memoryCurveData?.rows[device]?.Allocated : memoryCurveData?.rows[device];
- if (allDatas.length <= 1) {
- setSelectedRange(undefined);
- return;
- }
-
- let startTs = 0;
- let endTs = 0;
- let realStart = 0;
- let realEnd = 0;
- let startId = 1;
- let endId = 0;
- let needLoopStart = true;
- for (let i = 1; i < allDatas.length; i++) {
- if (startId > start && needLoopStart) {
- needLoopStart = false;
- realStart = i - 1;
- }
- if (allDatas[i][0] !== allDatas[i - 1][0]) {
- if (startId <= start) {
- startId += 1;
- }
- endId += 1;
- }
- if (endId > end) {
- realEnd = i - 1;
- break;
- } else {
- realEnd = i;
- if (needLoopStart) {
- realStart = i;
- }
- }
- }
-
- if (deviceTarget === 'Ascend') {
- startTs = allDatas[realStart][0];
- endTs = allDatas[realEnd][0];
- } else {
- let bias = memoryCurveData?.metadata.first_ts ?? 0;
- let scale = 1 / (memoryCurveData?.metadata.time_factor ?? 1);
- startTs = Math.round((allDatas[realStart][0] * scale) + bias);
- endTs = Math.round((allDatas[realEnd][0] * scale) + bias);
- }
-
- setSelectedRange({ start, end, startTs, endTs });
- };
-
- return (
-
-
-
-
-
-
-
- {(graph): JSX.Element => (
-
-
-
- Device
-
- {devices.map((item) => (
- {item}
- ))}
-
-
- {deviceTarget === 'Ascend' && (
-
- Group By
-
- {tags.map((item) => (
- {item}
- ))}
-
-
- )}
-
- {showCurve() && lineChartData && lineChartData.columns.length > 0 && (
-
-
-
-
-
- )}
-
- )}
-
-
- {showEvents() && (
- <>
- {(deviceTarget !== 'Ascend' || tag === 'Operator') && (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- )}
-
-
- {(data): JSX.Element => {
- return (
-
- );
- }}
-
-
- >
- )}
- {deviceTarget !== 'Ascend' && (
- <>
-
-
-
-
-
-
-
- {(data): JSX.Element => (
-
- )}
-
-
- >
- )}
-
-
-
-
- );
-});
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/ModuleView.tsx b/plugins/tensorboard-plugins/tb_plugin/fe/src/components/ModuleView.tsx
deleted file mode 100644
index a66a825365fd3c813e58865c609643ab547b4c49..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/ModuleView.tsx
+++ /dev/null
@@ -1,244 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-import Card from '@material-ui/core/Card';
-import CardHeader from '@material-ui/core/CardHeader';
-import InputLabel from '@material-ui/core/InputLabel';
-import MenuItem from '@material-ui/core/MenuItem';
-import Select, { SelectProps } from '@material-ui/core/Select';
-import { makeStyles } from '@material-ui/core/styles';
-import { message, Table } from 'antd';
-import * as React from 'react';
-import { FlameGraph } from 'react-flame-graph';
-import { defaultApi, KeyedColumn, ModuleStats, ModuleViewData, OperatorNode } from '../api';
-
-const useStyles = makeStyles((theme) => ({
- root: {
- flexGrow: 1,
- },
- hide: {
- display: 'none',
- },
-}));
-
-export interface IProps {
- run: string;
- worker: string;
- span: string;
-}
-
-const getKeyedTableColumns = (columns: KeyedColumn[]): any[] => {
- return columns.map((col) => {
- return {
- dataIndex: col.key,
- key: col.key,
- title: col.name,
- };
- });
-};
-
-const getTableRows = (key: number, rows: ModuleStats[]): any[] => {
- let initialKey = key;
- return rows.map((row) => {
- const currentKey = initialKey++;
- const data: any = {
- key: currentKey,
- name: row.name,
- occurences: row.occurences,
- operators: row.operators,
- host_duration: row.host_duration,
- self_host_duration: row.self_host_duration,
- device_duration: row.device_duration,
- self_device_duration: row.self_device_duration,
- };
-
- if (row.children.length) {
- data.children = getTableRows(key, row.children);
- }
-
- return data;
- });
-};
-
-const getFlameGraphData = (rows: ModuleStats[]): any[] => {
- return rows.map((row) => {
- const data: any = {
- name: row.name,
- value: row.avg_duration,
- tooltip: `${row.name} (module id: ${row.id}): ${row.avg_duration} us`,
- };
-
- if (row.children.length) {
- data.children = getFlameGraphData(row.children);
- }
-
- return data;
- });
-};
-
-const getTreeHeight = (row: ModuleStats): number => {
- if (row.children?.length) {
- return 1 + Math.max(...row.children.map((child) => getTreeHeight(child)));
- } else {
- return 1;
- }
-};
-
-const getOperatorTree = (level: number, row: OperatorNode, result: object[]): void => {
- result.push({
- level: level,
- name: row.name,
- start: row.start_time,
- end: row.end_time,
- });
- if (row.children.length) {
- row.children.forEach((child) => getOperatorTree(level + 1, child, result));
- }
-};
-
-export const ModuleView: React.FC = (props) => {
- const { run, worker, span } = props;
- const classes = useStyles();
-
- const [moduleView, setModuleView] = React.useState(undefined);
- const [flameData, setFlameData] = React.useState([]);
- const [flameHeight, setFlameHeight] = React.useState(0);
- const [modules, setModules] = React.useState([]);
- const [module, setModule] = React.useState(0);
-
- const [columns, setColumns] = React.useState([]);
- const [rows, setRows] = React.useState([]);
-
- const cardRef = React.useRef(null);
- const [cardWidth, setCardWidth] = React.useState(undefined);
- const timelineRef = React.useRef(null);
-
- React.useEffect(() => {
- defaultApi
- .moduleGet(run, worker, span)
- .then((resp) => {
- setModuleView(resp);
- if (resp) {
- // set the flamegraph data
- const flameGraphData: any[] = getFlameGraphData(resp.data);
- setFlameData(flameGraphData);
- const flameGraphHeight = Math.max(...flameGraphData.map((x) => getTreeHeight(x)));
- setFlameHeight(flameGraphHeight * 25);
- setModules(Array.from(Array(flameGraphData.length).keys()));
- setModule(0);
-
- // set the tree table data
- setColumns(getKeyedTableColumns(resp.columns));
- setRows(getTableRows(1, resp.data));
- }
- })
- .catch((e) => {
- if (e.status === 404) {
- setModules([]);
- setFlameData([]);
- setRows([]);
- }
- });
-
- if (cardRef.current) {
- setCardWidth(cardRef.current.offsetWidth - 10);
- }
- try {
- if (timelineRef.current) {
- defaultApi.treeGet(run, worker, span).then((resp) => {
- if (resp) {
- const data = new google.visualization.DataTable();
- data.addColumn({ type: 'string', id: 'Layer' });
- data.addColumn({ type: 'string', id: 'Name' });
- data.addColumn({ type: 'string', role: 'tooltip' });
- data.addColumn({ type: 'number', id: 'Start' });
- data.addColumn({ type: 'number', id: 'End' });
-
- let timelineData: any[] = [];
- getOperatorTree(0, resp, timelineData);
- timelineData.sort((a, b) => a.level - b.level);
- const maxLevel = timelineData[timelineData.length - 1].level;
- timelineData.forEach((d) => {
- data.addRow([
- d.level.toString(),
- d.name,
- `${d.name} Duration: ${d.end - d.start} us`,
- d.start / 1000.0, // the time unit is us returned from server, but the google charts only accept milliseconds here
- d.end / 1000.0,
- ]);
- });
-
- const chart = new google.visualization.Timeline(timelineRef.current);
- const options = {
- height: (maxLevel + 1) * 50,
- tooltip: {
- isHtml: true,
- },
- timeline: {
- showRowLabels: false,
- },
- };
- chart.draw(data, options);
- }
- });
- }
- } catch (e) {
- message.warning('Timeline in module view is not supported offline.');
- }
- }, [run, worker, span]);
-
- const handleModuleChange: SelectProps['onChange'] = (event) => {
- setModule(event.target.value as number);
- };
-
- const moduleComponent = (): JSX.Element => {
- const moduleFragment = (
-
- Module
-
- {modules.map((m) => (
- {m}
- ))}
-
-
- );
-
- if (!modules || modules.length <= 1) {
- return {moduleFragment}
;
- } else {
- return moduleFragment;
- }
- };
-
- return (
-
-
-
- {rows && rows.length > 0 && (
-
- )}
-
- {moduleComponent()}
-
- {flameData && flameData.length > 0 && (
- {}}
- />
- )}
-
-
-
-
- );
-};
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/Operator.tsx b/plugins/tensorboard-plugins/tb_plugin/fe/src/components/Operator.tsx
deleted file mode 100644
index b19bef1967a31915c3c1d660b699b11c83ebb226..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/Operator.tsx
+++ /dev/null
@@ -1,282 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------
- * Copyright (c) 2023, Huawei Technologies.
- * All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Modifications: Add visualization of PyTorch Ascend profiling.
- *--------------------------------------------------------------------------------------------*/
-
-import Card from '@material-ui/core/Card';
-import CardContent from '@material-ui/core/CardContent';
-import CardHeader from '@material-ui/core/CardHeader';
-import FormControlLabel from '@material-ui/core/FormControlLabel';
-import Grid from '@material-ui/core/Grid';
-import GridList from '@material-ui/core/GridList';
-import GridListTile from '@material-ui/core/GridListTile';
-import InputLabel from '@material-ui/core/InputLabel';
-import MenuItem from '@material-ui/core/MenuItem';
-import Radio from '@material-ui/core/Radio';
-import RadioGroup, { RadioGroupProps } from '@material-ui/core/RadioGroup';
-import Select, { SelectProps } from '@material-ui/core/Select';
-import { makeStyles } from '@material-ui/core/styles';
-import TextField, { StandardTextFieldProps, TextFieldProps } from '@material-ui/core/TextField';
-import * as React from 'react';
-import * as api from '../api';
-import { OperationTableData, OperationTableDataInner, OperatorGraph } from '../api';
-import { OperationGroupBy } from '../constants/groupBy';
-import { useSearchDirectly } from '../utils/search';
-import { topIsValid, UseTop, useTopN } from '../utils/top';
-import { PieChart } from './charts/PieChart';
-import { DataLoading } from './DataLoading';
-import { makeChartHeaderRenderer, useTooltipCommonStyles } from './helpers';
-import { OperationTable } from './tables/OperationTable';
-import {
- deviceSelfTimeTooltip,
- deviceSelfTimeTooltipAscend,
- deviceTotalTimeTooltip,
- deviceTotalTimeTooltipAscend,
- hostSelfTimeTooltip,
- hostTotalTimeTooltip,
-} from './TooltipDescriptions';
-
-const useStyles = makeStyles((theme) => ({
- root: {
- flexGrow: 1,
- },
- verticalInput: {
- display: 'flex',
- alignItems: 'center',
- },
- inputWidth: {
- width: '4em',
- },
- inputWidthOverflow: {
- minWidth: '15em',
- whiteSpace: 'nowrap',
- },
- full: {
- width: '100%',
- },
- description: {
- marginLeft: theme.spacing(1),
- },
-}));
-
-export interface IProps {
- run: string;
- worker: string;
- span: string;
- deviceTarget: string;
-}
-
-export const Operator: React.FC = (props) => {
- const { run, worker, span, deviceTarget } = props;
- const classes = useStyles();
- const tooltipCommonClasses = useTooltipCommonStyles();
- const chartHeaderRenderer = React.useMemo(
- () => makeChartHeaderRenderer(tooltipCommonClasses),
- [tooltipCommonClasses]
- );
-
- const [operatorGraph, setOperatorGraph] = React.useState(undefined);
- const [operatorTable, setOperatorTable] = React.useState(undefined);
- const [sortColumn, setSortColumn] = React.useState('');
- const [tableTooltips, setTableTooltips] = React.useState(undefined);
- const [groupBy, setGroupBy] = React.useState(OperationGroupBy.OPERATION);
- const [searchOperatorName, setSearchOperatorName] = React.useState('');
- const [topText, actualTop, useTop, setTopText, setUseTop] = useTopN({
- defaultUseTop: UseTop.USE,
- defaultTop: 10,
- });
-
- const getName = React.useCallback((row: OperationTableDataInner) => row.name, []);
- const [searchedOperatorTable] = useSearchDirectly(searchOperatorName, getName, operatorTable);
-
- const onSearchOperatorChanged: TextFieldProps['onChange'] = (event) => {
- setSearchOperatorName(event.target.value as string);
- };
-
- React.useEffect(() => {
- if (operatorGraph) {
- const counts = [
- operatorGraph.device_self_time?.rows.length ?? 0,
- operatorGraph.device_total_time?.rows.length ?? 0,
- operatorGraph.host_self_time.rows?.length ?? 0,
- operatorGraph.host_total_time.rows?.length ?? 0,
- ];
- setTopText(String(Math.min(Math.max(...counts), 10)));
- }
- }, [operatorGraph]);
-
- React.useEffect(() => {
- api.defaultApi.operationTableGet(run, worker, span, groupBy).then((resp) => {
- setSortColumn(resp.metadata.sort);
- setTableTooltips(resp.metadata.tooltips);
- setOperatorTable(resp.data);
- });
- }, [run, worker, span, groupBy]);
-
- React.useEffect(() => {
- api.defaultApi.operationGet(run, worker, span, groupBy).then((resp) => {
- setOperatorGraph(resp);
- });
- }, [run, worker, span, groupBy]);
-
- const onGroupByChanged: SelectProps['onChange'] = (event) => {
- setGroupBy(event.target.value as OperationGroupBy);
- };
-
- const onUseTopChanged: RadioGroupProps['onChange'] = (event) => {
- setUseTop(event.target.value as UseTop);
- };
-
- const onTopChanged = (event: React.ChangeEvent): void => {
- setTopText(event.target.value);
- };
-
- const inputProps: StandardTextFieldProps['inputProps'] = {
- min: 1,
- };
-
- const renderCharts = (graph: api.OperatorGraph): JSX.Element => {
- return (
-
- {graph.device_self_time && (
-
-
- {graph.device_self_time.title && (
-
- )}
-
-
-
- )}
- {graph.device_total_time && (
-
-
- {graph.device_total_time.title && (
-
- )}
-
-
-
- )}
-
-
- {graph.host_self_time.title && (
-
- )}
-
-
-
-
-
- {graph.host_total_time.title && (
-
- )}
-
-
-
-
- );
- };
-
- return (
-
-
-
-
-
-
-
-
- } label='All operators' />
- } label='Top operators to show' />
-
-
- {useTop === UseTop.USE && (
-
-
-
- )}
-
-
- {renderCharts}
-
-
-
-
-
- Group By
-
- Operator + Input Shape
- Operator
-
-
-
-
-
-
-
-
-
- {(table): JSX.Element => (
-
- )}
-
-
-
-
-
-
-
- );
-};
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/Overview.tsx b/plugins/tensorboard-plugins/tb_plugin/fe/src/components/Overview.tsx
deleted file mode 100644
index 6a81c567bc5e44b1dd6eb4746135d61268cadb81..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/Overview.tsx
+++ /dev/null
@@ -1,225 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-import Card from '@material-ui/core/Card';
-import CardContent from '@material-ui/core/CardContent';
-import CardHeader from '@material-ui/core/CardHeader';
-import Grid from '@material-ui/core/Grid';
-import { makeStyles } from '@material-ui/core/styles';
-import { Table } from 'antd';
-import { ColumnsType } from 'antd/es/table';
-import * as React from 'react';
-import * as api from '../api';
-import { PieChart } from './charts/PieChart';
-import { SteppedAreaChart } from './charts/SteppedAreaChart';
-import { DataLoading } from './DataLoading';
-import { makeChartHeaderRenderer, useTooltipCommonStyles } from './helpers';
-import { TextListItem } from './TextListItem';
-import { stepTimeBreakDownTooltip } from './TooltipDescriptions';
-import { transformPerformanceIntoPie, transformPerformanceIntoTable } from './transform';
-
-const topGraphHeight = 230;
-
-const useStyles = makeStyles((theme) => ({
- root: {
- flexGrow: 1,
- },
- pre: {
- '& ul': {
- margin: 0,
- paddingLeft: theme.spacing(3),
- ...theme.typography.body1,
- },
- '& li': {},
- '& a': {
- color: '#ffa726',
- },
- '& a:active': {
- color: '#ffa726',
- },
- '& p': {
- margin: 0,
- ...theme.typography.subtitle1,
- fontWeight: theme.typography.fontWeightBold,
- },
- },
- topGraph: {
- height: topGraphHeight + 40,
- },
- table: {
- height: '100%',
- border: '1px solid #efefef',
- '& .ant-table-tbody > tr': {
- height: 20,
- fontSize: '10pt',
- '& > td': {
- padding: '0 8px!important',
- },
- },
- },
-}));
-
-export interface IProps {
- run: string;
- worker: string;
- span: string;
-}
-
-export const Overview: React.FC = (props) => {
- const { run, worker, span } = props;
-
- const [steps, setSteps] = React.useState(undefined);
- const [performances, setPerformances] = React.useState([]);
- const [environments, setEnvironments] = React.useState([]);
- const [gpuMetrics, setGpuMetrics] = React.useState(undefined);
- const [recommendations, setRecommendations] = React.useState('');
- const [columns, setColumns] = React.useState>([]);
-
- const tableRows = React.useMemo(() => {
- let dataInfo: api.Graph = transformPerformanceIntoTable(performances);
- if (dataInfo.columns.length < 3) {
- return [];
- }
- const stringCompare = (a: string, b: string): number => a.localeCompare(b);
- const numberCompare = (a: number, b: number): number => a - b;
- let column: any[] = dataInfo.columns.map((item) => {
- return {
- title: item.name,
- key: item.name,
- dataIndex: item.name,
- sorter:
- item.type === 'string'
- ? (a: any, b: any): number => stringCompare(a[item.name], b[item.name])
- : (a: any, b: any): number => numberCompare(a[item.name], b[item.name]),
- };
- });
- setColumns(column);
- return dataInfo.rows.map((row, index) => {
- if (row.length < 3) {
- return null;
- }
- return {
- key: index,
- [dataInfo.columns[0].name]: row[0],
- [dataInfo.columns[1].name]: row[1],
- [dataInfo.columns[2].name]: row[2],
- };
- });
- }, [performances]);
-
- const synthesizedPieGraph = React.useMemo(() => {
- return transformPerformanceIntoPie(performances);
- }, [performances]);
-
- React.useEffect(() => {
- api.defaultApi.overviewGet(run, worker, span).then((resp) => {
- setPerformances(resp.performance);
- setEnvironments(resp.environments);
- setSteps(resp.steps);
- setRecommendations(resp.recommendations);
- setGpuMetrics(resp.gpu_metrics);
- });
- }, [run, worker, span]);
-
- const classes = useStyles();
- const tooltipCommonClasses = useTooltipCommonStyles();
- const chartHeaderRenderer = React.useMemo(
- () => makeChartHeaderRenderer(tooltipCommonClasses, false),
- [tooltipCommonClasses]
- );
-
- const stepTimeBreakDownTitle = React.useMemo(
- () => chartHeaderRenderer('Step Time Breakdown', stepTimeBreakDownTooltip),
- [tooltipCommonClasses, chartHeaderRenderer]
- );
-
- const cardSizes = gpuMetrics ? ([2, 3, 7] as const) : ([4, undefined, 8] as const);
-
- return (
-
-
-
-
- {React.useMemo(
- () => (
-
-
-
- {environments.map((environment) => (
-
- ))}
-
-
- ),
- [environments]
- )}
-
- {gpuMetrics && (
-
-
-
-
- {gpuMetrics.data.map((metric) => (
-
- ))}
-
-
-
- )}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {(graph): JSX.Element => (
-
- )}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- );
-};
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/TextListItem.tsx b/plugins/tensorboard-plugins/tb_plugin/fe/src/components/TextListItem.tsx
deleted file mode 100644
index 59eb79c2a8f05cc750d264880bb66ab646c4bbb4..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/TextListItem.tsx
+++ /dev/null
@@ -1,82 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-import Grid from '@material-ui/core/Grid';
-import { makeStyles } from '@material-ui/core/styles';
-import * as React from 'react';
-
-export interface IStylesProps {
- root?: string;
- name?: string;
-}
-
-export interface IProps {
- name: string;
- value?: string;
- description?: string;
- extra?: string;
- classes?: IStylesProps;
- dangerouslyAllowHtml?: boolean;
-}
-
-const useStyles = makeStyles((theme) => ({
- label: {
- ...theme.typography.subtitle2,
- fontWeight: 'bolder',
- },
- value: {
- textAlign: 'right',
- ...theme.typography.subtitle2,
- fontWeight: 'bolder',
- },
-}));
-
-export const TextListItem: React.FC = (props) => {
- const classes = useStyles();
-
- const getSizes = function (): readonly any[] {
- if (props.value && props.extra) {
- return [4, 4, 4] as const;
- }
- if (props.value) {
- if (props.value.length > props.name.length) {
- return [4, 8, undefined] as const;
- }
- return [8, 4, undefined] as const;
- }
- return [12, undefined, undefined] as const;
- };
-
- const sizes = getSizes();
-
- const renderSpan = function (content: string, className?: string): React.JSX.Element {
- if (props.dangerouslyAllowHtml) {
- return ;
- }
- return {content} ;
- };
-
- return (
-
-
-
-
- {renderSpan(props.name, props.classes?.name)}
-
- {props.description && {renderSpan(props.description)} }
-
-
- {props.value && (
-
- {renderSpan(props.value)}
-
- )}
- {props.extra && (
-
- {renderSpan(props.extra)}
-
- )}
-
- );
-};
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/TooltipDescriptions.ts b/plugins/tensorboard-plugins/tb_plugin/fe/src/components/TooltipDescriptions.ts
deleted file mode 100644
index 6d3631fee97a4dd8da5ebde1550573d8c6e501fa..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/TooltipDescriptions.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-export const stepTimeBreakDownTooltip = `The time spent on each step is broken down into multiple categories as follows:
-Kernel: Kernels execution time on GPU device;
-Memcpy: GPU involved memory copy time (either D2D, D2H or H2D);
-Memset: GPU involved memory set time;
-Runtime: CUDA runtime execution time on host side; Such as cudaLaunchKernel, cudaMemcpyAsync, cudaStreamSynchronize, ...
-DataLoader: The data loading time spent in PyTorch DataLoader object;
-CPU Exec: Host compute time, including every PyTorch operator running time;
-Other: The time not included in any of the above.`;
-
-export const deviceSelfTimeTooltip = `The accumulated time spent on GPU, not including this operator’s child operators.`;
-
-export const deviceSelfTimeTooltipAscend = `The accumulated time spent on NPU, not including this operator’s child operators.`;
-
-export const deviceTotalTimeTooltip = `The accumulated time spent on GPU, including this operator’s child operators.`;
-
-export const deviceTotalTimeTooltipAscend = `The accumulated time spent on NPU, including this operator’s child operators.`;
-
-export const hostSelfTimeTooltip = `The accumulated time spent on Host, not including this operator’s child operators.`;
-
-export const hostTotalTimeTooltip = `The accumulated time spent on Host, including this operator’s child operators.`;
-
-export const gpuKernelTotalTimeTooltip = `The accumulated time of all calls of this kernel.`;
-
-export const tensorCoresPieChartTooltip = `The accumulated time of all kernels using or not using Tensor Cores.`;
-
-export const tensorCoresPieChartTooltipAscend = `The accumulated time of all kernels group by Accelerator Core.`;
-
-export const distributedGpuInfoTableTooltip = `Information about GPU hardware used during the run.`;
-
-export const distributedOverlapGraphTooltip = `The time spent on computation vs communication.`;
-
-export const distributedWaittimeGraphTooltip = `The time spent waiting vs communicating between devices.`;
-
-export const distributedCommopsTableTooltip = `Statistics for operations managing communications between nodes.`;
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/TraceView.tsx b/plugins/tensorboard-plugins/tb_plugin/fe/src/components/TraceView.tsx
deleted file mode 100644
index be499794936a085ed72740eea8bac5f33df37171..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/TraceView.tsx
+++ /dev/null
@@ -1,79 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-import ClickAwayListener from '@material-ui/core/ClickAwayListener';
-import { makeStyles } from '@material-ui/core/styles';
-import * as React from 'react';
-import * as api from '../api';
-
-export interface IProps {
- run: string;
- worker: string;
- span: string;
- iframeRef: React.RefObject;
-}
-
-const useStyles = makeStyles(() => ({
- root: {
- flexGrow: 1,
- },
- frame: {
- width: '100%',
- height: 'calc(100vh - 48px)',
- border: 'none',
- },
-}));
-
-export const TraceView: React.FC = (props) => {
- const { run, worker, span, iframeRef } = props;
- const classes = useStyles();
-
- const [traceData, setTraceData] = React.useState | null>(null);
- const [traceViewReady, setTraceViewReady] = React.useState(false);
-
- React.useEffect(() => {
- setTraceData(
- api.defaultApi.traceGet(run, worker, span).then((resp) => {
- return JSON.stringify(resp);
- })
- );
- }, [run, worker, span]);
-
- React.useEffect(() => {
- function callback(event: MessageEvent): void {
- const data = event.data || {};
- if (data.msg === 'ready') {
- setTraceViewReady(true);
- }
- }
-
- window.addEventListener('message', callback);
- return () => {
- window.removeEventListener('message', callback);
- };
- }, []);
-
- React.useEffect(() => {
- if (traceData && traceViewReady) {
- traceData.then((data) => {
- iframeRef.current?.contentWindow?.postMessage({ msg: 'data', data }, window.origin);
- });
- }
- }, [traceData, traceViewReady]);
- const setIframeActive = (): void => {
- iframeRef.current?.focus();
- };
- return (
-
- {React.useMemo(
- () => (
-
-
-
- ),
- []
- )}
-
- );
-};
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/charts/AntTableChart.tsx b/plugins/tensorboard-plugins/tb_plugin/fe/src/components/charts/AntTableChart.tsx
deleted file mode 100644
index 83618064b55223ab06d4d1fec8b8b5eeab8d3268..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/charts/AntTableChart.tsx
+++ /dev/null
@@ -1,111 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-import { makeStyles } from '@material-ui/core/styles';
-import { Table } from 'antd';
-import * as React from 'react';
-import { Graph } from '../../api';
-
-interface IProps {
- graph: Graph;
- sortColumn?: string;
- initialPageSize?: number;
- onRowSelected?: (record?: object, rowIndex?: number) => void;
-}
-
-const useStyles = makeStyles((theme) => ({
- tooltip: {
- whiteSpace: 'pre-wrap',
- },
- row: {
- wordBreak: 'break-word',
- },
-}));
-
-const getTableColumns = function (columns: any, sort: string | undefined, tooltipClass: string): any {
- let i = 0;
- return columns.map((col: any) => {
- const key = `col${i++}`;
- const stringCompare = (a: any, b: any): number => a[key].localeCompare(b[key]);
- const numberCompare = (a: any, b: any): number => (a[key] || 0) - (b[key] || 0);
- return {
- dataIndex: key,
- key: key,
- title: col.name,
- sorter: col.type === 'string' ? stringCompare : numberCompare,
- defaultSortOrder: sort === col.name ? ('descend' as const) : undefined,
- showSorterTooltip: col.tooltip ? { title: col.tooltip, overlayClassName: tooltipClass } : true,
- };
- });
-};
-
-const getTableRows = function (rows: any): any {
- return rows.map((row: any) => {
- let i = 0;
- const res: any = {};
- row.forEach((entry: any) => {
- res[`col${i++}`] = entry;
- });
- return res;
- });
-};
-
-export const AntTableChart: React.FC = (props) => {
- const { graph, sortColumn, initialPageSize, onRowSelected } = props;
- const classes = useStyles(props);
-
- const rows = React.useMemo(() => getTableRows(graph.rows), [graph.rows]);
-
- const columns = React.useMemo(
- () => getTableColumns(graph.columns, sortColumn, classes.tooltip),
- [graph.columns, sortColumn, classes.tooltip]
- );
-
- // key is used to reset the Table state (page and sort) if the columns change
- const key: string = React.useMemo(() => `${Math.random()}`, [graph.columns]);
-
- const [pageSize, setPageSize] = React.useState(initialPageSize ?? 30);
- const onShowSizeChange = (current: number, size: number): void => {
- setPageSize(size);
- };
-
- const onRow = (
- record: object,
- rowIndex?: number
- ): {
- onMouseEnter: (event: any) => void;
- onMouseLeave: (event: any) => void;
- } => {
- return {
- onMouseEnter: (event: any): void => {
- if (onRowSelected) {
- onRowSelected(record, rowIndex);
- }
- },
- onMouseLeave: (event: any): void => {
- if (onRowSelected) {
- onRowSelected(undefined, undefined);
- }
- },
- };
- };
-
- return (
-
- );
-};
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/charts/AreaChart.tsx b/plugins/tensorboard-plugins/tb_plugin/fe/src/components/charts/AreaChart.tsx
deleted file mode 100644
index cda12860c2fba41f5a15c5d9e73fb92093c0371b..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/charts/AreaChart.tsx
+++ /dev/null
@@ -1,72 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-import { makeStyles } from '@material-ui/core/styles';
-import * as React from 'react';
-import { Graph } from '../../api';
-import { useResizeEventDependency } from '../../utils/resize';
-
-interface IProps {
- graph: Graph;
- height?: number;
- hAxisTitle?: string;
-}
-
-const useStyles = makeStyles(() => ({
- root: {
- height: (props: Pick): number | undefined => props.height,
- },
-}));
-
-export const AreaChart: React.FC = (props) => {
- const { graph, height = 400, hAxisTitle } = props;
- const classes = useStyles({ height });
- const graphRef = React.useRef(null);
- const [resizeEventDependency] = useResizeEventDependency();
-
- React.useLayoutEffect(() => {
- const element = graphRef.current;
- if (!element) {
- return undefined;
- }
-
- const data = new google.visualization.DataTable();
- data.addColumn('string', 'step');
- graph.columns.forEach((column) => {
- data.addColumn({
- type: column.type,
- label: column.name,
- role: column.role,
- p: column.p,
- });
- });
- data.addRows(graph.rows.map((x, i) => [(i + 1).toString(), ...x]));
-
- const options = {
- title: graph.title,
- isStacked: true,
- height,
- legend: { position: 'bottom' },
- tooltip: { isHtml: true },
- chartArea: { left: '15%', width: '80%', top: '10%' },
- hAxis: {
- title: hAxisTitle,
- },
- };
-
- const chart = new google.visualization.AreaChart(element);
-
- chart.draw(data, options);
-
- return () => {
- chart.clearChart();
- };
- }, [graph, height, resizeEventDependency]);
-
- return (
-
- );
-};
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/charts/ColumnChart.tsx b/plugins/tensorboard-plugins/tb_plugin/fe/src/components/charts/ColumnChart.tsx
deleted file mode 100644
index ae51dc1a34e94b1c91eab2fe502ffe2cbc20f618..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/charts/ColumnChart.tsx
+++ /dev/null
@@ -1,118 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------
- * Copyright (c) 2023, Huawei Technologies.
- * All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Modifications: Offer offline supporting.
- *--------------------------------------------------------------------------------------------*/
-
-import * as React from 'react';
-import { useResizeEventDependency } from '../../utils/resize';
-import * as echarts from 'echarts';
-
-interface IProps {
- title?: string;
- units?: string;
- colors?: Array;
- chartData: ColumnChartData;
-}
-
-export interface ColumnChartData {
- legends: Array;
- barLabels: Array;
- barHeights: Array>;
-}
-
-export const ColumnChart: React.FC = (props) => {
- const { title, units, colors, chartData } = props;
- const { legends, barLabels, barHeights } = chartData;
- const graphRef = React.useRef(null);
- const [resizeEventDependency] = useResizeEventDependency();
-
- const getAngleByDataLength = (data: number): number => {
- if (data < 10) {
- return 0;
- } else {
- // 数量越大越趋近于旋转90度
- return 90 * (1 - (10 / data));
- }
- };
-
- React.useLayoutEffect(() => {
- const element = graphRef.current;
- if (!element) {
- return undefined;
- }
-
- const chart = echarts.init(element);
- const dataSource: Array> = [];
- dataSource.push(['worker', ...legends]);
- barHeights.forEach((item, index) => {
- if (barLabels[index] !== undefined) {
- dataSource.push([barLabels[index], ...item]);
- }
- });
- const options: echarts.EChartsOption = {
- title: {
- text: title,
- },
- legend: {
- bottom: 0,
- },
- xAxis: {
- type: 'category',
- axisLabel: {
- interval: 0,
- rotate: getAngleByDataLength(barLabels.length),
- formatter: (name: string) => {
- const index = name.indexOf('@');
- const processedName = index > -1 ? name.slice(index + 1) : name; // 使用新变量处理
- return processedName.length > 16 ? `${processedName.slice(0, 14)}...` : processedName;
- },
- },
- },
- yAxis: {
- type: 'value',
- name: units,
- nameTextStyle: {
- fontSize: 16,
- },
- },
- tooltip: {
- trigger: 'item',
- },
- dataset: {
- source: dataSource,
- },
- series: Array(legends.length).fill({
- type: 'bar',
- stack: 'samesign',
- }),
- };
- if (colors) {
- options.color = colors.slice(0, barLabels.length);
- }
-
- if (options) {
- chart.setOption(options, true);
- }
- return () => {
- chart.dispose();
- };
- }, [title, chartData, resizeEventDependency]);
-
- return
;
-};
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/charts/NewLineChart.tsx b/plugins/tensorboard-plugins/tb_plugin/fe/src/components/charts/NewLineChart.tsx
deleted file mode 100644
index a6e222a6cc9d04b3b0c9031be60b91b75fe9ab37..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/charts/NewLineChart.tsx
+++ /dev/null
@@ -1,386 +0,0 @@
-/*--------------------------------------------------------------------------------------------
- * Copyright (c) 2023, Huawei Technologies.
- * All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *--------------------------------------------------------------------------------------------*/
-
-import * as React from 'react';
-import { Graph, GraphAscend } from '../../api';
-import { useResizeEventDependency } from '../../utils/resize';
-import { binarySearch } from '../../utils/binarysearch';
-import * as echarts from 'echarts';
-
-interface IProps {
- graph: Graph | GraphAscend;
- height?: number;
- deviceTarget: string;
- tag: string;
- hAxisTitle?: string;
- vAxisTitle?: string;
- onSelectionChanged?: (start: number, end: number) => void;
- record?: any;
-}
-
-export const LineChart: React.FC = (props) => {
- const { graph, height = 400, deviceTarget, tag, hAxisTitle, vAxisTitle, onSelectionChanged, record } = props;
- const graphRef = React.useRef(null);
- const [resizeEventDependency] = useResizeEventDependency();
- const [chartObj, setChartObj] = React.useState();
- const selectedPoints = React.useRef>([]);
-
- React.useLayoutEffect(() => {
- const element = graphRef.current;
- if (!element) {
- return undefined;
- }
- element.oncontextmenu = (): boolean => {
- return false;
- };
-
- let myChart = echarts.init(element);
-
- let option: echarts.EChartsOption = {
- title: {
- text: graph.title,
- textStyle: {
- fontSize: 16,
- },
- },
- tooltip: { trigger: 'axis' },
- legend: {
- type: 'scroll',
- bottom: 0,
- },
- xAxis: {
- type: 'category',
- boundaryGap: false,
- name: hAxisTitle,
- },
- yAxis: {
- type: 'value',
- name: vAxisTitle,
- scale: true,
- },
- toolbox: {
- feature: {
- dataZoom: {
- yAxisIndex: 'none',
- },
- restore: {},
- },
- },
- };
-
- if (deviceTarget === 'Ascend') {
- if (tag === 'Component') {
- const mixedTooltip: echarts.TooltipComponentOption = {
- trigger: 'axis',
- formatter: function (params: any) {
- let res = `${params[0].name} `;
- for (const item of params) {
- if (typeof item.value[item.encode.y[0]] === 'number') {
- res += `
-
- ${item.seriesName}: ${item.value[item.encode.y[0]]} `;
- }
- }
- return res;
- },
- };
- if (graph.columns.length <= 4) {
- let finalRows = graph.rows.PTA ?? graph.rows.GE;
- if (graph.columns.length === 4) {
- const mergedAPPRows = graph.rows.APP.map((item: Array) => {
- return [item[0], null, null, item[1]];
- });
- finalRows = finalRows.concat(mergedAPPRows).sort((a: any, b: any) => {
- return a[0] - b[0];
- });
- }
- option = {
- ...option,
- tooltip: mixedTooltip,
- dataset: {
- source: [graph.columns.map((column) => column.name), ...finalRows],
- },
- series: Array(graph.columns.length - 1).fill({
- type: 'line',
- select: {
- itemStyle: {
- borderWidth: 5,
- shadowBlur: 5,
- },
- },
- emphasis: {
- itemStyle: {
- borderWidth: 5,
- shadowBlur: 5,
- },
- },
- selectedMode: 'single',
- }),
- };
- } else if (graph.columns.length <= 6) {
- const datasetTitle = graph.columns.map((item) => item.name);
- let mergedGERows = graph.rows.GE.map((item: Array) => {
- return [item[0], null, null, item[1], item[2]];
- });
- if (graph.columns.length === 6) {
- const mergedAPPRows = graph.rows.APP.map((item: Array) => {
- return [item[0], null, null, null, null, item[2]];
- });
- mergedGERows = mergedGERows.concat(mergedAPPRows);
- }
- const finalRows = graph.rows.PTA.concat(mergedGERows).sort((a: any, b: any) => {
- return a[0] - b[0];
- });
- option = {
- ...option,
- tooltip: mixedTooltip,
- dataset: {
- source: [datasetTitle, ...finalRows],
- },
- series: Array(graph.columns.length - 1).fill({
- type: 'line',
- connectNulls: true,
- select: {
- itemStyle: {
- borderWidth: 5,
- shadowBlur: 5,
- },
- },
- emphasis: {
- itemStyle: {
- borderWidth: 5,
- shadowBlur: 5,
- },
- },
- selectedMode: 'single',
- datasetIndex: 0,
- }),
- };
- }
- } else {
- if (graph.columns.length === 3) {
- const datasetTitle1: Array = [];
- const datasetTitle2: Array = [];
- graph.columns.forEach((column, index) => {
- if (index === 0 || index < 2) {
- datasetTitle1.push(column.name);
- }
- if (index === 0 || index >= 2) {
- datasetTitle2.push(column.name);
- }
- });
- option = {
- ...option,
- dataset: [
- {
- source: [datasetTitle1, ...graph.rows.Allocated],
- },
- {
- source: [datasetTitle2, ...graph.rows.Reserved],
- },
- ],
- series: [
- {
- type: 'line',
- name: 'Allocated',
- emphasis: {
- label: {
- show: true,
- },
- itemStyle: {
- borderWidth: 5,
- shadowBlur: 5,
- },
- },
- select: {
- itemStyle: {
- borderWidth: 5,
- shadowBlur: 5,
- },
- },
- datasetIndex: 0,
- },
- {
- type: 'line',
- name: 'Reserved',
- select: {
- itemStyle: {
- borderWidth: 5,
- shadowBlur: 5,
- },
- },
- emphasis: {
- itemStyle: {
- borderWidth: 5,
- shadowBlur: 5,
- },
- },
- selectedMode: 'single',
- datasetIndex: 1,
- },
- ],
- };
- }
- }
- } else {
- option = {
- ...option,
- dataset: {
- source: [graph.columns.map((column) => column.name), ...graph.rows],
- },
- series: [
- {
- type: 'line',
- name: 'Allocated',
- select: {
- itemStyle: {
- borderWidth: 5,
- shadowBlur: 5,
- },
- },
- emphasis: {
- itemStyle: {
- borderWidth: 5,
- shadowBlur: 5,
- },
- },
- selectedMode: 'single',
- },
- {
- type: 'line',
- name: 'Reserved',
- select: {
- itemStyle: {
- borderWidth: 5,
- shadowBlur: 5,
- },
- },
- emphasis: {
- itemStyle: {
- borderWidth: 5,
- shadowBlur: 5,
- },
- },
- selectedMode: 'single',
- },
- ],
- };
- }
-
- if (option) {
- myChart.setOption(option, true);
- }
- myChart.dispatchAction({
- type: 'takeGlobalCursor',
- key: 'dataZoomSelect',
- dataZoomSelectActive: true,
- });
-
- myChart.on('dataZoom', (param: any) => {
- if (onSelectionChanged) {
- onSelectionChanged(param.batch[0].startValue, param.batch[0].endValue);
- }
- });
-
- myChart.on('restore', () => {
- if (onSelectionChanged) {
- // Set startId greater than endId to query all memory events.
- onSelectionChanged(0, -1);
- }
- });
-
- myChart.on('click', (param) => {
- myChart.dispatchAction({
- type: 'unselect',
- seriesId: param.seriesId,
- dataIndex: selectedPoints.current,
- });
- myChart.dispatchAction({
- type: 'select',
- seriesId: param.seriesId,
- dataIndex: param.dataIndex,
- });
-
- selectedPoints.current = [param.dataIndex];
- });
-
- myChart.getZr().on('contextmenu', () => {
- myChart.dispatchAction({
- type: 'restore',
- });
- myChart.dispatchAction({
- type: 'takeGlobalCursor',
- key: 'dataZoomSelect',
- dataZoomSelectActive: true,
- });
- });
-
- setChartObj(myChart);
- return () => {
- myChart.dispose();
- };
- }, [graph, height, resizeEventDependency]);
-
- React.useEffect(() => {
- const compareFn = (key: number, mid: Array): number => key - mid[0];
- if (chartObj && tag === 'Operator') {
- if (record) {
- let startId = -1;
- let endId = -1;
- if (deviceTarget === 'Ascend') {
- startId = binarySearch(graph.rows.Allocated, record.col2, compareFn);
- endId = binarySearch(graph.rows.Allocated, record.col3, compareFn);
- } else {
- startId = binarySearch(graph.rows, record.col2, compareFn);
- endId = binarySearch(graph.rows, record.col3, compareFn);
- }
- let selection = [];
- if (startId >= 0) {
- selection.push(startId);
- }
- if (endId >= 0) {
- selection.push(endId);
- }
- chartObj.dispatchAction({
- type: 'downplay',
- seriesName: 'Allocated',
- dataIndex: selectedPoints.current,
- });
- chartObj.dispatchAction({
- type: 'highlight',
- seriesName: 'Allocated',
- dataIndex: selection,
- });
- selectedPoints.current = selection;
- } else {
- chartObj.dispatchAction({
- type: 'downplay',
- seriesName: 'Allocated',
- dataIndex: selectedPoints.current,
- });
- selectedPoints.current = [];
- }
- }
- }, [graph, record, chartObj]);
-
- return
;
-};
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/charts/PieChart.tsx b/plugins/tensorboard-plugins/tb_plugin/fe/src/components/charts/PieChart.tsx
deleted file mode 100644
index 49c59ff02e91f7b7fe0d90ddff4239478ca19a0a..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/charts/PieChart.tsx
+++ /dev/null
@@ -1,173 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------
- * Copyright (c) 2023, Huawei Technologies.
- * All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Modifications: Offer offline supporting.
- *--------------------------------------------------------------------------------------------*/
-
-import * as React from 'react';
-import { Graph } from '../../api';
-import { value } from '../../utils';
-import { useResizeEventDependency } from '../../utils/resize';
-import * as echarts from 'echarts';
-
-interface IProps {
- graph: Graph;
- height?: number;
- top?: number;
- noLegend?: boolean;
- title?: string;
- colors?: Array;
- tooltipMode?: string;
-}
-
-interface IAreaPosition {
- left: string;
- width: string;
- top?: string;
- height?: string;
-}
-
-const noLegendArea: IAreaPosition = {
- left: '5%',
- width: '90%',
- top: '5%',
- height: '90%',
-};
-const normalArea: IAreaPosition = { left: '5%', width: '95%' };
-const noTitleArea: IAreaPosition = {
- left: '5%',
- width: '95%',
- top: '10%',
- height: '80%',
-};
-
-export const PieChart: React.FC = (props) => {
- const { graph, height = 300, top, noLegend, title, colors, tooltipMode = 'both' } = props;
- const graphRef = React.useRef(null);
-
- const [resizeEventDependency] = useResizeEventDependency();
-
- React.useLayoutEffect(() => {
- const element = graphRef.current;
- if (!element) {
- return undefined;
- }
-
- const chart = echarts.init(element);
-
- let totalValue = 0;
- const rowsWithUniqueName: Array<{ name: string; value: number }> =
- top === undefined
- ? graph.rows.map((item, index) => {
- totalValue += item[1] as number;
- return { name: `${index}_${item[0]}`, value: item[1] as number };
- })
- : graph.rows
- .sort((a, b) => (value(b[1]) as number) - (value(a[1]) as number))
- .slice(0, top)
- .map((item, index) => {
- totalValue += item[1] as number;
- return { name: `${index}_${item[0]}`, value: item[1] as number };
- });
-
- const option: echarts.EChartsOption = {
- height,
- width: '100%',
- title: {
- text: title,
- },
- tooltip: {
- trigger: 'item',
- formatter: (data) => {
- const typedData = data as echarts.DefaultLabelFormatterCallbackParams;
- const index = typedData.name.indexOf('_');
- const safeName = typedData.name.replace(//g, '>');
- return `${index > -1 ? safeName.slice(index + 1) : safeName}${
- tooltipMode === 'both' ? typedData.value : ''
- }(${typedData.percent}%) `;
- },
- confine: true,
- extraCssText: `max-width: 300px;
- word-wrap:break-word;
- white-space:pre-wrap;
- padding-right: 10px`,
- },
- chartArea: ((): IAreaPosition => {
- if (noLegend) {
- return noLegendArea;
- }
- if (!title) {
- return noTitleArea;
- } else {
- return normalArea;
- }
- })(),
- legend: {
- type: noLegend ? 'plain' : 'scroll',
- orient: 'vertical',
- left: 'right',
- z: 10,
- // Display at most 36 characters.
- formatter: (name) => {
- // Show legends for datas with the same name.
- const index = name.indexOf('_');
- const processedName = index > -1 ? name.slice(index + 1) : name; // 使用新变量处理
- return processedName.length > 36 ? `${processedName.slice(0, 34)}...` : processedName;
- },
- tooltip: {
- show: true,
- triggerOn: 'mousemove',
- formatter: (data) => {
- const currentItem = rowsWithUniqueName.find((item) => item.name === data.name);
- const index = data.name.indexOf('_');
- const percent = (((currentItem?.value || 0) * 100) / totalValue).toFixed(2);
- const safeName = data.name.replace(//g, '>');
- return `${index > -1 ? safeName.slice(index + 1) : safeName}${
- tooltipMode === 'both' ? currentItem?.value || 0 : ''
- }(${percent}%) `;
- },
- },
- },
- sliceVisibilityThreshold: 0,
- colors,
- series: [
- {
- type: 'pie',
- radius: ['32%', '80%'],
- center: ['32%', '50%'],
- label: {
- position: 'inside',
- formatter: `{d}%`,
- color: '#ffffff',
- },
- data: rowsWithUniqueName,
- },
- ],
- };
-
- if (option) {
- chart.setOption(option, true);
- }
-
- return () => {
- chart.dispose();
- };
- }, [graph, height, top, resizeEventDependency]);
-
- return
;
-};
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/charts/SteppedAreaChart.tsx b/plugins/tensorboard-plugins/tb_plugin/fe/src/components/charts/SteppedAreaChart.tsx
deleted file mode 100644
index 3e3b01ccb112aeb80795246bd6f3e2ad83aa2a66..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/charts/SteppedAreaChart.tsx
+++ /dev/null
@@ -1,106 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------
- * Copyright (c) 2023, Huawei Technologies.
- * All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Modifications: Offer offline supporting.
- *--------------------------------------------------------------------------------------------*/
-
-import { makeStyles } from '@material-ui/core/styles';
-import * as React from 'react';
-import { StepedGraph } from '../../api';
-import { useResizeEventDependency } from '../../utils/resize';
-import * as echarts from 'echarts';
-
-interface IProps {
- graph: StepedGraph;
- height?: number;
- hAxisTitle?: string;
- vAxisTitle?: string;
-}
-
-const useStyles = makeStyles(() => ({
- root: {
- height: (props: Pick): number | undefined => props.height,
- },
-}));
-
-export const SteppedAreaChart: React.FC = (props) => {
- const { graph, height = 400, hAxisTitle, vAxisTitle } = props;
- const classes = useStyles({ height });
- const graphRef = React.useRef(null);
- const [resizeEventDependency] = useResizeEventDependency();
-
- React.useLayoutEffect(() => {
- const element = graphRef.current;
- if (!element) {
- return undefined;
- }
-
- const chart = echarts.init(element);
- const dataSource: Array> = [];
- dataSource.push(graph.columns);
- graph.rows.forEach((row) => {
- dataSource.push(row.map((item) => item.value));
- });
- const options: echarts.EChartsOption = {
- title: {
- text: graph.title,
- },
- legend: {
- bottom: 0,
- },
- xAxis: {
- type: 'category',
- name: hAxisTitle,
- axisLabel: {
- interval: 0,
- },
- },
- yAxis: {
- type: 'value',
- name: vAxisTitle,
- },
- tooltip: {
- trigger: 'item',
- formatter: (params: any) => {
- return graph.rows[params.dataIndex][params.seriesIndex + 1]?.tooltip || '';
- },
- },
- dataset: {
- source: dataSource,
- },
- series: Array(graph.columns.length - 1).fill({
- type: 'bar',
- stack: 'samesign',
- }),
- };
-
- if (options) {
- chart.setOption(options, true);
- }
-
- return () => {
- chart.dispose();
- };
- }, [graph, height, resizeEventDependency]);
-
- return (
-
- );
-};
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/charts/TableChart.tsx b/plugins/tensorboard-plugins/tb_plugin/fe/src/components/charts/TableChart.tsx
deleted file mode 100644
index 444b41b196c162340b846ac488d70eb908c7b717..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/charts/TableChart.tsx
+++ /dev/null
@@ -1,85 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-import { makeStyles } from '@material-ui/core/styles';
-import * as React from 'react';
-import { Graph } from '../../api';
-import { useResizeEventDependency } from '../../utils/resize';
-
-interface IProps {
- graph: Graph;
- sortColumn?: number;
- height?: number;
- allowHtml?: boolean;
- setCellProperty?: (row: number, column: number, cb: (key: string, value: any) => void) => void;
-}
-
-const useStyles = makeStyles(() => ({
- root: {
- height: (props: IProps): number | undefined => props.height,
- },
-}));
-
-export const TableChart: React.FC = (props) => {
- const { graph, sortColumn, setCellProperty, allowHtml } = props;
- const classes = useStyles(props);
- const graphRef = React.useRef(null);
- const [resizeEventDependency] = useResizeEventDependency();
-
- React.useLayoutEffect(() => {
- const element = graphRef.current;
- if (!element || !element.parentElement) {
- return;
- }
-
- const data = new google.visualization.DataTable();
- graph.columns.forEach((column) => {
- data.addColumn({
- type: column.type,
- label: column.name,
- role: column.role,
- p: column.p,
- });
- });
- data.addRows(graph.rows);
-
- if (setCellProperty) {
- for (let row = 0; row < graph.rows.length; ++row) {
- for (let column = 0; column < graph.columns.length; ++column) {
- setCellProperty(row, column, (key: string, value: any) => {
- data.setProperty(row, column, key, value);
- });
- }
- }
- }
-
- const options = {
- width: '100%',
- height: '100%',
- page: 'enable',
- allowHtml,
- pageSize: 30,
- tooltip: { isHtml: true },
- sortColumn: sortColumn,
- sortAscending: false,
- };
-
- const chart = new google.visualization.Table(element);
-
- /* `chart.draw()` removes the contents of `element` and rebuilds it. This can cause a jump in the scroll position
- * if the height/width change to 0. Since we can't change the code of Google Charts, we temporarily lock the dims
- * of the parent container. */
- if (element.offsetHeight > 0) {
- element.parentElement.style.height = `${element.offsetHeight}px`;
- }
- chart.draw(data, options);
- element.parentElement.style.height = '';
- }, [graph, resizeEventDependency]);
-
- return (
-
- );
-};
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/helpers.tsx b/plugins/tensorboard-plugins/tb_plugin/fe/src/components/helpers.tsx
deleted file mode 100644
index bfbb346e4b3daf65247e6e954346ed7245993f31..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/helpers.tsx
+++ /dev/null
@@ -1,41 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-import { makeStyles } from '@material-ui/core/styles';
-import Tooltip from '@material-ui/core/Tooltip';
-import HelpOutline from '@material-ui/icons/HelpOutline';
-import clsx from 'clsx';
-import * as React from 'react';
-
-export const useTooltipCommonStyles = makeStyles((theme) => ({
- tooltip: {
- maxWidth: '600px',
- whiteSpace: 'pre-wrap',
- fontSize: '14px',
- },
- cardTitle: {
- display: 'flex',
- alignItems: 'center',
- },
- titleText: {
- marginRight: theme.spacing(0.5),
- },
- smallTitleText: {
- fontSize: '.8rem',
- fontWeight: 'bold',
- },
-}));
-
-export const makeChartHeaderRenderer =
- (classes: ReturnType, smallTitleText = true) =>
- (title: string, tooltip: string): JSX.Element => {
- return (
-
- {title}
-
-
-
-
- );
- };
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/tables/CallFrameList.tsx b/plugins/tensorboard-plugins/tb_plugin/fe/src/components/tables/CallFrameList.tsx
deleted file mode 100644
index 0334d29e511399664d5204224e47cf1b88d50655..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/tables/CallFrameList.tsx
+++ /dev/null
@@ -1,35 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-import * as React from 'react';
-import { CallStackFrame } from './transform';
-import { List } from 'antd';
-import { NavToCodeButton } from './NavToCodeButton';
-import { makeStyles } from '@material-ui/core/styles';
-
-interface IProps {
- callFrames: CallStackFrame[];
-}
-
-const useStyles = makeStyles(() => ({
- item: {
- paddingTop: '1px !important',
- paddingBottom: '1px !important',
- },
-}));
-
-export const CallFrameList = (props: IProps): React.JSX.Element => {
- const classes = useStyles();
-
- const renderItem = React.useCallback(
- (item: CallStackFrame) => (
-
-
-
- ),
- [classes.item]
- );
-
- return
;
-};
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/tables/CallStackTable.tsx b/plugins/tensorboard-plugins/tb_plugin/fe/src/components/tables/CallStackTable.tsx
deleted file mode 100644
index c3176428d11b8b40c691947b2f0da8fc15674c16..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/tables/CallStackTable.tsx
+++ /dev/null
@@ -1,103 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------
- * Copyright (c) 2023, Huawei Technologies.
- * All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Modifications: Add visualization of PyTorch Ascend profiling.
- *--------------------------------------------------------------------------------------------*/
-
-import * as React from 'react';
-import { makeStyles } from '@material-ui/core/styles';
-import { CallStackTableData, OperationTableDataInner } from '../../api';
-import { Table, TableProps } from 'antd';
-
-import * as api from '../../api';
-import { transformTableData, TransformedCallStackDataInner } from './transform';
-import { attachId, getCommonOperationColumns } from './common';
-import { OperationGroupBy } from '../../constants/groupBy';
-import { makeExpandIcon } from './ExpandIcon';
-import { CallFrameList } from './CallFrameList';
-
-export interface IProps {
- data: OperationTableDataInner;
- run: string;
- worker: string;
- span: string;
- groupBy: OperationGroupBy;
- deviceTarget: string;
-}
-
-const useStyles = makeStyles((theme) => ({
- tooltip: {
- whiteSpace: 'pre-wrap',
- },
-}));
-
-const expandIcon = makeExpandIcon(
- 'View call frames',
- (record) => !record.callStackFrames.length
-);
-
-const rowExpandable = (record: TransformedCallStackDataInner): boolean => !!record.callStackFrames.length;
-const expandedRowRender = (record: TransformedCallStackDataInner): React.JSX.Element => (
-
-);
-
-export const CallStackTable = (props: IProps): React.JSX.Element => {
- const { data, run, worker, span, groupBy, deviceTarget } = props;
- const { name, input_shape } = data;
- const classes = useStyles(props);
-
- const [stackData, setStackData] = React.useState(undefined);
- const [tooltips, setTooltips] = React.useState();
-
- React.useEffect(() => {
- api.defaultApi.operationStackGet(run, worker, span, groupBy, name, input_shape).then((resp) => {
- setTooltips(resp.metadata.tooltips);
- setStackData(resp.data);
- });
- }, [name, input_shape, run, worker, span, groupBy]);
-
- const transformedData = React.useMemo(() => stackData && transformTableData(attachId(stackData)), [stackData]);
-
- const columns = React.useMemo(
- () => transformedData && getCommonOperationColumns(transformedData, deviceTarget, undefined, tooltips, classes),
- [transformedData]
- );
-
- const expandIconColumnIndex = columns?.length;
-
- const expandable: TableProps['expandable'] = React.useMemo(
- () => ({
- expandIconColumnIndex,
- expandIcon,
- expandedRowRender,
- rowExpandable,
- }),
- [expandIconColumnIndex]
- );
-
- return (
-
- );
-};
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/tables/ExpandIcon.tsx b/plugins/tensorboard-plugins/tb_plugin/fe/src/components/tables/ExpandIcon.tsx
deleted file mode 100644
index 422bb781630c24c6dc4915c3aed8c1f341dba363..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/tables/ExpandIcon.tsx
+++ /dev/null
@@ -1,35 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-import * as React from 'react';
-import { Button, TableProps } from 'antd';
-import { OperationTableDataInner, CallStackTableDataInner } from '../../api';
-import { Arguments } from '../../utils/type';
-
-type Types = NonNullable['expandable']>['expandIcon'];
-type BasePropType = Arguments>>[0];
-type PropType = BasePropType & { text: string; disabled?: boolean };
-
-export function ExpandIcon(
- props: PropType
-): React.JSX.Element {
- const onClick = (e: React.MouseEvent): void => {
- props.onExpand(props.record, e);
- };
-
- return (
-
- {props.text}
-
- );
-}
-
-export function makeExpandIcon(
- text: string,
- disabled?: (v: T) => boolean
-) {
- return (props: BasePropType): React.JSX.Element => (
-
- );
-}
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/tables/MemoryStatsTable.tsx b/plugins/tensorboard-plugins/tb_plugin/fe/src/components/tables/MemoryStatsTable.tsx
deleted file mode 100644
index c7e1809a3c0b58297ca99066243cf7d65fbe4c8c..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/tables/MemoryStatsTable.tsx
+++ /dev/null
@@ -1,77 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-import * as React from 'react';
-import { Table } from 'antd';
-import { makeStyles } from '@material-ui/core';
-
-export interface IProps {
- data: any;
- sort: string;
-}
-
-const useStyles = makeStyles((theme) => ({
- tooltip: {
- whiteSpace: 'pre-wrap',
- },
-}));
-
-const getMemoryStatsTableColumns = function (columns: any, sort: string, tooltipClass: string): any {
- let i = 0;
- return columns.map((col: any) => {
- const key = `col${i++}`;
- const stringCompare = (a: any, b: any): number => a[key].localeCompare(b[key]);
- const numberCompare = (a: any, b: any): number => (a[key] || 0) - (b[key] || 0);
- return {
- dataIndex: key,
- key: key,
- title: col.name,
- sorter: col.type === 'string' ? stringCompare : numberCompare,
- defaultSortOrder: sort === col.name ? ('descend' as const) : undefined,
- showSorterTooltip: col.tooltip ? { title: col.tooltip, overlayClassName: tooltipClass } : true,
- };
- });
-};
-
-const getMemoryStatsTableRows = function (rows: any): any {
- return rows.map((row: any) => {
- let i = 0;
- const res: any = {};
- row.forEach((entry: any) => {
- res[`col${i++}`] = entry;
- });
- return res;
- });
-};
-
-export const MemoryStatsTable = (props: IProps): React.JSX.Element => {
- const { data, sort } = props;
- const classes = useStyles();
-
- const rows = React.useMemo(() => getMemoryStatsTableRows(data.rows), [data.rows]);
-
- const columns = React.useMemo(
- () => getMemoryStatsTableColumns(data.columns, sort, classes.tooltip),
- [data.columns, sort, classes.tooltip]
- );
-
- const [pageSize, setPageSize] = React.useState(30);
- const onShowSizeChange = (current: number, size: number): void => {
- setPageSize(size);
- };
-
- return (
-
- );
-};
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/tables/NavToCodeButton.tsx b/plugins/tensorboard-plugins/tb_plugin/fe/src/components/tables/NavToCodeButton.tsx
deleted file mode 100644
index 2c999aa12a49726aad12321f260b31b6f331eda2..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/tables/NavToCodeButton.tsx
+++ /dev/null
@@ -1,29 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-import * as React from 'react';
-import { CallStackFrame } from './transform';
-import { Button } from 'antd';
-import { navToCode } from '../../utils/vscode';
-
-interface IProps {
- frame: CallStackFrame;
-}
-
-export const NavToCodeButton = (props: IProps): React.JSX.Element => {
- const { raw, line, file } = props.frame;
- const couldNavToFile = line && file;
-
- const onClick = (): void => {
- if (line && file) {
- navToCode(file, line - 1);
- }
- };
-
- return (
-
- {raw}
-
- );
-};
diff --git a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/tables/OperationTable.tsx b/plugins/tensorboard-plugins/tb_plugin/fe/src/components/tables/OperationTable.tsx
deleted file mode 100644
index 1ce77ee817967ee69961ccd8c91dbc3b0357bed7..0000000000000000000000000000000000000000
--- a/plugins/tensorboard-plugins/tb_plugin/fe/src/components/tables/OperationTable.tsx
+++ /dev/null
@@ -1,105 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------
- * Copyright (c) 2023, Huawei Technologies.
- * All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Modifications: Add visualization of PyTorch Ascend profiling.
- *--------------------------------------------------------------------------------------------*/
-
-import * as React from 'react';
-import { makeStyles } from '@material-ui/core/styles';
-import { OperationTableData, OperationTableDataInner, TableMetadata } from '../../api';
-import { OperationGroupBy } from '../../constants/groupBy';
-import { attachId, getCommonOperationColumns } from './common';
-import { Table, TableProps } from 'antd';
-import { makeExpandIcon } from './ExpandIcon';
-import { CallStackTable } from './CallStackTable';
-
-export interface IProps {
- data: OperationTableData;
- run: string;
- worker: string;
- span: string;
- groupBy: OperationGroupBy;
- sortColumn: string;
- tooltips?: any;
- deviceTarget: string;
-}
-
-const useStyles = makeStyles((theme) => ({
- tooltip: {
- whiteSpace: 'pre-wrap',
- },
-}));
-
-const rowExpandable = (record: OperationTableDataInner): boolean => record.has_call_stack;
-const expandIcon = makeExpandIcon('View CallStack', (record) => !record.has_call_stack);
-export const OperationTable = (props: IProps): React.JSX.Element => {
- const { data, run, worker, span, groupBy, sortColumn, tooltips, deviceTarget } = props;
- const classes = useStyles(props);
-
- const rows = React.useMemo(() => attachId(data), [data]);
-
- const columns = React.useMemo(
- () => getCommonOperationColumns(rows, deviceTarget, sortColumn, tooltips, classes),
- [rows]
- );
-
- const [pageSize, setPageSize] = React.useState(30);
- const onShowSizeChange = (current: number, size: number): void => {
- setPageSize(size);
- };
-
- const expandIconColumnIndex = columns.length;
- const expandedRowRender = React.useCallback(
- (record: OperationTableDataInner) => (
-