Merge branch 'dev' of github.com:AMDResearch/omniperf into 69-merge-roofline-modules

Signed-off-by: coleramos425 <colramos@amd.com>


[ROCm/rocprofiler-compute commit: fb4b21380d]
This commit is contained in:
coleramos425
2023-01-25 15:39:16 -06:00
commit 9cf840dd1e
30 muutettua tiedostoa jossa 1175 lisäystä ja 494 poistoa
@@ -1,4 +1,4 @@
-- Crusher-specific additions
depends_on "cray-python"
depends_on "rocm"
prereq(atleast("rocm","5.1.0"))
prereq(atleast("rocm","5.2.0"))
@@ -1,6 +1,6 @@
-- Thera-specific additions
depends_on "python"
depends_on "rocm"
prereq(atleast("rocm","5.1.0"))
prereq(atleast("rocm","5.2.0"))
local home = os.getenv("HOME")
setenv("MPLCONFIGDIR",pathJoin(home,".matplotlib"))
@@ -31,7 +31,7 @@ OMNIPERF_HOME = Path(__file__).resolve().parent
# OMNIPERF INFO
PROG = "omniperf"
SOC_LIST = ["mi50", "mi100", "mi200"]
SOC_LIST = ["mi50", "mi100", "mi200", "vega10"]
DISTRO_MAP = {"platform:el8": "rhel8", "15.3": "sle15sp3", "20.04": "ubuntu20_04"}
@@ -0,0 +1,725 @@
# Analysis
```eval_rst
.. toctree::
:glob:
:maxdepth: 4
```
Omniperf offers several ways to interact with the metrics it generates from profiling. The option you choose will likey be influnced by your familiarity with the profiled application, computing enviroment, and experience with Omniperf.
While analyzing with the CLI offers quick and straightforward access to Omniperf metrics from terminal, the GUI adds an extra layer of styling and interactiveness some users may prefer.
See sections below for more information on each.
## CLI Analysis
> Profiling results from the [aforementioned vcopy workload](https://amdresearch.github.io/omniperf/profiling.html#workload-compilation) will be used in the following sections to demonstrate the use of Omniperf in MI GPU performance analysis. Unless otherwise noted, the performance analysis is done on the MI200 platform.
### Features
- All Omniperf built-in metrics.
- Multiple runs base line comparison.
- Metrics customization: pick up subset of build-in metrics or build your own profiling configuration.
- Kernel, gpu-id, dispatch-id filters.
Run `omniperf analyze -h` for more details.
### Recommended workflow
1) Do a comprehensive analysis with Omniperf CLI at the beginning.
```shell
$ omniperf analyze -p workloads/vcopy/mi200/
--------
Analyze
--------
--------------------------------------------------------------------------------
0. Top Stat
╒════╤══════════════════════════════════════════╤═════════╤═══════════╤════════════╤══════════════╤════════╕
│ │ KernelName │ Count │ Sum(ns) │ Mean(ns) │ Median(ns) │ Pct │
╞════╪══════════════════════════════════════════╪═════════╪═══════════╪════════════╪══════════════╪════════╡
0 │ vecCopy(double*, double*, double*, int, │ 1 │ 20000.00 │ 20000.00 │ 20000.00 │ 100.00 │
│ │ int) [clone .kd] │ │ │ │ │ │
╘════╧══════════════════════════════════════════╧═════════╧═══════════╧════════════╧══════════════╧════════╛
--------------------------------------------------------------------------------
1. System Info
╒══════════════════╤═══════════════════════════════════════════════╕
│ │ Info │
╞══════════════════╪═══════════════════════════════════════════════╡
│ workload_name │ vcopy │
├──────────────────┼───────────────────────────────────────────────┤
command │ /home/colramos/vcopy 1048576 256
├──────────────────┼───────────────────────────────────────────────┤
│ host_name │ sv-pdp-2 │
├──────────────────┼───────────────────────────────────────────────┤
│ host_cpu │ AMD EPYC 7282 16-Core Processor │
├──────────────────┼───────────────────────────────────────────────┤
│ host_distro │ Ubuntu 20.04.3 LTS │
├──────────────────┼───────────────────────────────────────────────┤
│ host_kernel │ 5.15.0-43-generic │
├──────────────────┼───────────────────────────────────────────────┤
│ host_rocmver │ 5.2.1-79 │
├──────────────────┼───────────────────────────────────────────────┤
│ date │ Fri Jan 20 11:22:20 2023 (CST)
├──────────────────┼───────────────────────────────────────────────┤
│ gpu_soc │ gfx90a │
├──────────────────┼───────────────────────────────────────────────┤
│ numSE │ 8
├──────────────────┼───────────────────────────────────────────────┤
│ numCU │ 104
├──────────────────┼───────────────────────────────────────────────┤
│ numSIMD │ 4
├──────────────────┼───────────────────────────────────────────────┤
│ waveSize │ 64
├──────────────────┼───────────────────────────────────────────────┤
│ maxWavesPerCU │ 32
├──────────────────┼───────────────────────────────────────────────┤
│ maxWorkgroupSize │ 1024
├──────────────────┼───────────────────────────────────────────────┤
│ L1 │ 16
├──────────────────┼───────────────────────────────────────────────┤
│ L2 │ 8192
├──────────────────┼───────────────────────────────────────────────┤
│ sclk │ 1700
├──────────────────┼───────────────────────────────────────────────┤
│ mclk │ 1600
├──────────────────┼───────────────────────────────────────────────┤
│ cur_sclk │ 800
├──────────────────┼───────────────────────────────────────────────┤
│ cur_mclk │ 1600
├──────────────────┼───────────────────────────────────────────────┤
│ L2Banks │ 32
├──────────────────┼───────────────────────────────────────────────┤
│ name │ mi200 │
├──────────────────┼───────────────────────────────────────────────┤
│ numSQC │ 56
├──────────────────┼───────────────────────────────────────────────┤
│ hbmBW │ 1638.4 │
├──────────────────┼───────────────────────────────────────────────┤
│ ip_blocks │ roofline|SQ|LDS|SQC|TA|TD|TCP|TCC|SPI|CPC|CPF │
╘══════════════════╧═══════════════════════════════════════════════╛
--------------------------------------------------------------------------------
2. System Speed-of-Light
....
```
2. Use `--list-metrics` to generate a list of availible metrics for inspection
```shell
$ omniperf analyze -p workloads/vcopy/mi200/ --list-metrics gfx90a
╒═════════╤═════════════════════════════╕
│ │ Metric │
╞═════════╪═════════════════════════════╡
│ 0 │ Top Stat │
├─────────┼─────────────────────────────┤
│ 1 │ System Info │
├─────────┼─────────────────────────────┤
│ 2.1.0 │ VALU_FLOPs │
├─────────┼─────────────────────────────┤
│ 2.1.1 │ VALU_IOPs │
├─────────┼─────────────────────────────┤
│ 2.1.2 │ MFMA_FLOPs_(BF16) │
├─────────┼─────────────────────────────┤
│ 2.1.3 │ MFMA_FLOPs_(F16) │
├─────────┼─────────────────────────────┤
│ 2.1.4 │ MFMA_FLOPs_(F32) │
├─────────┼─────────────────────────────┤
│ 2.1.5 │ MFMA_FLOPs_(F64) │
├─────────┼─────────────────────────────┤
│ 2.1.6 │ MFMA_IOPs_(Int8) │
├─────────┼─────────────────────────────┤
│ 2.1.7 │ Active_CUs │
├─────────┼─────────────────────────────┤
│ 2.1.8 │ SALU_Util │
├─────────┼─────────────────────────────┤
│ 2.1.9 │ VALU_Util │
├─────────┼─────────────────────────────┤
│ 2.1.10 │ MFMA_Util │
├─────────┼─────────────────────────────┤
│ 2.1.11 │ VALU_Active_Threads/Wave │
├─────────┼─────────────────────────────┤
│ 2.1.12 │ IPC_-_Issue │
├─────────┼─────────────────────────────┤
│ 2.1.13 │ LDS_BW │
├─────────┼─────────────────────────────┤
│ 2.1.14 │ LDS_Bank_Conflict │
├─────────┼─────────────────────────────┤
│ 2.1.15 │ Instr_Cache_Hit_Rate │
├─────────┼─────────────────────────────┤
│ 2.1.16 │ Instr_Cache_BW │
├─────────┼─────────────────────────────┤
│ 2.1.17 │ Scalar_L1D_Cache_Hit_Rate │
├─────────┼─────────────────────────────┤
│ 2.1.18 │ Scalar_L1D_Cache_BW │
├─────────┼─────────────────────────────┤
│ 2.1.19 │ Vector_L1D_Cache_Hit_Rate │
├─────────┼─────────────────────────────┤
│ 2.1.20 │ Vector_L1D_Cache_BW │
├─────────┼─────────────────────────────┤
│ 2.1.21 │ L2_Cache_Hit_Rate │
├─────────┼─────────────────────────────┤
│ 2.1.22 │ L2-Fabric_Read_BW │
├─────────┼─────────────────────────────┤
│ 2.1.23 │ L2-Fabric_Write_BW │
├─────────┼─────────────────────────────┤
│ 2.1.24 │ L2-Fabric_Read_Latency │
├─────────┼─────────────────────────────┤
│ 2.1.25 │ L2-Fabric_Write_Latency │
├─────────┼─────────────────────────────┤
...
```
2. Choose your own customized subset of metrics with `-b` (a.k.a. `--filter-metrics`), or build your own config following [config_template](https://github.com/AMDResearch/omniperf/blob/main/src/omniperf_analyze/configs/panel_config_template.yaml). Below we'll inspect block 2 (a.k.a. System Speed-of-Light).
```shell
$ omniperf analyze -p workloads/vcopy/mi200/ -b 2
--------
Analyze
--------
--------------------------------------------------------------------------------
0. Top Stat
╒════╤══════════════════════════════════════════╤═════════╤═══════════╤════════════╤══════════════╤════════╕
│ │ KernelName │ Count │ Sum(ns) │ Mean(ns) │ Median(ns) │ Pct │
╞════╪══════════════════════════════════════════╪═════════╪═══════════╪════════════╪══════════════╪════════╡
│ 0 │ vecCopy(double*, double*, double*, int, │ 1 │ 20000.00 │ 20000.00 │ 20000.00 │ 100.00 │
│ │ int) [clone .kd] │ │ │ │ │ │
╘════╧══════════════════════════════════════════╧═════════╧═══════════╧════════════╧══════════════╧════════╛
--------------------------------------------------------------------------------
2. System Speed-of-Light
╒═════════╤═══════════════════════════╤═══════════════════════╤══════════════════╤════════════════════╤════════════════════════╕
│ Index │ Metric │ Value │ Unit │ Peak │ PoP │
╞═════════╪═══════════════════════════╪═══════════════════════╪══════════════════╪════════════════════╪════════════════════════╡
│ 2.1.0 │ VALU FLOPs │ 0.0 │ Gflop │ 22630.4 │ 0.0 │
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
│ 2.1.1 │ VALU IOPs │ 367.0016 │ Giop │ 22630.4 │ 1.6217194570135745 │
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
│ 2.1.2 │ MFMA FLOPs (BF16) │ 0.0 │ Gflop │ 90521.6 │ 0.0 │
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
│ 2.1.3 │ MFMA FLOPs (F16) │ 0.0 │ Gflop │ 181043.2 │ 0.0 │
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
│ 2.1.4 │ MFMA FLOPs (F32) │ 0.0 │ Gflop │ 45260.8 │ 0.0 │
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
│ 2.1.5 │ MFMA FLOPs (F64) │ 0.0 │ Gflop │ 45260.8 │ 0.0 │
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
│ 2.1.6 │ MFMA IOPs (Int8) │ 0.0 │ Giop │ 181043.2 │ 0.0 │
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
│ 2.1.7 │ Active CUs │ 74 │ Cus │ 104 │ 71.15384615384616 │
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
│ 2.1.8 │ SALU Util │ 4.016057506716307 │ Pct │ 100 │ 4.016057506716307 │
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
│ 2.1.9 │ VALU Util │ 5.737225009594725 │ Pct │ 100 │ 5.737225009594725 │
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
│ 2.1.10 │ MFMA Util │ 0.0 │ Pct │ 100 │ 0.0 │
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
│ 2.1.11 │ VALU Active Threads/Wave │ 64.0 │ Threads │ 64 │ 100.0 │
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
│ 2.1.12 │ IPC - Issue │ 1.0 │ Instr/cycle │ 5 │ 20.0 │
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
│ 2.1.13 │ LDS BW │ 0.0 │ Gb/sec │ 22630.4 │ 0.0 │
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
│ 2.1.14 │ LDS Bank Conflict │ │ Conflicts/access │ 32 │ │
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
│ 2.1.15 │ Instr Cache Hit Rate │ 99.91306912556854 │ Pct │ 100 │ 99.91306912556854 │
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
│ 2.1.16 │ Instr Cache BW │ 209.7152 │ Gb/s │ 6092.8 │ 3.442016806722689 │
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
│ 2.1.17 │ Scalar L1D Cache Hit Rate │ 99.81986908342313 │ Pct │ 100 │ 99.81986908342313 │
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
│ 2.1.18 │ Scalar L1D Cache BW │ 209.7152 │ Gb/s │ 6092.8 │ 3.442016806722689 │
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
│ 2.1.19 │ Vector L1D Cache Hit Rate │ 50.0 │ Pct │ 100 │ 50.0 │
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
│ 2.1.20 │ Vector L1D Cache BW │ 1677.7216 │ Gb/s │ 11315.199999999999 │ 14.82714932126697 │
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
│ 2.1.21 │ L2 Cache Hit Rate │ 35.55067615693325 │ Pct │ 100 │ 35.55067615693325 │
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
│ 2.1.22 │ L2-Fabric Read BW │ 419.8496 │ Gb/s │ 1638.4 │ 25.6255859375 │
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
│ 2.1.23 │ L2-Fabric Write BW │ 293.9456 │ Gb/s │ 1638.4 │ 17.941015625 │
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
│ 2.1.24 │ L2-Fabric Read Latency │ 256.6482321288385 │ Cycles │ │ │
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
│ 2.1.25 │ L2-Fabric Write Latency │ 317.2264255699014 │ Cycles │ │ │
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
│ 2.1.26 │ Wave Occupancy │ 1821.723057333852 │ Wavefronts │ 3328 │ 54.73927455931046 │
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
│ 2.1.27 │ Instr Fetch BW │ 4.174722306564298e-08 │ Gb/s │ 3046.4 │ 1.3703789084047721e-09 │
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
│ 2.1.28 │ Instr Fetch Latency │ 21.729248046875 │ Cycles │ │ │
╘═════════╧═══════════════════════════╧═══════════════════════╧══════════════════╧════════════════════╧════════════════════════╛
```
> **Note:** Some cells may be blank indicating a missing/unavailible hardware counter or NULL value
3. Quick optimization iterations and profiling with customized metrics.
4. Redo a comprehensive analysis with Omniperf CLI at any milestone or at the end.
### Demo
- Single run
```shell
$ omniperf analyze -p path/to/profiling/results/
```
- List top kernels
```shell
$ omniperf analyze -p path/to/profiling/results/ --list-kernels
```
- List metrics
```shell
omniperf analyze -p path/to/profiling/results/ --list-metrics gfx90a
```
- Customized profiling "System Speed-of-Light" and "CS_Busy" only
```shell
omniperf analyze -p path/to/profiling/results/ -b 2 5.1.0
```
Note: People can filter single metric or the whole IP block by its id.
In this case, 1 is the id for "system speed of light" and 5.1.0 the id for metric "GPU Busy Cycles".
- Multiple runs
```shell
omniperf analyze -p workload1/path/ -p workload2/path/
```
- Filter kernels
```shell
omniperf analyze -p workload1/path/ -k 0 -p workload2/path/ -k 0
```
## GUI Analysis
### Web-based GUI
#### Features
Omniperf's standalone GUI analyzer is a lightweight web page that can
be generated directly from the command-line. This option is provided
as an alternative for users wanting to explore profiling results
graphically, but without the additional setup requirements or
server-side overhead of Omniperf's detailed [Grafana
interface](https://amdresearch.github.io/omniperf/analysis.html#grafana-based-gui)
option. The standalone GUI analyzer is provided as simple
[Flask](https://flask.palletsprojects.com/en/2.2.x/) application
allowing users to view results from within a web browser.
```{admonition} Port forwarding
Note that the standalone GUI analyzer publishes a web interface on port 8050 by default.
On production HPC systems where profiling jobs run
under the auspices of a resource manager, additional ssh tunneling
between the desired web browser host (e.g. login node or remote workstation) and compute host may be
required. Alternatively, users may find it more convenient to download
profiled workloads to perform analysis on their local system.
```
#### Usage
To launch the standalone GUI, include the `--gui` flag with your desired analysis command. For example:
```bash
$ omniperf analyze -p workloads/vcopy/mi200/ --gui
--------
Analyze
--------
Dash is running on http://0.0.0.0:8050/
* Serving Flask app 'omniperf_analyze.omniperf_analyze' (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
* Running on all addresses (0.0.0.0)
WARNING: This is a development server. Do not use it in a production deployment.
* Running on http://127.0.0.1:8050
* Running on http://10.228.32.139:8050 (Press CTRL+C to quit)
```
At this point, users can then launch their web browser of choice and
go to http://localhost:8050/ to see an analysis page.
![Standalone GUI Homepage](images/standalone_gui.png)
```{tip}
To launch the web application on a port other than 8050, include an optional port argument:
`--gui <desired port>`
```
When no filters are applied, users will see five basic sections derived from their application's profiling data:
1. Memory Chart Analysis
2. Empirical Roofline Analysis
3. Top Stats (Top Kernel Statistics)
4. System Info
5. System Speed-of-Light
To dive deeper, use the top drop down menus to isolate particular
kernel(s) or dispatch(s). You will then see the web page update with
metrics specific to the filter you've applied.
Once you have applied a filter, you will also see several additional
sections become available with detailed metrics specific to that area
of AMD hardware. These detailed sections mirror the data displayed in
Omniperf's [Grafana
interface](https://amdresearch.github.io/omniperf/analysis.html#grafana-based-gui).
### Grafana-based GUI
#### Features
The Omniperf Grafana GUI Analyzer supports the following features to facilitate MI GPU performance profiling and analysis:
- System and IP-Block Speed-of-Light (SOL)
- Multiple normalization options, including per-cycle, per-wave, per-kernel and per-second.
- Baseline comparisons
- Regex based Dispatch ID filtering
- Roofline Analysis
- Detailed per IP Block performance counters and metrics
- CPC/CPF
- SPI
- SQ
- SQC
- TA/TD
- TCP
- TCC (both aggregated and per-channel perf info)
##### Speed-of-Light
Speed-of-light panels are provided at both the system and per IP block level to help diagnosis performance bottlenecks. The performance numbers of the workload under testing are compared to the theoretical maximum, (e.g. floating point operations, bandwidth, cache hit rate, etc.), to indicate the available room to further utilize the hardware capability.
##### Multi Normalization
Multiple performance number normalizations are provided to allow performance inspection within both HW and SW context. The following normalizations are permitted:
- per cycle
- per wave
- per kernel
- per second
##### Baseline Comparison
Omniperf enables baseline comparison to allow checking A/B effect. The current release limits the baseline comparison to the same SoC. Cross comparison between SoCs is in development.
For both the Current Workload and the Baseline Workload, one can independently setup the following filters to allow fine grained comparions:
- Workload Name
- GPU ID filtering (multi selection)
- Kernel Name filtering (multi selection)
- Dispatch ID filtering (Regex filtering)
- Omniperf Panels (multi selection)
##### Regex based Dispatch ID filtering
This release enables regex based dispatch ID filtering to flexibly choose the kernel invocations. One may refer to [Regex Numeric Range Generator](https://3widgets.com/), to generate typical number ranges.
For example, if one wants to inspect Dispatch Range from 17 to 48, inclusive, the corresponding regex is : **(1[7-9]|[23]\d|4[0-8])**. The generated express can be copied over for filtering.
##### Incremental Profiling
Omniperf supports incremental profiling to significantly speed up performance analysis.
> Refer to [*IP Block profiling*](https://amdresearch.github.io/omniperf/profiling.html#ip-block-profiling) section for this command.
By default, the entire application is profiled to collect perfmon counter for all IP blocks, giving a system level view of where the workload stands in terms of performance optimization opportunities and bottlenecks.
After that one may focus on only a few IP blocks, (e.g., L1 Cache or LDS) to closely check the effect of software optimizations, without performing application replay for all other IP Blocks. This saves lots of compute time. In addition, the prior profiling results for other IP blocks are not overwritten. Instead, they can be merged during the import to piece together the system view.
##### Color Coding
The uniform color coding is applied to most visualizations (bars, table, diagrams etc). Typically, Yellow color means over 50%, while Red color mean over 90% percent, for easy inspection.
##### Global Variables and Configurations
![Grafana GUI Global Variables](images/global_variables.png)
#### Grafana GUI Import
The omniperf database `--import` option imports the raw profiling data to Grafana's backend MongoDB database. This step is only required for Grafana GUI based performance analysis.
Default username and password for MongoDB (to be used in database mode) are as follows:
- Username: **temp**
- Password: **temp123**
Each workload is imported to a separate database with the following naming convention:
omniperf_<team>_<database>_<soc>
e.g., omniperf_asw_vcopy_mi200.
Below is the sample command to import the *vcopy* profiling data.
```shell
$ omniperf database --help
ROC Profiler: /usr/bin/rocprof
usage:
omniperf database <interaction type> [connection options]
-------------------------------------------------------------------------------
Examples:
omniperf database --import -H pavii1 -u temp -t asw -w workloads/vcopy/mi200/
omniperf database --remove -H pavii1 -u temp -w omniperf_asw_sample_mi200
-------------------------------------------------------------------------------
Help:
-h, --help show this help message and exit
General Options:
-v, --version show program's version number and exit
-V, --verbose Increase output verbosity
Interaction Type:
-i, --import Import workload to Omniperf DB
-r, --remove Remove a workload from Omniperf DB
Connection Options:
-H , --host Name or IP address of the server host.
-P , --port TCP/IP Port. (DEFAULT: 27018)
-u , --username Username for authentication.
-p , --password The user's password. (will be requested later if it's not set)
-t , --team Specify Team prefix.
-w , --workload Specify name of workload (to remove) or path to workload (to import)
-k , --kernelVerbose Specify Kernel Name verbose level 1-5.
Lower the level, shorter the kernel name. (DEFAULT: 2) (DISABLE: 5)
```
**omniperf import for vcopy:**
```shell
$ omniperf database --import -H pavii1 -u temp -t asw -w workloads/vcopy/mi200/
ROC Profiler: /usr/bin/rocprof
--------
Import Profiling Results
--------
Pulling data from /home/amd/xlu/test/workloads/vcopy/mi200
The directory exists
Found sysinfo file
KernelName shortening enabled
Kernel name verbose level: 2
Password:
Password recieved
-- Conversion & Upload in Progress --
0%| | 0/11 [00:00<?, ?it/s]/home/amd/xlu/test/workloads/vcopy/mi200/SQ_IFETCH_LEVEL.csv
9%|█████████████████▉ | 1/11 [00:00<00:01, 8.53it/s]/home/amd/xlu/test/workloads/vcopy/mi200/pmc_perf.csv
18%|███████████████████████████████████▊ | 2/11 [00:00<00:01, 6.99it/s]/home/amd/xlu/test/workloads/vcopy/mi200/SQ_INST_LEVEL_SMEM.csv
27%|█████████████████████████████████████████████████████▋ | 3/11 [00:00<00:01, 7.90it/s]/home/amd/xlu/test/workloads/vcopy/mi200/SQ_LEVEL_WAVES.csv
36%|███████████████████████████████████████████████████████████████████████▋ | 4/11 [00:00<00:00, 8.56it/s]/home/amd/xlu/test/workloads/vcopy/mi200/SQ_INST_LEVEL_LDS.csv
45%|█████████████████████████████████████████████████████████████████████████████████████████▌ | 5/11 [00:00<00:00, 9.00it/s]/home/amd/xlu/test/workloads/vcopy/mi200/SQ_INST_LEVEL_VMEM.csv
55%|███████████████████████████████████████████████████████████████████████████████████████████████████████████▍ | 6/11 [00:00<00:00, 9.24it/s]/home/amd/xlu/test/workloads/vcopy/mi200/sysinfo.csv
64%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▎ | 7/11 [00:00<00:00, 9.37it/s]/home/amd/xlu/test/workloads/vcopy/mi200/roofline.csv
82%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏ | 9/11 [00:00<00:00, 12.60it/s]/home/amd/xlu/test/workloads/vcopy/mi200/timestamps.csv
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 11/11 [00:00<00:00, 11.05it/s]
9 collections added.
Workload name uploaded
-- Complete! --
```
#### Omniperf Panels
##### Overview
There are currently 18 main panel categories available for analyzing the compute workload performance. Each category contains several panels for close inspection of the system performance.
- Kernel Statistics
- Kernel time histogram
- Top Ten bottleneck kernels
- System Speed-of-Light
- Speed-of-Light
- System Info table
- Memory Chart Analysis
- Roofline Analysis
- FP32/FP64
- FP16/INT8
- Command Processor
- Command Processor - Fetch (CPF)
- Command Processor - Controller (CPC)
- Shader Processing Input (SPI)
- SPI Stats
- SPI Resource Allocations
- Wavefront Launch
- Wavefront Launch Stats
- Wavefront runtime stats
- per-SE Wavefront Scheduling performance
- Wavefront Lifetime
- Wavefront lifetime breakdown
- per-SE wavefront life (average)
- per-SE wavefront life (histogram)
- Wavefront Occupancy
- per-SE wavefront occupancy
- per-CU wavefront occupancy
- Compute Unit - Instruction Mix
- per-wave Instruction mix
- per-wave VALU Arithmetic instruction mix
- per-wave MFMA Arithmetic instruction mix
- Compute Unit - Compute Pipeline
- Speed-of-Light: Compute Pipeline
- Arithmetic OPs count
- Compute pipeline stats
- Memory latencies
- Local Data Share (LDS)
- Speed-of-Light: LDS
- LDS stats
- Instruction Cache
- Speed-of-Light: Instruction Cache
- Instruction Cache Accesses
- Constant Cache
- Speed-of-Light: Constant Cache
- Constant Cache Accesses
- Constant Cache - L2 Interface stats
- Texture Address and Texture Data
- Texture Address (TA)
- Texture Data (TD)
- L1 Cache
- Speed-of-Light: L1 Cache
- L1 Cache Accesses
- L1 Cache Stalls
- L1 - L2 Transactions
- L1 - UTCL1 Interface stats
- L2 Cache
- Speed-of-Light: L2 Cache
- L2 Cache Accesses
- L2 - EA Transactions
- L2 - EA Stalls
- L2 Cache Per Channel Performance
- Per-channel L2 Hit rate
- Per-channel L1-L2 Read requests
- Per-channel L1-L2 Write Requests
- Per-channel L1-L2 Atomic Requests
- Per-channel L2-EA Read requests
- Per-channel L2-EA Write requests
- Per-channel L2-EA Atomic requests
- Per-channel L2-EA Read latency
- Per-channel L2-EA Write latency
- Per-channel L2-EA Atomic latency
- Per-channel L2-EA Read stall (I/O, GMI, HBM)
- Per-channel L2-EA Write stall (I/O, GMI, HBM, Starve)
Most panels are designed around a specific IP block to thoroughly understand its behavior. Additional panels, including custom panels, could also be added to aid the performance analysis.
##### System Info Panel
![System Info Panel](images/System_info_panel.png)
##### Kernel Statistics
###### Kernel Time Histogram
![Kernel Time Histogram](images/Kernel_time_histogram.png)
###### Top Bottleneck Kernels
![Top Bottleneck Kernels](images/Top_bottleneck_kernels.png)
###### Top Bottleneck Dispatches
![Top Bottleneck Dispatches](images/Top_bottleneck_dispatches.png)
###### Current and Baseline Dispatch IDs (Filtered)
![Current and Baseline Dispatch IDs](images/Current_and_baseline_dispatch_ids.png)
##### System Speed-of-Light
![System Speed-of-Light](images/System_speed_of_light.png)
##### Memory Chart Analysis
> Note: The Memory Chart Analysis support multiple normalizations. Due to the space limit, all transactions, when normalized to per-sec, default to unit of Billion transactions per second.
![Memory Chart Analysis](images/Memory_chart_analysis.png)
##### Roofline Analysis
![Roofline Analysis](images/Roofline_analysis.png)
##### Command Processor
![Command Processor](images/Command_processor.png)
##### Shader Processing Input (SPI)
![Shader Processing Input](images/Shader_processing_input.png)
##### Wavefront Launch
![Wavefront Launch](images/Wavefront_launch.png)
##### Compute Unit - Instruction Mix
###### Instruction Mix
![Instruction Mix](images/Instruction_mix.png)
###### VALU Arithmetic Instruction Mix
![VALU Arithmetic Instruction Mix](images/VALU_arithmetic_instruction_mix.png)
###### MFMA Arithmetic Instruction Mix
![MFMA Arithmetic Instruction Mix](images/MFMA_arithmetic_instruction_mix.png)
###### VMEM Arithmetic Instruction Mix
![VMEM Arithmetic Instruction Mix](images/VMEM_arithmetic_intensity_mix.png)
##### Compute Unit - Compute Pipeline
###### Speed-of-Light
![Speed-of-Light](images/Comp_pipe_sol.png)
###### Compute Pipeline Stats
![Compute Pipeline Stats](images/Compute_pipeline_stats.png)
###### Arithmetic Operations
![Arithmetic Operations](images/Arithmetic_operations.png)
###### Memory Latencies
![Memory Latencies](images/Memory_latencies.png)
##### Local Data Share (LDS)
###### Speed-of-Light
![Speed-of-Light](images/LDS_sol.png)
###### LDS Stats
![LDS Stats](images/LDS_stats.png)
##### Instruction Cache
###### Speed-of-Light
![Speed-of-Light](images/Instruc_cache_sol.png)
###### Instruction Cache Stats
![Instruction Cache Stats](images/Instruction_cache_stats.png)
##### Scalar L1D Cache
###### Speed-of-Light
![](images/L1D_sol.png)
###### Constant Cache Stats
![Constant Cache Stats](images/Vec_L1D_cache_accesses.png)
###### Constant Cache - L2 Interface
![Constant Cache - L2 Interface](images/Constant_cache_l2_interface.png)
##### Texture Address and Texture Data
###### Texture Address (TA)
![Texture Address](images/Texture_address.png)
###### Texture Data (TD)
![Texture Data](images/Texture_data.png)
##### Vector L1D Cache
###### Speed-of-Light
![Speed-of-Light](images/Vec_L1D_cache_sol.png)
###### Vector L1D Cache Accesses
![Vector L1D Cache Accesses](images/Vec_L1D_cache_accesses.png)
###### L1 Cache Stalls
![L1 Cache Stalls](images/L1_cache_stalls.png)
###### L1 - L2 Transactions
![L1 - L2 Transactions](images/L1_l2_transactions.png)
###### L1 - UTCL1 Interface Stats
![L1 - UTCL1 Interface Stats](images/L1_utcl1_transactions.png)
##### L2 Cache
###### Speed-of-Light
![Speed-of-Light](images/L2_cache_sol.png)
###### L2 Cache Accesses
![L2 Cache Accesses](images/L2_cache_accesses.png)
###### L2 - EA Transactions
![L2 - EA Transactions](images/L2_ea_transactions.png)
###### L2 - EA Stalls
![L2 - EA Stalls](images/L2_ea_stalls.png)
##### L2 Cache Per Channel Performance
###### L1-L2 Transactions
![L1-L2 Transactions](images/L1_l2_transactions_per_channel.png)
###### L2-EA Transactions
![L2-EA Transactions](images/L2_ea_transactions_per_channel.png)
###### L2-EA Latencies
![L2-EA Latencies](images/L2_ea_latencies_per_channel.png)
###### L2-EA Stalls
![L2-EA Stalls](images/L2_ea_stalls_per_channel.png)
###### L2-EA Write Stalls
![L2-EA Write Stalls](images/L2_ea_write_stalls_per_channel.png)
###### L2-EA Write Starvation
![L2-EA Write Starvation](images/L2_ea_write_starvation_per_channel.png)
@@ -70,7 +70,7 @@ Modes change the fundamental behavior of the Omniperf command line tool. Dependi
- **Database**: Our detailed Grafana GUI is built on a MongoDB database. `--import` profiling results to the DB to interact with the workload in Grafana or `--remove` the workload from the DB.
Connection options will need to be specified. See the [*Grafana
Analysis*](grafana_analyzer.md#grafana-gui-import) import section
Analysis*](https://amdresearch.github.io/omniperf/analysis.html#grafana-gui-import) import section
for more details on this.
```shell
@@ -1,352 +0,0 @@
# Grafana-based Analysis
```eval_rst
.. toctree::
:glob:
:maxdepth: 4
```
## Features
The Omniperf Grafana GUI Analyzer supports the following features to facilitate MI GPU performance profiling and analysis:
- System and IP-Block Speed-of-Light (SOL)
- Multiple normalization options, including per-cycle, per-wave, per-kernel and per-second.
- Baseline comparisons
- Regex based Dispatch ID filtering
- Roofline Analysis
- Detailed per IP Block performance counters and metrics
- CPC/CPF
- SPI
- SQ
- SQC
- TA/TD
- TCP
- TCC (both aggregated and per-channel perf info)
### Speed-of-Light
Speed-of-light panels are provided at both the system and per IP block level to help diagnosis performance bottlenecks. The performance numbers of the workload under testing are compared to the theoretical maximum, (e.g. floating point operations, bandwidth, cache hit rate, etc.), to indicate the available room to further utilize the hardware capability.
### Multi Normalization
Multiple performance number normalizations are provided to allow performance inspection within both HW and SW context. The following normalizations are permitted:
- per cycle
- per wave
- per kernel
- per second
### Baseline Comparison
Omniperf enables baseline comparison to allow checking A/B effect. The current release limits the baseline comparison to the same SoC. Cross comparison between SoCs is in development.
For both the Current Workload and the Baseline Workload, one can independently setup the following filters to allow fine grained comparions:
- Workload Name
- GPU ID filtering (multi selection)
- Kernel Name filtering (multi selection)
- Dispatch ID filtering (Regex filtering)
- Omniperf Panels (multi selection)
### Regex based Dispatch ID filtering
This release enables regex based dispatch ID filtering to flexibly choose the kernel invocations. One may refer to [Regex Numeric Range Generator](https://3widgets.com/), to generate typical number ranges.
For example, if one wants to inspect Dispatch Range from 17 to 48, inclusive, the corresponding regex is : **(1[7-9]|[23]\d|4[0-8])**. The generated express can be copied over for filtering.
### Incremental Profiling
Omniperf supports incremental profiling to significantly speed up performance analysis.
> Refer to [*IP Block profiling*](https://amdresearch.github.io/omniperf/performance_analysis.html#ip-block-profiling) section for this command.
By default, the entire application is profiled to collect perfmon counter for all IP blocks, giving a system level view of where the workload stands in terms of performance optimization opportunities and bottlenecks.
After that one may focus on only a few IP blocks, (e.g., L1 Cache or LDS) to closely check the effect of software optimizations, without performing application replay for all other IP Blocks. This saves lots of compute time. In addition, the prior profiling results for other IP blocks are not overwritten. Instead, they can be merged during the import to piece together the system view.
### Color Coding
The uniform color coding is applied to most visualizations (bars, table, diagrams etc). Typically, Yellow color means over 50%, while Red color mean over 90% percent, for easy inspection.
### Global Variables and Configurations
![Grafana GUI Global Variables](images/global_variables.png)
## Grafana GUI Import
The omniperf database `--import` option imports the raw profiling data to Grafana's backend MongoDB database. This step is only required for Grafana GUI based performance analysis.
Default username and password for MongoDB (to be used in database mode) are as follows:
- Username: **temp**
- Password: **temp123**
Each workload is imported to a separate database with the following naming convention:
omniperf_<team>_<database>_<soc>
e.g., omniperf_asw_vcopy_mi200.
Below is the sample command to import the *vcopy* profiling data.
```shell
$ omniperf database --help
ROC Profiler: /usr/bin/rocprof
usage:
omniperf database <interaction type> [connection options]
-------------------------------------------------------------------------------
Examples:
omniperf database --import -H pavii1 -u temp -t asw -w workloads/vcopy/mi200/
omniperf database --remove -H pavii1 -u temp -w omniperf_asw_sample_mi200
-------------------------------------------------------------------------------
Help:
-h, --help show this help message and exit
General Options:
-v, --version show program's version number and exit
-V, --verbose Increase output verbosity
Interaction Type:
-i, --import Import workload to Omniperf DB
-r, --remove Remove a workload from Omniperf DB
Connection Options:
-H , --host Name or IP address of the server host.
-P , --port TCP/IP Port. (DEFAULT: 27018)
-u , --username Username for authentication.
-p , --password The user's password. (will be requested later if it's not set)
-t , --team Specify Team prefix.
-w , --workload Specify name of workload (to remove) or path to workload (to import)
-k , --kernelVerbose Specify Kernel Name verbose level 1-5.
Lower the level, shorter the kernel name. (DEFAULT: 2) (DISABLE: 5)
```
**omniperf import for vcopy:**
```shell
$ omniperf database --import -H pavii1 -u temp -t asw -w workloads/vcopy/mi200/
ROC Profiler: /usr/bin/rocprof
--------
Import Profiling Results
--------
Pulling data from /home/amd/xlu/test/workloads/vcopy/mi200
The directory exists
Found sysinfo file
KernelName shortening enabled
Kernel name verbose level: 2
Password:
Password recieved
-- Conversion & Upload in Progress --
0%| | 0/11 [00:00<?, ?it/s]/home/amd/xlu/test/workloads/vcopy/mi200/SQ_IFETCH_LEVEL.csv
9%|█████████████████▉ | 1/11 [00:00<00:01, 8.53it/s]/home/amd/xlu/test/workloads/vcopy/mi200/pmc_perf.csv
18%|███████████████████████████████████▊ | 2/11 [00:00<00:01, 6.99it/s]/home/amd/xlu/test/workloads/vcopy/mi200/SQ_INST_LEVEL_SMEM.csv
27%|█████████████████████████████████████████████████████▋ | 3/11 [00:00<00:01, 7.90it/s]/home/amd/xlu/test/workloads/vcopy/mi200/SQ_LEVEL_WAVES.csv
36%|███████████████████████████████████████████████████████████████████████▋ | 4/11 [00:00<00:00, 8.56it/s]/home/amd/xlu/test/workloads/vcopy/mi200/SQ_INST_LEVEL_LDS.csv
45%|█████████████████████████████████████████████████████████████████████████████████████████▌ | 5/11 [00:00<00:00, 9.00it/s]/home/amd/xlu/test/workloads/vcopy/mi200/SQ_INST_LEVEL_VMEM.csv
55%|███████████████████████████████████████████████████████████████████████████████████████████████████████████▍ | 6/11 [00:00<00:00, 9.24it/s]/home/amd/xlu/test/workloads/vcopy/mi200/sysinfo.csv
64%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▎ | 7/11 [00:00<00:00, 9.37it/s]/home/amd/xlu/test/workloads/vcopy/mi200/roofline.csv
82%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏ | 9/11 [00:00<00:00, 12.60it/s]/home/amd/xlu/test/workloads/vcopy/mi200/timestamps.csv
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 11/11 [00:00<00:00, 11.05it/s]
9 collections added.
Workload name uploaded
-- Complete! --
```
## Omniperf Panels
### Overview
There are currently 18 main panel categories available for analyzing the compute workload performance. Each category contains several panels for close inspection of the system performance.
- Kernel Statistics
- Kernel time histogram
- Top Ten bottleneck kernels
- System Speed-of-Light
- Speed-of-Light
- System Info table
- Memory Chart Analysis
- Roofline Analysis
- FP32/FP64
- FP16/INT8
- Command Processor
- Command Processor - Fetch (CPF)
- Command Processor - Controller (CPC)
- Shader Processing Input (SPI)
- SPI Stats
- SPI Resource Allocations
- Wavefront Launch
- Wavefront Launch Stats
- Wavefront runtime stats
- per-SE Wavefront Scheduling performance
- Wavefront Lifetime
- Wavefront lifetime breakdown
- per-SE wavefront life (average)
- per-SE wavefront life (histogram)
- Wavefront Occupancy
- per-SE wavefront occupancy
- per-CU wavefront occupancy
- Compute Unit - Instruction Mix
- per-wave Instruction mix
- per-wave VALU Arithmetic instruction mix
- per-wave MFMA Arithmetic instruction mix
- Compute Unit - Compute Pipeline
- Speed-of-Light: Compute Pipeline
- Arithmetic OPs count
- Compute pipeline stats
- Memory latencies
- Local Data Share (LDS)
- Speed-of-Light: LDS
- LDS stats
- Instruction Cache
- Speed-of-Light: Instruction Cache
- Instruction Cache Accesses
- Constant Cache
- Speed-of-Light: Constant Cache
- Constant Cache Accesses
- Constant Cache - L2 Interface stats
- Texture Address and Texture Data
- Texture Address (TA)
- Texture Data (TD)
- L1 Cache
- Speed-of-Light: L1 Cache
- L1 Cache Accesses
- L1 Cache Stalls
- L1 - L2 Transactions
- L1 - UTCL1 Interface stats
- L2 Cache
- Speed-of-Light: L2 Cache
- L2 Cache Accesses
- L2 - EA Transactions
- L2 - EA Stalls
- L2 Cache Per Channel Performance
- Per-channel L2 Hit rate
- Per-channel L1-L2 Read requests
- Per-channel L1-L2 Write Requests
- Per-channel L1-L2 Atomic Requests
- Per-channel L2-EA Read requests
- Per-channel L2-EA Write requests
- Per-channel L2-EA Atomic requests
- Per-channel L2-EA Read latency
- Per-channel L2-EA Write latency
- Per-channel L2-EA Atomic latency
- Per-channel L2-EA Read stall (I/O, GMI, HBM)
- Per-channel L2-EA Write stall (I/O, GMI, HBM, Starve)
Most panels are designed around a specific IP block to thoroughly understand its behavior. Additional panels, including custom panels, could also be added to aid the performance analysis.
### System Info Panel
![System Info Panel](images/System_info_panel.png)
### Kernel Statistics
#### Kernel Time Histogram
![Kernel Time Histogram](images/Kernel_time_histogram.png)
#### Top Bottleneck Kernels
![Top Bottleneck Kernels](images/Top_bottleneck_kernels.png)
#### Top Bottleneck Dispatches
![Top Bottleneck Dispatches](images/Top_bottleneck_dispatches.png)
#### Current and Baseline Dispatch IDs (Filtered)
![Current and Baseline Dispatch IDs](images/Current_and_baseline_dispatch_ids.png)
### System Speed-of-Light
![System Speed-of-Light](images/System_speed_of_light.png)
### Memory Chart Analysis
> Note: The Memory Chart Analysis support multiple normalizations. Due to the space limit, all transactions, when normalized to per-sec, default to unit of Billion transactions per second.
![Memory Chart Analysis](images/Memory_chart_analysis.png)
### Roofline Analysis
![Roofline Analysis](images/Roofline_analysis.png)
### Command Processor
![Command Processor](images/Command_processor.png)
### Shader Processing Input (SPI)
![Shader Processing Input](images/Shader_processing_input.png)
### Wavefront Launch
![Wavefront Launch](images/Wavefront_launch.png)
### Compute Unit - Instruction Mix
#### Instruction Mix
![Instruction Mix](images/Instruction_mix.png)
#### VALU Arithmetic Instruction Mix
![VALU Arithmetic Instruction Mix](images/VALU_arithmetic_instruction_mix.png)
#### MFMA Arithmetic Instruction Mix
![MFMA Arithmetic Instruction Mix](images/MFMA_arithmetic_instruction_mix.png)
#### VMEM Arithmetic Instruction Mix
![VMEM Arithmetic Instruction Mix](images/VMEM_arithmetic_intensity_mix.png)
### Compute Unit - Compute Pipeline
#### Speed-of-Light
![Speed-of-Light](images/Comp_pipe_sol.png)
#### Compute Pipeline Stats
![Compute Pipeline Stats](images/Compute_pipeline_stats.png)
#### Arithmetic Operations
![Arithmetic Operations](images/Arithmetic_operations.png)
#### Memory Latencies
![Memory Latencies](images/Memory_latencies.png)
### Local Data Share (LDS)
#### Speed-of-Light
![Speed-of-Light](images/LDS_sol.png)
#### LDS Stats
![LDS Stats](images/LDS_stats.png)
### Instruction Cache
#### Speed-of-Light
![Speed-of-Light](images/Instruc_cache_sol.png)
#### Instruction Cache Stats
![Instruction Cache Stats](images/Instruction_cache_stats.png)
### Scalar L1D Cache
#### Speed-of-Light
![](images/L1D_sol.png)
#### Constant Cache Stats
![Constant Cache Stats](images/Vec_L1D_cache_accesses.png)
#### Constant Cache - L2 Interface
![Constant Cache - L2 Interface](images/Constant_cache_l2_interface.png)
### Texture Address and Texture Data
#### Texture Address (TA)
![Texture Address](images/Texture_address.png)
#### Texture Data (TD)
![Texture Data](images/Texture_data.png)
### Vector L1D Cache
#### Speed-of-Light
![Speed-of-Light](images/Vec_L1D_cache_sol.png)
#### Vector L1D Cache Accesses
![Vector L1D Cache Accesses](images/Vec_L1D_cache_accesses.png)
#### L1 Cache Stalls
![L1 Cache Stalls](images/L1_cache_stalls.png)
#### L1 - L2 Transactions
![L1 - L2 Transactions](images/L1_l2_transactions.png)
#### L1 - UTCL1 Interface Stats
![L1 - UTCL1 Interface Stats](images/L1_utcl1_transactions.png)
### L2 Cache
#### Speed-of-Light
![Speed-of-Light](images/L2_cache_sol.png)
#### L2 Cache Accesses
![L2 Cache Accesses](images/L2_cache_accesses.png)
#### L2 - EA Transactions
![L2 - EA Transactions](images/L2_ea_transactions.png)
#### L2 - EA Stalls
![L2 - EA Stalls](images/L2_ea_stalls.png)
### L2 Cache Per Channel Performance
#### L1-L2 Transactions
![L1-L2 Transactions](images/L1_l2_transactions_per_channel.png)
#### L2-EA Transactions
![L2-EA Transactions](images/L2_ea_transactions_per_channel.png)
#### L2-EA Latencies
![L2-EA Latencies](images/L2_ea_latencies_per_channel.png)
#### L2-EA Stalls
![L2-EA Stalls](images/L2_ea_stalls_per_channel.png)
#### L2-EA Write Stalls
![L2-EA Write Stalls](images/L2_ea_write_stalls_per_channel.png)
#### L2-EA Write Starvation
![L2-EA Write Starvation](images/L2_ea_write_starvation_per_channel.png)
@@ -10,8 +10,7 @@
high_level_design
installation
getting_started
performance_analysis
standalone_gui_analyzer
grafana_analyzer
profiling
analysis
faq
```
@@ -24,7 +24,7 @@ Omniperf requires the following basic software dependencies prior to usage:
* Python (>=3.7)
* CMake (>= 3.19)
* ROCm (>= 5.1)
* ROCm (>= 5.2.0)
In addition, Omniperf leverages a number of Python packages that are
documented in the top-level `requirements.txt` file. These must be
@@ -1,4 +1,4 @@
# Performance Profiling
# Profiling
```eval_rst
.. toctree::
@@ -1,85 +0,0 @@
# Web-based GUI Analysis
```eval_rst
.. toctree::
:glob:
:maxdepth: 4
```
## Features
Omniperf's standalone GUI analyzer is a lightweight web page that can
be generated directly from the command-line. This option is provided
as an alternative for users wanting to explore profiling results
graphically, but without the additional setup requirements or
server-side overhead of Omniperf's detailed [Grafana
interface](https://amdresearch.github.io/omniperf/grafana_analyzer.html#)
option. The standalone GUI analyzer is provided as simple
[Flask](https://flask.palletsprojects.com/en/2.2.x/) application
allowing users to view results from within a web browser.
```{admonition} Port forwarding
Note that the standalone GUI analyzer publishes a web interface on port 8050 by default.
On production HPC systems where profiling jobs run
under the auspices of a resource manager, additional ssh tunneling
between the desired web browser host (e.g. login node or remote workstation) and compute host may be
required. Alternatively, users may find it more convenient to download
profiled workloads to perform analysis on their local system.
```
## Usage
To launch the standalone GUI, include the `--gui` flag with your desired analysis command. For example:
```bash
$ omniperf analyze -p workloads/vcopy/mi200/ --gui
--------
Analyze
--------
Dash is running on http://0.0.0.0:8050/
* Serving Flask app 'omniperf_analyze.omniperf_analyze' (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
* Running on all addresses (0.0.0.0)
WARNING: This is a development server. Do not use it in a production deployment.
* Running on http://127.0.0.1:8050
* Running on http://10.228.32.139:8050 (Press CTRL+C to quit)
```
At this point, users can then launch their web browser of choice and
go to http://localhost:8050/ to see an analysis page.
![Standalone GUI Homepage](images/standalone_gui.png)
```{tip}
To launch the web application on a port other than 8050, include an optional port argument:
`--gui <desired port>`
```
When no filters are applied, users will see five basic sections derived from their application's profiling data:
1. Memory Chart Analysis
2. Empirical Roofline Analysis
3. Top Stats (Top Kernel Statistics)
4. System Info
5. System Speed-of-Light
To dive deeper, use the top drop down menus to isolate particular
kernel(s) or dispatch(s). You will then see the web page update with
metrics specific to the filter you've applied.
Once you have applied a filter, you will also see several additional
sections become available with detailed metrics specific to that area
of AMD hardware. These detailed sections mirror the data displayed in
Omniperf's [Grafana
interface](https://amdresearch.github.io/omniperf/grafana_analyzer.html#).
+126 -43
Näytä tiedosto
@@ -89,6 +89,8 @@ def get_soc():
target = "mi100"
elif mspec.GPU == "gfx90a":
target = "mi200"
elif mspec.GPU == "gfx900":
target = "vega10"
else:
print("\nInvalid SoC")
sys.exit(0)
@@ -369,6 +371,27 @@ def characterize_app(path, cmd, verbose):
################################################
# Profiling Helpers
################################################
def run_rocscope(args, fname):
# profile the app
if args.use_rocscope == True:
result = subprocess.run(["which", "rocscope"], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)
if result.returncode == 0:
rs_cmd = [result.stdout.decode('ascii').strip(),
"metrics",
"-p", args.path,
"-n", args.name,
"-t", fname,
"--"]
for i in args.remaining.split():
rs_cmd.append(i)
print(rs_cmd)
result = run_subprocess(rs_cmd) #, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
if result.returncode != 0:
print(result.stderr.decode('ascii'))
sys.exit(1)
def run_prof(fname, workload_dir, perfmon_dir, cmd, verbose):
global rocprof_cmd
@@ -409,61 +432,120 @@ def omniperf_profile(args, VER):
print("Command: ", args.remaining)
print("Kernel Selection: ", args.kernel)
print("Dispatch Selection: ", args.dispatch)
if args.ipblocks == None:
print("IP Blocks: All")
print("IP Blocks: All", "\n")
else:
print("IP Blocks: ", args.ipblocks)
print("IP Blocks: ", args.ipblocks, "\n")
# Set up directories
workload_dir = args.path + "/" + args.name + "/" + args.target
perfmon_dir = str(OMNIPERF_HOME) + "/perfmon_pub"
# Perfmon filtering
perfmon_filter(workload_dir, perfmon_dir, args)
# Workload profiling
for fname in glob.glob(workload_dir + "/perfmon/*.txt"):
# Kernel filtering (in-place replacement)
if not args.kernel == None:
run_subprocess(
[
"sed",
"-i",
"-r",
"s%^(kernel:).*%" + "kernel: " + ",".join(args.kernel) + "%g",
fname,
]
)
if not args.lucky == None and args.lucky == True:
print("You're feeling lucky - only profiling top N kernels")
#look for whether workload_dir exists - create if not
try:
os.makedirs(workload_dir, exist_ok = True)
except Exception as e:
print("Unable to create workload directory: ", workload_dir)
print(e)
sys.exit(1)
# Dispatch filtering (inplace replacement)
if not args.dispatch == None:
run_subprocess(
[
"sed",
"-i",
"-r",
"s%^(range:).*%" + "range: " + ",".join(args.dispatch) + "%g",
fname,
]
)
run_prof(fname, workload_dir, perfmon_dir, args.remaining, args.verbose)
result = subprocess.run(["which", "rocscope"], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)
if result.returncode == 0:
rs_cmd = [result.stdout.decode('ascii').strip(),
"top10",
"-p", args.path,
"-n", args.name,
"--"]
for i in args.remaining.split():
rs_cmd.append(i)
print(rs_cmd)
result = run_subprocess(rs_cmd) #, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
if result.returncode != 0:
print(result.stderr.decode('ascii'))
else:
print("rocscope must be in the PATH")
sys.exit(1)
elif not args.summaries == None and args.summaries == True:
print("creating kernel summaries")
#look for whether workload_dir exists - create if not
try:
os.makedirs(workload_dir, exist_ok = True)
except Exception as e:
print("Unable to create workload directory: ", workload_dir)
print(e)
sys.exit(1)
# run again with timestamps
run_subprocess(
[
rocprof_cmd,
# "-i", fname,
# "-m", perfmon_dir + "/" + "metrics.xml",
"--timestamp",
"on",
"-o",
workload_dir + "/" + "timestamps.csv",
'"' + args.remaining + '"',
]
)
result = subprocess.run(["which", "rocscope"], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)
if result.returncode == 0:
rs_cmd = [result.stdout.decode('ascii').strip(),
"summary",
"-p", args.path,
"-n", args.name,
"--"]
for i in args.remaining.split():
rs_cmd.append(i)
print(rs_cmd)
result = run_subprocess(rs_cmd) #, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
if result.returncode != 0:
print(result.stderr.decode('ascii'))
else:
print("rocscope must be in the PATH")
sys.exit(1)
# Update pmc_perf.csv timestamps
replace_timestamps(workload_dir)
else:
for fname in glob.glob(workload_dir + "/perfmon/*.txt"):
# Kernel filtering (in-place replacement)
if not args.kernel == None:
run_subprocess(
[
"sed",
"-i",
"-r",
"s%^(kernel:).*%" + "kernel: " + ",".join(args.kernel) + "%g",
fname,
]
)
# Dispatch filtering (inplace replacement)
if not args.dispatch == None:
run_subprocess(
[
"sed",
"-i",
"-r",
"s%^(range:).*%" + "range: " + " ".join(args.dispatch) + "%g",
fname,
]
)
if args.use_rocscope == True:
run_rocscope(args, fname)
else:
run_prof(fname, workload_dir, perfmon_dir, args.remaining, args.verbose)
# run again with timestamps
run_subprocess(
[
rocprof_cmd,
# "-i", fname,
# "-m", perfmon_dir + "/" + "metrics.xml",
"--timestamp",
"on",
"-o",
workload_dir + "/" + "timestamps.csv",
'"' + args.remaining + '"',
]
)
# Update pmc_perf.csv timestamps
replace_timestamps(workload_dir)
# Generate sysinfo
gen_sysinfo(args.name, workload_dir, args.ipblocks, args.remaining, args.no_roof)
@@ -534,6 +616,7 @@ def main():
# PROFILE MODE
##############
if args.mode == "profile":
print("Resolving rocprof")
resolve_rocprof()
if ".." in str(args.path):
throw_parse_error(
@@ -22,6 +22,8 @@
import os
import argparse
import subprocess
from common import (
OMNIPERF_HOME,
PROG,
@@ -116,6 +118,49 @@ def parse(my_parser):
default=None,
help="\t\t\tKernel filtering.",
)
result = subprocess.run(
["which", "rocscope"], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL
)
if result.returncode == 0:
profile_group.add_argument(
"-l",
"--i-feel-lucky",
required=False,
default=False,
action="store_true",
dest="lucky",
help="\t\t\tProfile only the most time consuming kernels.",
)
profile_group.add_argument(
"-r",
"--use-rocscope",
required=False,
default=False,
action="store_true",
dest="use_rocscope",
help="\t\t\tUse rocscope for profiling",
)
profile_group.add_argument(
"-s",
"--kernel-summaries",
required=False,
default=False,
action="store_true",
dest="summaries",
help="\t\t\tCreate kernel summaries.",
)
else:
profile_group.add_argument(
"--i-feel-lucky", default=False, dest="lucky", help=argparse.SUPPRESS
)
profile_group.add_argument(
"--use-rocscope", default=False, dest="use_rocscope", help=argparse.SUPPRESS
)
profile_group.add_argument(
"--kernel-summaries", default=False, dest="summaries", help=argparse.SUPPRESS
)
profile_group.add_argument(
"-b",
"--ipblocks",
@@ -0,0 +1,15 @@
pmc: GRBM_COUNT GRBM_GUI_ACTIVE SQ_CYCLES SQ_BUSY_CYCLES SQ_WAVES
pmc: CPC_CPC_STAT_BUSY CPC_CPC_STAT_IDLE
pmc: CPC_CPC_TCIU_BUSY CPC_CPC_TCIU_IDLE
pmc: CPC_CPC_STAT_STALL CPC_UTCL1_STALL_ON_TRANSLATION
pmc: CPC_CPC_UTCL2IU_BUSY CPC_CPC_UTCL2IU_IDLE
pmc: CPC_CPC_UTCL2IU_STALL CPC_ME1_BUSY_FOR_PACKET_DECODE
pmc: CPC_ME1_DC0_SPI_BUSY
range:
gpu:
kernel:
@@ -0,0 +1,13 @@
pmc: GRBM_COUNT GRBM_GUI_ACTIVE SQ_CYCLES SQ_BUSY_CYCLES SQ_WAVES
pmc: CPF_CPF_STAT_BUSY CPF_CPF_STAT_STALL
pmc: CPF_CPF_TCIU_BUSY CPF_CPF_TCIU_STALL
pmc: CPF_CPF_STAT_IDLE CPF_CPF_TCIU_IDLE
pmc: CPF_CMP_UTCL1_STALL_ON_TRANSLATION
range:
gpu:
kernel:
@@ -0,0 +1,12 @@
pmc: GRBM_COUNT GRBM_GUI_ACTIVE SQ_CYCLES SQ_BUSY_CYCLES SQ_WAVES GRBM_SPI_BUSY
pmc: SPI_CSN_WINDOW_VALID SPI_CSN_BUSY SPI_CSN_NUM_THREADGROUPS SPI_CSN_WAVE SPI_RA_REQ_NO_ALLOC SPI_RA_REQ_NO_ALLOC_CSN
pmc: SPI_RA_RES_STALL_CSN SPI_RA_TMP_STALL_CSN SPI_RA_WAVE_SIMD_FULL_CSN SPI_RA_VGPR_SIMD_FULL_CSN SPI_RA_SGPR_SIMD_FULL_CSN SPI_RA_LDS_CU_FULL_CSN
pmc: SPI_RA_BAR_CU_FULL_CSN SPI_RA_TGLIM_CU_FULL_CSN SPI_RA_WVLIM_STALL_CSN SPI_SWC_CSC_WR SPI_VWC_CSC_WR SPI_RA_BULKY_CU_FULL_CSN
range:
gpu:
kernel:
@@ -0,0 +1,31 @@
#SQ
pmc: GRBM_COUNT GRBM_GUI_ACTIVE SQ_INSTS_VMEM_WR SQ_INSTS_VMEM_RD SQ_INSTS_VMEM SQ_INSTS_SALU SQ_INSTS_VSKIPPED
pmc: SQ_INSTS_SMEM SQ_INSTS_FLAT SQ_INSTS_LDS SQ_INSTS_GDS SQ_INSTS_EXP_GDS SQ_INSTS_BRANCH SQ_INSTS_SENDMSG SQ_INSTS
pmc: SQ_WAVE_CYCLES SQ_WAIT_ANY SQ_WAIT_INST_ANY SQ_ACTIVE_INST_ANY SQ_CYCLES SQ_BUSY_CYCLES SQ_BUSY_CU_CYCLES SQ_INSTS_VALU
pmc: SQ_ACTIVE_INST_VMEM SQ_ACTIVE_INST_LDS SQ_ACTIVE_INST_VALU SQ_ACTIVE_INST_SCA SQ_ACTIVE_INST_EXP_GDS SQ_ACTIVE_INST_MISC SQ_ACTIVE_INST_FLAT SQ_INST_CYCLES_VMEM_WR
pmc: SQ_INST_CYCLES_VMEM_RD SQ_INST_CYCLES_SMEM SQ_INST_CYCLES_SALU SQ_THREAD_CYCLES_VALU SQ_IFETCH SQ_LDS_BANK_CONFLICT SQ_LDS_ADDR_CONFLICT SQ_LDS_UNALIGNED_STALL
pmc: SQ_WAVES SQ_WAVES_EQ_64 SQ_WAVES_LT_64 SQ_WAVES_LT_48 SQ_WAVES_LT_32 SQ_WAVES_LT_16 SQ_ITEMS SQ_INSTS_VSKIPPED
pmc: SQ_LDS_MEM_VIOLATIONS SQ_LDS_ATOMIC_RETURN SQ_LDS_IDX_ACTIVE SQ_WAVES_RESTORED SQ_WAVES_SAVED SQ_INSTS_SMEM_NORM
#SQ:MI200
#pmc: SQ_INSTS_MFMA SQ_INSTS_VALU_MFMA_I8 SQ_INSTS_VALU_MFMA_F16 SQ_INSTS_VALU_MFMA_BF16 SQ_INSTS_VALU_MFMA_F32 SQ_INSTS_VALU_MFMA_F64 SQ_VALU_MFMA_BUSY_CYCLES
#pmc: SQ_INSTS_FLAT_LDS_ONLY SQ_INSTS_VALU_MFMA_MOPS_I8 SQ_INSTS_VALU_MFMA_MOPS_F16 SQ_INSTS_VALU_MFMA_MOPS_BF16 SQ_INSTS_VALU_MFMA_MOPS_F32 SQ_INSTS_VALU_MFMA_MOPS_F64
#SQC
pmc: SQC_TC_INST_REQ SQC_TC_DATA_READ_REQ SQC_TC_DATA_WRITE_REQ SQC_TC_DATA_ATOMIC_REQ SQC_TC_STALL SQC_TC_REQ SQC_DCACHE_REQ_READ_16
pmc: SQC_ICACHE_REQ SQC_ICACHE_HITS SQC_ICACHE_MISSES SQC_ICACHE_MISSES_DUPLICATE SQC_DCACHE_INPUT_VALID_READYB SQC_DCACHE_ATOMIC SQC_DCACHE_REQ_READ_8
pmc: SQC_DCACHE_REQ SQC_DCACHE_HITS SQC_DCACHE_MISSES SQC_DCACHE_MISSES_DUPLICATE SQC_DCACHE_REQ_READ_1 SQC_DCACHE_REQ_READ_2 SQC_DCACHE_REQ_READ_4
########################################
# Filtering
########################################
range:
gpu:
kernel:
@@ -0,0 +1,12 @@
#################################################
# VMEM latency
#################################################
pmc: SQ_INSTS_VMEM SQ_INST_LEVEL_VMEM SQ_ACCUM_PREV_HIRES
range:
gpu:
kernel:
@@ -0,0 +1,13 @@
#################################################
# SMEM latency
#################################################
pmc: SQ_INSTS_SMEM SQ_INST_LEVEL_SMEM SQ_ACCUM_PREV_HIRES
range:
gpu:
kernel:
@@ -0,0 +1,11 @@
#################################################
# ifetch latency
#################################################
pmc: GRBM_COUNT GRBM_GUI_ACTIVE SQ_WAVES SQ_IFETCH SQ_IFETCH_LEVEL SQ_ACCUM_PREV_HIRES
range:
gpu:
kernel:
@@ -0,0 +1,15 @@
#################################################
# LDS latency
#################################################
pmc: SQ_INSTS_LDS SQ_INST_LEVEL_LDS SQ_ACCUM_PREV_HIRES
range:
gpu:
kernel:
@@ -0,0 +1,7 @@
pmc: GRBM_COUNT GRBM_GUI_ACTIVE CPC_ME1_BUSY_FOR_PACKET_DECODE SQ_CYCLES SQ_WAVES SQ_WAVE_CYCLES SQ_BUSY_CYCLES SQ_LEVEL_WAVES SQ_ACCUM_PREV_HIRES
gpu:
range:
kernel:
@@ -0,0 +1,12 @@
pmc: GRBM_COUNT GRBM_GUI_ACTIVE SQ_CYCLES SQ_BUSY_CYCLES SQ_BUSY_CU_CYCLES SQ_WAVES SQ_WAVE_CYCLES
pmc: SQC_TC_INST_REQ SQC_TC_DATA_READ_REQ SQC_TC_DATA_WRITE_REQ SQC_TC_DATA_ATOMIC_REQ SQC_TC_STALL SQC_TC_REQ SQC_DCACHE_REQ_READ_16
pmc: SQC_ICACHE_REQ SQC_ICACHE_HITS SQC_ICACHE_MISSES SQC_ICACHE_MISSES_DUPLICATE SQC_DCACHE_INPUT_VALID_READYB SQC_DCACHE_ATOMIC SQC_DCACHE_REQ_READ_8
pmc: SQC_DCACHE_REQ SQC_DCACHE_HITS SQC_DCACHE_MISSES SQC_DCACHE_MISSES_DUPLICATE SQC_DCACHE_REQ_READ_1 SQC_DCACHE_REQ_READ_2 SQC_DCACHE_REQ_READ_4
range:
gpu:
kernel:
@@ -0,0 +1,37 @@
pmc: GRBM_COUNT GRBM_GUI_ACTIVE SQ_CYCLES SQ_BUSY_CYCLES SQ_BUSY_CU_CYCLES SQ_WAVES SQ_WAVE_CYCLES
pmc: TA_TA_BUSY_sum TA_SH_FIFO_BUSY_sum
pmc: TA_SH_FIFO_CMD_BUSY_sum TA_SH_FIFO_ADDR_BUSY_sum
pmc: TA_SH_FIFO_DATA_BUSY_sum TA_SH_FIFO_DATA_SFIFO_BUSY_sum
pmc: TA_SH_FIFO_DATA_TFIFO_BUSY_sum TA_SQ_TA_CMD_CYCLES_sum
pmc: TA_SP_TA_ADDR_CYCLES_sum TA_SP_TA_DATA_CYCLES_sum
# Starvation
pmc: TA_SH_FIFO_ADDR_STARVED_WHILE_BUSY_CYCLES_sum TA_SH_FIFO_CMD_STARVED_WHILE_BUSY_CYCLES_sum
pmc: TA_SH_FIFO_DATA_STARVED_WHILE_BUSY_CYCLES_sum TA_TA_SH_FIFO_STARVED_sum
# buffer access
pmc: TA_BUFFER_WAVEFRONTS_sum TA_BUFFER_READ_WAVEFRONTS_sum
pmc: TA_BUFFER_WRITE_WAVEFRONTS_sum TA_BUFFER_ATOMIC_WAVEFRONTS_sum
pmc: TA_BUFFER_TOTAL_CYCLES_sum TA_BUFFER_COALESCABLE_WAVEFRONTS_sum
pmc: TA_BUFFER_COALESCED_READ_CYCLES_sum TA_BUFFER_COALESCED_WRITE_CYCLES_sum
# stalls
pmc: TA_ADDR_STALLED_BY_TC_CYCLES_sum TA_TOTAL_WAVEFRONTS_sum
pmc: TA_ADDR_STALLED_BY_TD_CYCLES_sum TA_DATA_STALLED_BY_TC_CYCLES_sum
# flat accesses
pmc: TA_FLAT_WAVEFRONTS_sum TA_FLAT_READ_WAVEFRONTS_sum
pmc: TA_FLAT_WRITE_WAVEFRONTS_sum TA_FLAT_ATOMIC_WAVEFRONTS_sum
pmc: TA_FLAT_COALESCEABLE_WAVEFRONTS_sum
range:
gpu:
kernel:
@@ -0,0 +1,26 @@
pmc: GRBM_COUNT GRBM_GUI_ACTIVE SQ_CYCLES SQ_BUSY_CYCLES SQ_WAVES
# MI50: no TCC_RW_REQ
pmc: TCC_CYCLE[0] TCC_HIT[0] TCC_MISS[0] TCC_CYCLE[1] TCC_HIT[1] TCC_MISS[1] TCC_CYCLE[2] TCC_HIT[2] TCC_MISS[2] TCC_CYCLE[3] TCC_HIT[3] TCC_MISS[3] TCC_CYCLE[4] TCC_HIT[4] TCC_MISS[4] TCC_CYCLE[5] TCC_HIT[5] TCC_MISS[5] TCC_CYCLE[6] TCC_HIT[6] TCC_MISS[6] TCC_CYCLE[7] TCC_HIT[7] TCC_MISS[7] TCC_CYCLE[8] TCC_HIT[8] TCC_MISS[8] TCC_CYCLE[9] TCC_HIT[9] TCC_MISS[9] TCC_CYCLE[10] TCC_HIT[10] TCC_MISS[10] TCC_CYCLE[11] TCC_HIT[11] TCC_MISS[11] TCC_CYCLE[12] TCC_HIT[12] TCC_MISS[12] TCC_CYCLE[13] TCC_HIT[13] TCC_MISS[13] TCC_CYCLE[14] TCC_HIT[14] TCC_MISS[14] TCC_CYCLE[15] TCC_HIT[15] TCC_MISS[15]
pmc: TCC_REQ[0] TCC_READ[0] TCC_WRITE[0] TCC_ATOMIC[0] TCC_REQ[1] TCC_READ[1] TCC_WRITE[1] TCC_ATOMIC[1] TCC_REQ[2] TCC_READ[2] TCC_WRITE[2] TCC_ATOMIC[2] TCC_REQ[3] TCC_READ[3] TCC_WRITE[3] TCC_ATOMIC[3] TCC_REQ[4] TCC_READ[4] TCC_WRITE[4] TCC_ATOMIC[4] TCC_REQ[5] TCC_READ[5] TCC_WRITE[5] TCC_ATOMIC[5] TCC_REQ[6] TCC_READ[6] TCC_WRITE[6] TCC_ATOMIC[6] TCC_REQ[7] TCC_READ[7] TCC_WRITE[7] TCC_ATOMIC[7] TCC_REQ[8] TCC_READ[8] TCC_WRITE[8] TCC_ATOMIC[8] TCC_REQ[9] TCC_READ[9] TCC_WRITE[9] TCC_ATOMIC[9] TCC_REQ[10] TCC_READ[10] TCC_WRITE[10] TCC_ATOMIC[10] TCC_REQ[11] TCC_READ[11] TCC_WRITE[11] TCC_ATOMIC[11] TCC_REQ[12] TCC_READ[12] TCC_WRITE[12] TCC_ATOMIC[12] TCC_REQ[13] TCC_READ[13] TCC_WRITE[13] TCC_ATOMIC[13] TCC_REQ[14] TCC_READ[14] TCC_WRITE[14] TCC_ATOMIC[14] TCC_REQ[15] TCC_READ[15] TCC_WRITE[15] TCC_ATOMIC[15]
pmc: TCC_EA_RDREQ[0] TCC_EA_RDREQ_32B[0] TCC_EA_WRREQ[0] TCC_EA_WRREQ_64B[0] TCC_EA_RDREQ[1] TCC_EA_RDREQ_32B[1] TCC_EA_WRREQ[1] TCC_EA_WRREQ_64B[1] TCC_EA_RDREQ[2] TCC_EA_RDREQ_32B[2] TCC_EA_WRREQ[2] TCC_EA_WRREQ_64B[2] TCC_EA_RDREQ[3] TCC_EA_RDREQ_32B[3] TCC_EA_WRREQ[3] TCC_EA_WRREQ_64B[3] TCC_EA_RDREQ[4] TCC_EA_RDREQ_32B[4] TCC_EA_WRREQ[4] TCC_EA_WRREQ_64B[4] TCC_EA_RDREQ[5] TCC_EA_RDREQ_32B[5] TCC_EA_WRREQ[5] TCC_EA_WRREQ_64B[5] TCC_EA_RDREQ[6] TCC_EA_RDREQ_32B[6] TCC_EA_WRREQ[6] TCC_EA_WRREQ_64B[6] TCC_EA_RDREQ[7] TCC_EA_RDREQ_32B[7] TCC_EA_WRREQ[7] TCC_EA_WRREQ_64B[7] TCC_EA_RDREQ[8] TCC_EA_RDREQ_32B[8] TCC_EA_WRREQ[8] TCC_EA_WRREQ_64B[8] TCC_EA_RDREQ[9] TCC_EA_RDREQ_32B[9] TCC_EA_WRREQ[9] TCC_EA_WRREQ_64B[9] TCC_EA_RDREQ[10] TCC_EA_RDREQ_32B[10] TCC_EA_WRREQ[10] TCC_EA_WRREQ_64B[10] TCC_EA_RDREQ[11] TCC_EA_RDREQ_32B[11] TCC_EA_WRREQ[11] TCC_EA_WRREQ_64B[11] TCC_EA_RDREQ[12] TCC_EA_RDREQ_32B[12] TCC_EA_WRREQ[12] TCC_EA_WRREQ_64B[12] TCC_EA_RDREQ[13] TCC_EA_RDREQ_32B[13] TCC_EA_WRREQ[13] TCC_EA_WRREQ_64B[13] TCC_EA_RDREQ[14] TCC_EA_RDREQ_32B[14] TCC_EA_WRREQ[14] TCC_EA_WRREQ_64B[14] TCC_EA_RDREQ[15] TCC_EA_RDREQ_32B[15] TCC_EA_WRREQ[15] TCC_EA_WRREQ_64B[15]
pmc: TCC_EA_ATOMIC[0] TCC_EA_RDREQ_LEVEL[0] TCC_EA_WRREQ_LEVEL[0] TCC_EA_ATOMIC_LEVEL[0] TCC_EA_ATOMIC[1] TCC_EA_RDREQ_LEVEL[1] TCC_EA_WRREQ_LEVEL[1] TCC_EA_ATOMIC_LEVEL[1] TCC_EA_ATOMIC[2] TCC_EA_RDREQ_LEVEL[2] TCC_EA_WRREQ_LEVEL[2] TCC_EA_ATOMIC_LEVEL[2] TCC_EA_ATOMIC[3] TCC_EA_RDREQ_LEVEL[3] TCC_EA_WRREQ_LEVEL[3] TCC_EA_ATOMIC_LEVEL[3] TCC_EA_ATOMIC[4] TCC_EA_RDREQ_LEVEL[4] TCC_EA_WRREQ_LEVEL[4] TCC_EA_ATOMIC_LEVEL[4] TCC_EA_ATOMIC[5] TCC_EA_RDREQ_LEVEL[5] TCC_EA_WRREQ_LEVEL[5] TCC_EA_ATOMIC_LEVEL[5] TCC_EA_ATOMIC[6] TCC_EA_RDREQ_LEVEL[6] TCC_EA_WRREQ_LEVEL[6] TCC_EA_ATOMIC_LEVEL[6] TCC_EA_ATOMIC[7] TCC_EA_RDREQ_LEVEL[7] TCC_EA_WRREQ_LEVEL[7] TCC_EA_ATOMIC_LEVEL[7] TCC_EA_ATOMIC[8] TCC_EA_RDREQ_LEVEL[8] TCC_EA_WRREQ_LEVEL[8] TCC_EA_ATOMIC_LEVEL[8] TCC_EA_ATOMIC[9] TCC_EA_RDREQ_LEVEL[9] TCC_EA_WRREQ_LEVEL[9] TCC_EA_ATOMIC_LEVEL[9] TCC_EA_ATOMIC[10] TCC_EA_RDREQ_LEVEL[10] TCC_EA_WRREQ_LEVEL[10] TCC_EA_ATOMIC_LEVEL[10] TCC_EA_ATOMIC[11] TCC_EA_RDREQ_LEVEL[11] TCC_EA_WRREQ_LEVEL[11] TCC_EA_ATOMIC_LEVEL[11] TCC_EA_ATOMIC[12] TCC_EA_RDREQ_LEVEL[12] TCC_EA_WRREQ_LEVEL[12] TCC_EA_ATOMIC_LEVEL[12] TCC_EA_ATOMIC[13] TCC_EA_RDREQ_LEVEL[13] TCC_EA_WRREQ_LEVEL[13] TCC_EA_ATOMIC_LEVEL[13] TCC_EA_ATOMIC[14] TCC_EA_RDREQ_LEVEL[14] TCC_EA_WRREQ_LEVEL[14] TCC_EA_ATOMIC_LEVEL[14] TCC_EA_ATOMIC[15] TCC_EA_RDREQ_LEVEL[15] TCC_EA_WRREQ_LEVEL[15] TCC_EA_ATOMIC_LEVEL[15]
pmc: TCC_EA_RDREQ_IO_CREDIT_STALL[0] TCC_EA_RDREQ_GMI_CREDIT_STALL[0] TCC_EA_RDREQ_DRAM_CREDIT_STALL[0] TCC_EA_RDREQ_IO_CREDIT_STALL[1] TCC_EA_RDREQ_GMI_CREDIT_STALL[1] TCC_EA_RDREQ_DRAM_CREDIT_STALL[1] TCC_EA_RDREQ_IO_CREDIT_STALL[2] TCC_EA_RDREQ_GMI_CREDIT_STALL[2] TCC_EA_RDREQ_DRAM_CREDIT_STALL[2] TCC_EA_RDREQ_IO_CREDIT_STALL[3] TCC_EA_RDREQ_GMI_CREDIT_STALL[3] TCC_EA_RDREQ_DRAM_CREDIT_STALL[3] TCC_EA_RDREQ_IO_CREDIT_STALL[4] TCC_EA_RDREQ_GMI_CREDIT_STALL[4] TCC_EA_RDREQ_DRAM_CREDIT_STALL[4] TCC_EA_RDREQ_IO_CREDIT_STALL[5] TCC_EA_RDREQ_GMI_CREDIT_STALL[5] TCC_EA_RDREQ_DRAM_CREDIT_STALL[5] TCC_EA_RDREQ_IO_CREDIT_STALL[6] TCC_EA_RDREQ_GMI_CREDIT_STALL[6] TCC_EA_RDREQ_DRAM_CREDIT_STALL[6] TCC_EA_RDREQ_IO_CREDIT_STALL[7] TCC_EA_RDREQ_GMI_CREDIT_STALL[7] TCC_EA_RDREQ_DRAM_CREDIT_STALL[7] TCC_EA_RDREQ_IO_CREDIT_STALL[8] TCC_EA_RDREQ_GMI_CREDIT_STALL[8] TCC_EA_RDREQ_DRAM_CREDIT_STALL[8] TCC_EA_RDREQ_IO_CREDIT_STALL[9] TCC_EA_RDREQ_GMI_CREDIT_STALL[9] TCC_EA_RDREQ_DRAM_CREDIT_STALL[9] TCC_EA_RDREQ_IO_CREDIT_STALL[10] TCC_EA_RDREQ_GMI_CREDIT_STALL[10] TCC_EA_RDREQ_DRAM_CREDIT_STALL[10] TCC_EA_RDREQ_IO_CREDIT_STALL[11] TCC_EA_RDREQ_GMI_CREDIT_STALL[11] TCC_EA_RDREQ_DRAM_CREDIT_STALL[11] TCC_EA_RDREQ_IO_CREDIT_STALL[12] TCC_EA_RDREQ_GMI_CREDIT_STALL[12] TCC_EA_RDREQ_DRAM_CREDIT_STALL[12] TCC_EA_RDREQ_IO_CREDIT_STALL[13] TCC_EA_RDREQ_GMI_CREDIT_STALL[13] TCC_EA_RDREQ_DRAM_CREDIT_STALL[13] TCC_EA_RDREQ_IO_CREDIT_STALL[14] TCC_EA_RDREQ_GMI_CREDIT_STALL[14] TCC_EA_RDREQ_DRAM_CREDIT_STALL[14] TCC_EA_RDREQ_IO_CREDIT_STALL[15] TCC_EA_RDREQ_GMI_CREDIT_STALL[15] TCC_EA_RDREQ_DRAM_CREDIT_STALL[15]
pmc: TCC_EA_WRREQ_IO_CREDIT_STALL[0] TCC_EA_WRREQ_GMI_CREDIT_STALL[0] TCC_EA_WRREQ_DRAM_CREDIT_STALL[0] TCC_TOO_MANY_EA_WRREQS_STALL[0] TCC_EA_WRREQ_IO_CREDIT_STALL[1] TCC_EA_WRREQ_GMI_CREDIT_STALL[1] TCC_EA_WRREQ_DRAM_CREDIT_STALL[1] TCC_TOO_MANY_EA_WRREQS_STALL[1] TCC_EA_WRREQ_IO_CREDIT_STALL[2] TCC_EA_WRREQ_GMI_CREDIT_STALL[2] TCC_EA_WRREQ_DRAM_CREDIT_STALL[2] TCC_TOO_MANY_EA_WRREQS_STALL[2] TCC_EA_WRREQ_IO_CREDIT_STALL[3] TCC_EA_WRREQ_GMI_CREDIT_STALL[3] TCC_EA_WRREQ_DRAM_CREDIT_STALL[3] TCC_TOO_MANY_EA_WRREQS_STALL[3] TCC_EA_WRREQ_IO_CREDIT_STALL[4] TCC_EA_WRREQ_GMI_CREDIT_STALL[4] TCC_EA_WRREQ_DRAM_CREDIT_STALL[4] TCC_TOO_MANY_EA_WRREQS_STALL[4] TCC_EA_WRREQ_IO_CREDIT_STALL[5] TCC_EA_WRREQ_GMI_CREDIT_STALL[5] TCC_EA_WRREQ_DRAM_CREDIT_STALL[5] TCC_TOO_MANY_EA_WRREQS_STALL[5] TCC_EA_WRREQ_IO_CREDIT_STALL[6] TCC_EA_WRREQ_GMI_CREDIT_STALL[6] TCC_EA_WRREQ_DRAM_CREDIT_STALL[6] TCC_TOO_MANY_EA_WRREQS_STALL[6] TCC_EA_WRREQ_IO_CREDIT_STALL[7] TCC_EA_WRREQ_GMI_CREDIT_STALL[7] TCC_EA_WRREQ_DRAM_CREDIT_STALL[7] TCC_TOO_MANY_EA_WRREQS_STALL[7] TCC_EA_WRREQ_IO_CREDIT_STALL[8] TCC_EA_WRREQ_GMI_CREDIT_STALL[8] TCC_EA_WRREQ_DRAM_CREDIT_STALL[8] TCC_TOO_MANY_EA_WRREQS_STALL[8] TCC_EA_WRREQ_IO_CREDIT_STALL[9] TCC_EA_WRREQ_GMI_CREDIT_STALL[9] TCC_EA_WRREQ_DRAM_CREDIT_STALL[9] TCC_TOO_MANY_EA_WRREQS_STALL[9] TCC_EA_WRREQ_IO_CREDIT_STALL[10] TCC_EA_WRREQ_GMI_CREDIT_STALL[10] TCC_EA_WRREQ_DRAM_CREDIT_STALL[10] TCC_TOO_MANY_EA_WRREQS_STALL[10] TCC_EA_WRREQ_IO_CREDIT_STALL[11] TCC_EA_WRREQ_GMI_CREDIT_STALL[11] TCC_EA_WRREQ_DRAM_CREDIT_STALL[11] TCC_TOO_MANY_EA_WRREQS_STALL[11] TCC_EA_WRREQ_IO_CREDIT_STALL[12] TCC_EA_WRREQ_GMI_CREDIT_STALL[12] TCC_EA_WRREQ_DRAM_CREDIT_STALL[12] TCC_TOO_MANY_EA_WRREQS_STALL[12] TCC_EA_WRREQ_IO_CREDIT_STALL[13] TCC_EA_WRREQ_GMI_CREDIT_STALL[13] TCC_EA_WRREQ_DRAM_CREDIT_STALL[13] TCC_TOO_MANY_EA_WRREQS_STALL[13] TCC_EA_WRREQ_IO_CREDIT_STALL[14] TCC_EA_WRREQ_GMI_CREDIT_STALL[14] TCC_EA_WRREQ_DRAM_CREDIT_STALL[14] TCC_TOO_MANY_EA_WRREQS_STALL[14] TCC_EA_WRREQ_IO_CREDIT_STALL[15] TCC_EA_WRREQ_GMI_CREDIT_STALL[15] TCC_EA_WRREQ_DRAM_CREDIT_STALL[15] TCC_TOO_MANY_EA_WRREQS_STALL[15]
gpu:
kernel:
range:
@@ -0,0 +1,19 @@
pmc: GRBM_COUNT GRBM_GUI_ACTIVE SQ_CYCLES SQ_BUSY_CYCLES SQ_WAVES
pmc: TCC_CYCLE_sum TCC_BUSY_sum TCC_PROBE_sum TCC_PROBE_ALL_sum
pmc: TCC_NC_REQ_sum TCC_UC_REQ_sum TCC_CC_REQ_sum
pmc: TCC_REQ_sum TCC_STREAMING_REQ_sum TCC_HIT_sum TCC_MISS_sum
pmc: TCC_READ_sum TCC_WRITE_sum TCC_ATOMIC_sum TCC_WRITEBACK_sum
pmc: TCC_EA_WRREQ_sum TCC_EA_WRREQ_64B_sum TCC_EA_WR_UNCACHED_32B_sum
pmc: TCC_EA_WRREQ_STALL_sum TCC_EA_WRREQ_IO_CREDIT_STALL_sum TCC_EA_WRREQ_GMI_CREDIT_STALL_sum TCC_EA_WRREQ_DRAM_CREDIT_STALL_sum
pmc: TCC_TOO_MANY_EA_WRREQS_STALL_sum TCC_EA_ATOMIC_sum TCC_EA_RDREQ_sum TCC_EA_RDREQ_32B_sum
pmc: TCC_EA_RD_UNCACHED_32B_sum TCC_EA_RDREQ_IO_CREDIT_STALL_sum TCC_EA_RDREQ_GMI_CREDIT_STALL_sum TCC_EA_RDREQ_DRAM_CREDIT_STALL_sum
pmc: TCC_NORMAL_WRITEBACK_sum TCC_ALL_TC_OP_WB_WRITEBACK_sum TCC_NORMAL_EVICT_sum
pmc: TCC_ALL_TC_OP_INV_EVICT_sum TCC_EA_RDREQ_DRAM_sum TCC_EA_WRREQ_DRAM_sum
pmc: TCC_EA_RDREQ_LEVEL_sum TCC_EA_WRREQ_LEVEL_sum TCC_EA_ATOMIC_LEVEL_sum
gpu:
kernel:
range:
@@ -0,0 +1,18 @@
pmc: GRBM_COUNT GRBM_GUI_ACTIVE SQ_CYCLES SQ_BUSY_CYCLES SQ_BUSY_CU_CYCLES SQ_WAVES SQ_WAVE_CYCLES
pmc: TCP_GATE_EN1_sum TCP_GATE_EN2_sum TCP_TD_TCP_STALL_CYCLES_sum TCP_TCR_TCP_STALL_CYCLES_sum
pmc: TCP_READ_TAGCONFLICT_STALL_CYCLES_sum TCP_WRITE_TAGCONFLICT_STALL_CYCLES_sum TCP_ATOMIC_TAGCONFLICT_STALL_CYCLES_sum TCP_TA_TCP_STATE_READ_sum
pmc: TCP_VOLATILE_sum TCP_TOTAL_ACCESSES_sum TCP_TOTAL_READ_sum TCP_TOTAL_WRITE_sum
pmc: TCP_TOTAL_ATOMIC_WITH_RET_sum TCP_TOTAL_ATOMIC_WITHOUT_RET_sum TCP_TOTAL_WRITEBACK_INVALIDATES_sum TCP_TOTAL_CACHE_ACCESSES_sum
pmc: TCP_UTCL1_TRANSLATION_MISS_sum TCP_UTCL1_TRANSLATION_HIT_sum TCP_UTCL1_PERMISSION_MISS_sum TCP_UTCL1_REQUEST_sum
pmc: TCP_TCP_LATENCY_sum TCP_TCC_READ_REQ_LATENCY_sum TCP_TCC_WRITE_REQ_LATENCY_sum TCP_TCC_READ_REQ_sum
pmc: TCP_TCC_WRITE_REQ_sum TCP_TCC_ATOMIC_WITH_RET_REQ_sum TCP_TCC_ATOMIC_WITHOUT_RET_REQ_sum TCP_TCC_NC_READ_REQ_sum
pmc: TCP_TCC_NC_WRITE_REQ_sum TCP_TCC_NC_ATOMIC_REQ_sum TCP_TCC_UC_READ_REQ_sum TCP_TCC_UC_WRITE_REQ_sum
pmc: TCP_TCC_UC_ATOMIC_REQ_sum TCP_TCC_CC_READ_REQ_sum TCP_TCC_CC_WRITE_REQ_sum TCP_TCC_CC_ATOMIC_REQ_sum
pmc: TCP_PENDING_STALL_CYCLES_sum
#pmc: TCA_CYCLE_sum TCA_BUSY_sum
gpu:
kernel:
range:
@@ -0,0 +1,12 @@
pmc: GRBM_COUNT GRBM_GUI_ACTIVE SQ_CYCLES SQ_BUSY_CYCLES SQ_BUSY_CU_CYCLES SQ_WAVES SQ_WAVE_CYCLES
pmc: TD_TD_BUSY_sum TD_TC_STALL_sum
pmc: TD_COALESCABLE_WAVEFRONT_sum TD_LOAD_WAVEFRONT_sum
pmc: TD_ATOMIC_WAVEFRONT_sum TD_STORE_WAVEFRONT_sum
gpu:
range:
kernel:
@@ -224,27 +224,27 @@ def convert_folder(connectionInfo, Extractionlvl):
df_saved_file = t2.to_csv(newfilepath + file)
cmd = (
'mongoimport --quiet --uri mongodb://{}:{}@{}:{} --authenticationDatabase "admin" --file {} -d {} -c {} --drop --type csv --headerline'
"mongoimport --quiet --uri mongodb://{}:{}@{}:{}/{}?authSource=admin --file {} -c {} --drop --type csv --headerline"
).format(
connectionInfo["username"],
connectionInfo["password"],
connectionInfo["host"],
connectionInfo["port"],
newfilepath + file,
connectionInfo["db"],
newfilepath + file,
fileName,
)
os.system(cmd)
else:
cmd = (
'mongoimport --quiet --uri mongodb://{}:{}@{}:{} --authenticationDatabase "admin" --file {} -d {} -c {} --drop --type csv --headerline'
"mongoimport --quiet --uri mongodb://{}:{}@{}:{}/{}?authSource=admin --file {} -c {} --drop --type csv --headerline"
).format(
connectionInfo["username"],
connectionInfo["password"],
connectionInfo["host"],
connectionInfo["port"],
connectionInfo["workload"] + "/" + file,
connectionInfo["db"],
connectionInfo["workload"] + "/" + file,
fileName,
)
os.system(cmd)
@@ -29,6 +29,19 @@ prog = "omniperf"
# Per IP block max number of simulutaneous counters
# GFX IP Blocks
perfmon_config = {
"vega10": {
"SQ": 8,
"TA": 2,
"TD": 2,
"TCP": 4,
"TCC": 4,
"CPC": 2,
"CPF": 2,
"SPI": 2,
"GRBM": 2,
"GDS": 4,
"TCC_channels": 16,
},
"mi50": {
"SQ": 8,
"TA": 2,
@@ -32,7 +32,7 @@ from dataclasses import dataclass
from pathlib import Path as path
from textwrap import dedent
gpu_list = {"gfx906", "gfx908", "gfx90a"}
gpu_list = {"gfx906", "gfx908", "gfx90a", "gfx900"}
@dataclass