diff --git a/src/docs-2.x/analysis.md b/src/docs-2.x/analysis.md index 18c22e0d0e..5ba55fbfa7 100644 --- a/src/docs-2.x/analysis.md +++ b/src/docs-2.x/analysis.md @@ -23,233 +23,6 @@ See sections below for more information on each. Run `omniperf analyze -h` for more details. -### Recommended workflow - -1) To begin, generate a comprehensive analysis report with Omniperf CLI. -```shell-session -$ omniperf analyze -p workloads/vcopy/MI200/ - -Analysis mode = cli -SoC = {'MI200'} -[analysis] deriving Omniperf metrics... - --------------------------------------------------------------------------------- -0. Top Stats -0.1 Top Kernels -╒════╤══════════════════════════════════════════╤═════════╤═══════════╤════════════╤══════════════╤════════╕ -│ │ Kernel_Name │ Count │ Sum(ns) │ Mean(ns) │ Median(ns) │ Pct │ -╞════╪══════════════════════════════════════════╪═════════╪═══════════╪════════════╪══════════════╪════════╡ -│ 0 │ vecCopy(double*, double*, double*, int, │ 1.00 │ 20480.00 │ 20480.00 │ 20480.00 │ 100.00 │ -│ │ int) │ │ │ │ │ │ -╘════╧══════════════════════════════════════════╧═════════╧═══════════╧════════════╧══════════════╧════════╛ -0.2 Dispatch List -╒════╤═══════════════╤══════════════════════════════════════════════╤══════════╕ -│ │ Dispatch_ID │ Kernel_Name │ GPU_ID │ -╞════╪═══════════════╪══════════════════════════════════════════════╪══════════╡ -│ 0 │ 0 │ vecCopy(double*, double*, double*, int, int) │ 2 │ -╘════╧═══════════════╧══════════════════════════════════════════════╧══════════╛ - - - - --------------------------------------------------------------------------------- -1. System Info - -╒═══════════════════╤═══════════════════════════════════════════════╕ -│ │ Info │ -╞═══════════════════╪═══════════════════════════════════════════════╡ -│ workload_name │ vcopy │ -├───────────────────┼───────────────────────────────────────────────┤ -│ command │ ./vcopy -n 1048576 -b 256 │ -├───────────────────┼───────────────────────────────────────────────┤ -│ host_name │ t007-002 │ -├───────────────────┼───────────────────────────────────────────────┤ -│ host_cpu │ AMD EPYC 7V13 64-Core Processor │ -├───────────────────┼───────────────────────────────────────────────┤ -│ sbios │ American Megatrends Inc.0602 │ -├───────────────────┼───────────────────────────────────────────────┤ -│ host_distro │ Rocky Linux 9.1 (Blue Onyx) │ -├───────────────────┼───────────────────────────────────────────────┤ -│ host_kernel │ 5.14.0-162.18.1.el9_1.x86_64 │ -├───────────────────┼───────────────────────────────────────────────┤ -│ host_rocmver │ 5.7.1-98 │ -├───────────────────┼───────────────────────────────────────────────┤ -│ date │ Fri Mar 1 15:32:43 2024 (CST) │ -├───────────────────┼───────────────────────────────────────────────┤ -│ gpu_soc │ gfx90a │ -├───────────────────┼───────────────────────────────────────────────┤ -│ vbios │ 113-D67301-059 │ -├───────────────────┼───────────────────────────────────────────────┤ -│ numSE │ 8 │ -├───────────────────┼───────────────────────────────────────────────┤ -│ numCU │ 104 │ -├───────────────────┼───────────────────────────────────────────────┤ -│ numSIMD │ 4 │ -├───────────────────┼───────────────────────────────────────────────┤ -│ waveSize │ 64 │ -├───────────────────┼───────────────────────────────────────────────┤ -│ maxWavesPerCU │ 32 │ -├───────────────────┼───────────────────────────────────────────────┤ -│ maxWorkgroupSize │ 1024 │ -├───────────────────┼───────────────────────────────────────────────┤ -│ L1 │ 16 │ -├───────────────────┼───────────────────────────────────────────────┤ -│ L2 │ 8192 │ -├───────────────────┼───────────────────────────────────────────────┤ -│ sclk │ 1700 │ -├───────────────────┼───────────────────────────────────────────────┤ -│ mclk │ 1600 │ -├───────────────────┼───────────────────────────────────────────────┤ -│ cur_sclk │ 1700 │ -├───────────────────┼───────────────────────────────────────────────┤ -│ cur_mclk │ 1600 │ -├───────────────────┼───────────────────────────────────────────────┤ -│ L2Banks │ 32 │ -├───────────────────┼───────────────────────────────────────────────┤ -│ totalL2Banks │ 32 │ -├───────────────────┼───────────────────────────────────────────────┤ -│ LDSBanks │ 32 │ -├───────────────────┼───────────────────────────────────────────────┤ -│ name │ MI200 │ -├───────────────────┼───────────────────────────────────────────────┤ -│ numSQC │ 56 │ -├───────────────────┼───────────────────────────────────────────────┤ -│ numPipes │ 4 │ -├───────────────────┼───────────────────────────────────────────────┤ -│ 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 available metrics for inspection - ```shell-session -$ omniperf analyze -p workloads/vcopy/MI200/ --list-metrics gfx90a -Execution mode = analyze - -Analysis mode = cli -SoC = {'MI200'} -[analysis] deriving Omniperf metrics... -0 -> Top Stats -1 -> System Info -2 -> System Speed-of-Light - 2.1 -> Speed-of-Light - 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 Utilization - 2.1.9 -> VALU Utilization - 2.1.10 -> MFMA Utilization - 2.1.11 -> VMEM Utilization - 2.1.12 -> Branch Utilization - 2.1.13 -> VALU Active Threads - 2.1.14 -> IPC - 2.1.15 -> Wavefront Occupancy - 2.1.16 -> Theoretical LDS Bandwidth - 2.1.17 -> LDS Bank Conflicts/Access - 2.1.18 -> vL1D Cache Hit Rate - 2.1.19 -> vL1D Cache BW - 2.1.20 -> L2 Cache Hit Rate - 2.1.21 -> L2 Cache BW - 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. `--block`), or build your own config following [config_template](https://github.com/AMDResearch/omniperf/blob/main/src/omniperf_analyze/configs/panel_config_template.yaml). Below shows how to generate a report containing only metric 2 (a.k.a. System Speed-of-Light). -```shell-session -$ 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/unavailable hardware counter or NULL value - -3. Optimize application, iterate, and re-profile to inspect performance changes. -4. Redo a comprehensive analysis with Omniperf CLI at any milestone or at the end. - ### Demo - Single run @@ -338,6 +111,247 @@ Analyze omniperf analyze -p workload1/path/ -k 0 -p workload2/path/ -k 1 ``` +### Recommended workflow + +1) To begin, generate a high-level analysis report utilizing Omniperf's `-b` (a.k.a. `--block`) flag. +```shell-session +$ omniperf analyze -p workloads/vcopy/MI200/ -b 2 + + + ___ _ __ + / _ \ _ __ ___ _ __ (_)_ __ ___ _ __ / _| +| | | | '_ ` _ \| '_ \| | '_ \ / _ \ '__| |_ +| |_| | | | | | | | | | | |_) | __/ | | _| + \___/|_| |_| |_|_| |_|_| .__/ \___|_| |_| + |_| + +Analysis mode = cli +[analysis] deriving Omniperf metrics... + +-------------------------------------------------------------------------------- +0. Top Stats +0.1 Top Kernels +╒════╤══════════════════════════════════════════╤═════════╤═══════════╤════════════╤══════════════╤════════╕ +│ │ Kernel_Name │ Count │ Sum(ns) │ Mean(ns) │ Median(ns) │ Pct │ +╞════╪══════════════════════════════════════════╪═════════╪═══════════╪════════════╪══════════════╪════════╡ +│ 0 │ vecCopy(double*, double*, double*, int, │ 1.00 │ 20160.00 │ 20160.00 │ 20160.00 │ 100.00 │ +│ │ int) [clone .kd] │ │ │ │ │ │ +╘════╧══════════════════════════════════════════╧═════════╧═══════════╧════════════╧══════════════╧════════╛ +0.2 Dispatch List +╒════╤═══════════════╤══════════════════════════════════════════════════════════╤══════════╕ +│ │ Dispatch_ID │ Kernel_Name │ GPU_ID │ +╞════╪═══════════════╪══════════════════════════════════════════════════════════╪══════════╡ +│ 0 │ 0 │ vecCopy(double*, double*, double*, int, int) [clone .kd] │ 0 │ +╘════╧═══════════════╧══════════════════════════════════════════════════════════╧══════════╛ + + +-------------------------------------------------------------------------------- +2. System Speed-of-Light +2.1 Speed-of-Light +╒═════════════╤═══════════════════════════╤═════════╤══════════════════╤══════════╤═══════════════╕ +│ Metric_ID │ Metric │ Avg │ Unit │ Peak │ Pct of Peak │ +╞═════════════╪═══════════════════════════╪═════════╪══════════════════╪══════════╪═══════════════╡ +│ 2.1.0 │ VALU FLOPs │ 0.0 │ Gflop │ 22630.4 │ 0.0 │ +├─────────────┼───────────────────────────┼─────────┼──────────────────┼──────────┼───────────────┤ +│ 2.1.1 │ VALU IOPs │ 364.09 │ Giop │ 22630.4 │ 1.61 │ +├─────────────┼───────────────────────────┼─────────┼──────────────────┼──────────┼───────────────┤ +│ 2.1.2 │ MFMA FLOPs (BF16) │ 0.0 │ Gflop │ 181043.2 │ 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 │ 70.0 │ Cus │ 104.0 │ 67.31 │ +├─────────────┼───────────────────────────┼─────────┼──────────────────┼──────────┼───────────────┤ +│ 2.1.8 │ SALU Utilization │ 3.78 │ Pct │ 100.0 │ 3.78 │ +├─────────────┼───────────────────────────┼─────────┼──────────────────┼──────────┼───────────────┤ +│ 2.1.9 │ VALU Utilization │ 5.4 │ Pct │ 100.0 │ 5.4 │ +├─────────────┼───────────────────────────┼─────────┼──────────────────┼──────────┼───────────────┤ +│ 2.1.10 │ MFMA Utilization │ 0.0 │ Pct │ 100.0 │ 0.0 │ +├─────────────┼───────────────────────────┼─────────┼──────────────────┼──────────┼───────────────┤ +│ 2.1.11 │ VMEM Utilization │ 1.08 │ Pct │ 100.0 │ 1.08 │ +├─────────────┼───────────────────────────┼─────────┼──────────────────┼──────────┼───────────────┤ +│ 2.1.12 │ Branch Utilization │ 1.08 │ Pct │ 100.0 │ 1.08 │ +├─────────────┼───────────────────────────┼─────────┼──────────────────┼──────────┼───────────────┤ +│ 2.1.13 │ VALU Active Threads │ 64.0 │ Threads │ 64.0 │ 100.0 │ +├─────────────┼───────────────────────────┼─────────┼──────────────────┼──────────┼───────────────┤ +│ 2.1.14 │ IPC │ 0.21 │ Instr/cycle │ 5.0 │ 4.13 │ +├─────────────┼───────────────────────────┼─────────┼──────────────────┼──────────┼───────────────┤ +│ 2.1.15 │ Wavefront Occupancy │ 2488.86 │ Wavefronts │ 3328.0 │ 74.79 │ +├─────────────┼───────────────────────────┼─────────┼──────────────────┼──────────┼───────────────┤ +│ 2.1.16 │ Theoretical LDS Bandwidth │ 0.0 │ Gb/s │ 22630.4 │ 0.0 │ +├─────────────┼───────────────────────────┼─────────┼──────────────────┼──────────┼───────────────┤ +│ 2.1.17 │ LDS Bank Conflicts/Access │ │ Conflicts/access │ 32.0 │ │ +├─────────────┼───────────────────────────┼─────────┼──────────────────┼──────────┼───────────────┤ +│ 2.1.18 │ vL1D Cache Hit Rate │ 50.0 │ Pct │ 100.0 │ 50.0 │ +├─────────────┼───────────────────────────┼─────────┼──────────────────┼──────────┼───────────────┤ +│ 2.1.19 │ vL1D Cache BW │ 1664.41 │ Gb/s │ 11315.2 │ 14.71 │ +├─────────────┼───────────────────────────┼─────────┼──────────────────┼──────────┼───────────────┤ +│ 2.1.20 │ L2 Cache Hit Rate │ 35.74 │ Pct │ 100.0 │ 35.74 │ +├─────────────┼───────────────────────────┼─────────┼──────────────────┼──────────┼───────────────┤ +│ 2.1.21 │ L2 Cache BW │ 1296.31 │ Gb/s │ 3481.6 │ 37.23 │ +├─────────────┼───────────────────────────┼─────────┼──────────────────┼──────────┼───────────────┤ +│ 2.1.22 │ L2-Fabric Read BW │ 416.52 │ Gb/s │ 1638.4 │ 25.42 │ +├─────────────┼───────────────────────────┼─────────┼──────────────────┼──────────┼───────────────┤ +│ 2.1.23 │ L2-Fabric Write BW │ 292.3 │ Gb/s │ 1638.4 │ 17.84 │ +├─────────────┼───────────────────────────┼─────────┼──────────────────┼──────────┼───────────────┤ +│ 2.1.24 │ L2-Fabric Read Latency │ 262.85 │ Cycles │ │ │ +├─────────────┼───────────────────────────┼─────────┼──────────────────┼──────────┼───────────────┤ +│ 2.1.25 │ L2-Fabric Write Latency │ 307.4 │ Cycles │ │ │ +├─────────────┼───────────────────────────┼─────────┼──────────────────┼──────────┼───────────────┤ +│ 2.1.26 │ sL1D Cache Hit Rate │ 99.82 │ Pct │ 100.0 │ 99.82 │ +├─────────────┼───────────────────────────┼─────────┼──────────────────┼──────────┼───────────────┤ +│ 2.1.27 │ sL1D Cache BW │ 208.05 │ Gb/s │ 6092.8 │ 3.41 │ +├─────────────┼───────────────────────────┼─────────┼──────────────────┼──────────┼───────────────┤ +│ 2.1.28 │ L1I Hit Rate │ 99.91 │ Pct │ 100.0 │ 99.91 │ +├─────────────┼───────────────────────────┼─────────┼──────────────────┼──────────┼───────────────┤ +│ 2.1.29 │ L1I BW │ 208.05 │ Gb/s │ 6092.8 │ 3.41 │ +├─────────────┼───────────────────────────┼─────────┼──────────────────┼──────────┼───────────────┤ +│ 2.1.30 │ L1I Fetch Latency │ 20.86 │ Cycles │ │ │ +╘═════════════╧═══════════════════════════╧═════════╧══════════════════╧══════════╧═══════════════╛ + +... +``` +2. Use `--list-metrics` to generate a list of available metrics for inspection +```shell-session +$ omniperf analyze -p workloads/vcopy/MI200/ --list-metrics gfx90a + + ___ _ __ +/ _ \ _ __ ___ _ __ (_)_ __ ___ _ __ / _| +| | | | '_ ` _ \| '_ \| | '_ \ / _ \ '__| |_ +| |_| | | | | | | | | | | |_) | __/ | | _| +\___/|_| |_| |_|_| |_|_| .__/ \___|_| |_| + |_| + +Analysis mode = cli +[analysis] deriving Omniperf metrics... +0 -> Top Stats +1 -> System Info +2 -> System Speed-of-Light + 2.1 -> Speed-of-Light + 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 Utilization + 2.1.9 -> VALU Utilization + 2.1.10 -> MFMA Utilization + 2.1.11 -> VMEM Utilization + 2.1.12 -> Branch Utilization + 2.1.13 -> VALU Active Threads + 2.1.14 -> IPC + 2.1.15 -> Wavefront Occupancy + 2.1.16 -> Theoretical LDS Bandwidth + 2.1.17 -> LDS Bank Conflicts/Access + 2.1.18 -> vL1D Cache Hit Rate + 2.1.19 -> vL1D Cache BW + 2.1.20 -> L2 Cache Hit Rate + 2.1.21 -> L2 Cache BW + 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.1.26 -> sL1D Cache Hit Rate + 2.1.27 -> sL1D Cache BW + 2.1.28 -> L1I Hit Rate + 2.1.29 -> L1I BW + 2.1.30 -> L1I Fetch Latency +... +``` +3. Choose your own customized subset of metrics with `-b` (a.k.a. `--block`), or build your own config following [config_template](https://github.com/AMDResearch/omniperf/blob/main/src/omniperf_analyze/configs/panel_config_template.yaml). Below shows how to generate a report containing only metric 2 (a.k.a. System Speed-of-Light). +```shell-session +$ 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/unavailable hardware counter or NULL value + +3. Optimize application, iterate, and re-profile to inspect performance changes. +4. Redo a comprehensive analysis with Omniperf CLI at any milestone or at the end. + ## GUI Analysis ### Web-based GUI @@ -373,13 +387,18 @@ To launch the standalone GUI, include the `--gui` flag with your desired analysi ```shell-session $ omniperf analyze -p workloads/vcopy/MI200/ --gui --------- -Analyze --------- + ___ _ __ + / _ \ _ __ ___ _ __ (_)_ __ ___ _ __ / _| +| | | | '_ ` _ \| '_ \| | '_ \ / _ \ '__| |_ +| |_| | | | | | | | | | | |_) | __/ | | _| + \___/|_| |_| |_|_| |_|_| .__/ \___|_| |_| + |_| +Analysis mode = web_ui +[analysis] deriving Omniperf metrics... Dash is running on http://0.0.0.0:8050/ - * Serving Flask app 'omniperf_analyze.omniperf_analyze' (lazy loading) + * Serving Flask app 'omniperf_analyze.analysis_webui' (lazy loading) * Environment: production WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. @@ -387,7 +406,7 @@ Dash is running on http://0.0.0.0:8050/ * 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) + * Running on http://10.228.33.172:8050 (Press CTRL+C to quit) ``` At this point, users can then launch their web browser of choice and @@ -499,58 +518,59 @@ When using database mode, be sure to tailor the connection options to the machin ```shell-session $ omniperf database --help -ROC Profiler: /usr/bin/rocprof - usage: - + omniperf database [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 + -h, --help show this help message and exit General Options: - -v, --version show program's version number and exit - -V, --verbose Increase output verbosity + -v, --version show program's version number and exit + -V, --verbose Increase output verbosity (use multiple times for higher levels) + -s, --specs Print system specs. Interaction Type: - -i, --import Import workload to Omniperf DB - -r, --remove Remove a workload from Omniperf DB + -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) + -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) + --kernel-verbose Specify Kernel Name verbose level 1-5. Lower the level, shorter the kernel name. (DEFAULT: 5) (DISABLE: 5) ``` **omniperf import for vcopy:** ```shell-session $ omniperf database --import -H dummybox -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 +Pulling data from /home/auser/repos/omniperf/sample/workloads/vcopy/MI200 The directory exists Found sysinfo file KernelName shortening enabled @@ -558,15 +578,15 @@ Kernel name verbose level: 2 Password: Password recieved -- Conversion & Upload in Progress -- - 0%| | 0/11 [00:00 [profile options] [roofline options] -- -------------------------------------------------------------------------------- - +--------------------------------------------------------------------------------- Examples: - - omniperf profile -n vcopy_all -- ./vcopy -n 1048576 -b 256 - omniperf profile -n vcopy_SPI_TCC -b SQ TCC -- ./vcopy -n 1048576 -b 256 - omniperf profile -n vcopy_kernel -k vecCopy -- ./vcopy -n 1048576 -b 256 - omniperf profile -n vcopy_disp -d 0 -- ./vcopy -n 1048576 -b 256 - omniperf profile -n vcopy_roof --roof-only -- ./vcopy -n 1048576 -b 256 - -------------------------------------------------------------------------------- - + omniperf profile -n vcopy_all -- ./vcopy -n 1048576 -b 256 + omniperf profile -n vcopy_SPI_TCC -b SQ TCC -- ./vcopy -n 1048576 -b 256 + omniperf profile -n vcopy_kernel -k vecCopy -- ./vcopy -n 1048576 -b 256 + omniperf profile -n vcopy_disp -d 0 -- ./vcopy -n 1048576 -b 256 + omniperf profile -n vcopy_roof --roof-only -- ./vcopy -n 1048576 -b 256 +--------------------------------------------------------------------------------- + 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 + -q, --quiet Run in quiet mode. + -V, --verbose Increase output verbosity (use multiple times for higher levels) + -s, --specs Print system specs. Profile Options: - -n , --name Assign a name to workload. - -p , --path Specify path to save workload. - - -k [ ...], --kernel [ ...] Kernel filtering. - -d [ ...], --dispatch [ ...] Dispatch ID filtering. - -b [ ...], --block [ ...] Hardware block filtering: - SQ - SQC - TA - TD - TCP - TCC - SPI - CPC - CPF - --join-type Choose how to join rocprof runs: (DEFAULT: grid) - kernel (i.e. By unique kernel name dispatches) - grid (i.e. By unique kernel name + grid size dispatches) - --no-roof Profile without collecting roofline data. - -- [ ...] Provide command for profiling after double dash. - --kernel-verbose Specify Kernel Name verbose level 1-5. Lower the level, shorter the kernel name. (DEFAULT: 2) (DISABLE: 5) + -n , --name Assign a name to workload. + -p , --path Specify path to save workload. + -k [ ...], --kernel [ ...] Kernel filtering. + -d [ ...], --dispatch [ ...] Dispatch ID filtering. + -b [ ...], --block [ ...] Hardware block filtering: + SQ + SQC + TA + TD + TCP + TCC + SPI + CPC + CPF + --join-type Choose how to join rocprof runs: (DEFAULT: grid) + kernel (i.e. By unique kernel name dispatches) + grid (i.e. By unique kernel name + grid size dispatches) + --no-roof Profile without collecting roofline data. + -- [ ...] Provide command for profiling after double dash. Standalone Roofline Options: - --roof-only Profile roofline data only. - --sort Overlay top kernels or top dispatches: (DEFAULT: kernels) - kernels - dispatches - -m [ ...], --mem-level [ ...] Filter by memory level: (DEFAULT: ALL) - HBM - L2 - vL1D - LDS - --device Target GPU device ID. (DEFAULT: ALL) - --kernel-names Include kernel names in roofline plot. - + --roof-only Profile roofline data only. + --sort Overlay top kernels or top dispatches: (DEFAULT: kernels) + kernels + dispatches + -m [ ...], --mem-level [ ...] Filter by memory level: (DEFAULT: ALL) + HBM + L2 + vL1D + LDS + --device Target GPU device ID. (DEFAULT: ALL) + --kernel-names Include kernel names in roofline plot. ``` - The `-k` \ flag allows for kernel filtering, which is compatible with the current rocProf utility. @@ -117,8 +113,6 @@ The following sample command profiles the *vcopy* workload. **vcopy profiling:** ```shell-session $ omniperf profile --name vcopy -- ./vcopy -n 1048576 -b 256 -ROC Profiler: /opt/rocm-5.7.1/bin/rocprof -Execution mode = profile ___ _ __ / _ \ _ __ ___ _ __ (_)_ __ ___ _ __ / _| @@ -127,45 +121,49 @@ Execution mode = profile \___/|_| |_| |_|_| |_|_| .__/ \___|_| |_| |_| -SoC = {'MI200'} -Profiler choice = rocprofv1 -omniperf ver: 1.0.10 +Omniperf version: 2.0.0 +Profiler choice: rocprofv1 Path: /home/auser/repos/omniperf/sample/workloads/vcopy/MI200 Target: MI200 Command: ./vcopy -n 1048576 -b 256 Kernel Selection: None Dispatch Selection: None IP Blocks: All -KernelName verbose: 2 -Current input file: /home/auser/repos/omniperf/sample/workloads/vcopy/MI200/perfmon/pmc_perf_11.txt -RPL: on '240301_151506' from '/opt/rocm-5.7.1' in '/home/auser/repos/omniperf/sample' -RPL: profiling '""./vcopy -n 1048576 -b 256""' -RPL: input file '/home/auser/repos/omniperf/sample/workloads/vcopy/MI200/perfmon/pmc_perf_11.txt' -RPL: output dir '/tmp/rpl_data_240301_151506_553019' -RPL: result dir '/tmp/rpl_data_240301_151506_553019/input0_results_240301_151506' -ROCProfiler: input from "/tmp/rpl_data_240301_151506_553019/input0.xml" - gpu_index = - kernel = - range = - 8 metrics - 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, SQ_INSTS_FLAT_LDS_ONLY, SQ_INSTS_VALU_MFMA_MOPS_I8, SQ_INSTS_VALU_MFMA_MOPS_F16 -vcopy testing on GCD 0 -Finished allocating vectors on the CPU -Finished allocating vectors on the GPU -Finished copying vectors to the GPU -sw thinks it moved 1.000000 KB per wave -Total threads: 1048576, Grid Size: 4096 block Size:256, Wavefronts:16384: -Launching the kernel on the GPU -Finished executing kernel -Finished copying the output vector from the GPU to the CPU -Releasing GPU memory -Releasing CPU memory +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Collecting Performance Counters +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +[profiling] Current input file: /home/auser/repos/omniperf/sample/workloads/vcopy/MI200/perfmon/SQ_IFETCH_LEVEL.txt + |-> [rocprof] RPL: on '240312_174329' from '/opt/rocm-5.2.1' in '/home/colramos/GitHub/omniperf' + |-> [rocprof] RPL: profiling '""./vcopy -n 1048576 -b 256""' + |-> [rocprof] RPL: input file '/home/auser/repos/omniperf/sample/workloads/vcopy/MI200/perfmon/SQ_IFETCH_LEVEL.txt' + |-> [rocprof] RPL: output dir '/tmp/rpl_data_240312_174329_692890' + |-> [rocprof] RPL: result dir '/tmp/rpl_data_240312_174329_692890/input0_results_240312_174329' + |-> [rocprof] ROCProfiler: input from "/tmp/rpl_data_240312_174329_692890/input0.xml" + |-> [rocprof] gpu_index = + |-> [rocprof] kernel = + |-> [rocprof] range = + |-> [rocprof] 6 metrics + |-> [rocprof] GRBM_COUNT, GRBM_GUI_ACTIVE, SQ_WAVES, SQ_IFETCH, SQ_IFETCH_LEVEL, SQ_ACCUM_PREV_HIRES + |-> [rocprof] vcopy testing on GCD 0 + |-> [rocprof] Finished allocating vectors on the CPU + |-> [rocprof] Finished allocating vectors on the GPU + |-> [rocprof] Finished copying vectors to the GPU + |-> [rocprof] sw thinks it moved 1.000000 KB per wave + |-> [rocprof] Total threads: 1048576, Grid Size: 4096 block Size:256, Wavefronts:16384: + |-> [rocprof] Launching the kernel on the GPU + |-> [rocprof] Finished executing kernel + |-> [rocprof] Finished copying the output vector from the GPU to the CPU + |-> [rocprof] Releasing GPU memory + |-> [rocprof] Releasing CPU memory + |-> [rocprof] + |-> [rocprof] ROCPRofiler: 1 contexts collected, output directory /tmp/rpl_data_240312_174329_692890/input0_results_240312_174329 + |-> [rocprof] File '/home/auser/repos/omniperf/sample/workloads/vcopy/MI200/SQ_IFETCH_LEVEL.csv' is generating + |-> [rocprof] +[profiling] Current input file: /home/auser/repos/omniperf/sample/workloads/vcopy/MI200/perfmon/SQ_INST_LEVEL_LDS.txt -ROCPRofiler: 1 contexts collected, output directory /tmp/rpl_data_240301_151506_553019/input0_results_240301_151506 -File '/home/auser/repos/omniperf/sample/workloads/vcopy/MI200/pmc_perf_11.csv' is generating ... -[profiling] Kernel_Name shortening complete. [roofline] Checking for roofline.csv in /home/auser/repos/omniperf/sample/workloads/vcopy/MI200 [roofline] No roofline data found. Generating... @@ -201,7 +199,6 @@ GPU Device 2: Profiling... ... GPU Device 3: Profiling... ... -Peak MFMA IOPs (I8), GPU ID: 3, workgroupSize:256, workgroups:16384, experiments:100, IOP:2147483648000, duration:12.9 ms, mean:166686.0 GOPS, stdev=11.2 GOPS ``` You will notice two main stages in *default* Omniperf profiling. The first stage collects all the counters needed for Omniperf analysis (omitting any filters you have provided). The second stage collects data for the roofline analysis (this stage can be disabled using `--no-roof`) @@ -253,35 +250,41 @@ One can profile specific hardware components to speed up the profiling process. The following example only gathers hardware counters for the Shader Sequencer (SQ) and L2 Cache (TCC) components, skipping all other hardware components: ```shell-session $ omniperf profile --name vcopy -b SQ TCC -- ./vcopy -n 1048576 -b 256 -ROC Profiler: /opt/rocm-5.7.1/bin/rocprof -Execution mode = profile - -SoC = {'MI200'} -Profiler choice = rocprofv1 -fname: pmc_sq_perf8: Added -fname: pmc_spi_perf: Skipped -fname: pmc_sq_perf4: Added -fname: pmc_sq_perf6: Added -fname: pmc_cpf_perf: Skipped -fname: pmc_sqc_perf1: Skipped -fname: pmc_tcc_perf: Added -fname: pmc_tcc2_perf: Skipped -fname: pmc_sq_perf2: Added + ___ _ __ + / _ \ _ __ ___ _ __ (_)_ __ ___ _ __ / _| +| | | | '_ ` _ \| '_ \| | '_ \ / _ \ '__| |_ +| |_| | | | | | | | | | | |_) | __/ | | _| + \___/|_| |_| |_|_| |_|_| .__/ \___|_| |_| + |_| + fname: pmc_cpc_perf: Skipped -fname: pmc_td_perf: Skipped +fname: pmc_spi_perf: Skipped +fname: pmc_cpf_perf: Skipped fname: pmc_tcp_perf: Skipped +fname: pmc_sq_perf4: Added +fname: pmc_tcc_perf: Added +fname: pmc_sq_perf8: Added +fname: pmc_ta_perf: Skipped fname: pmc_sq_perf1: Added fname: pmc_sq_perf3: Added -fname: pmc_ta_perf: Skipped -omniperf ver: 1.0.10 +fname: pmc_td_perf: Skipped +fname: pmc_tcc2_perf: Skipped +fname: pmc_sqc_perf1: Skipped +fname: pmc_sq_perf6: Added +fname: pmc_sq_perf2: Added +Omniperf version: 2.0.0 +Profiler choice: rocprofv1 Path: /home/auser/repos/omniperf/sample/workloads/vcopy/MI200 Target: MI200 Command: ./vcopy -n 1048576 -b 256 Kernel Selection: None Dispatch Selection: None IP Blocks: ['sq', 'tcc'] -KernelName verbose: 2 + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Collecting Performance Counters +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ... ``` @@ -291,30 +294,26 @@ Kernel filtering is based on the name of the kernel(s) you would like to isolate The following example demonstrates profiling isolating the kernel matching substring "vecCopy": ```shell-session $ omniperf profile --name vcopy -k vecCopy -- ./vcopy -n 1048576 -b 256 -ROC Profiler: /opt/rocm-5.7.1/bin/rocprof -Execution mode = profile - -SoC = {'MI200'} -Profiler choice = rocprofv1 -omniperf ver: 1.0.10 + ___ _ __ + / _ \ _ __ ___ _ __ (_)_ __ ___ _ __ / _| +| | | | '_ ` _ \| '_ \| | '_ \ / _ \ '__| |_ +| |_| | | | | | | | | | | |_) | __/ | | _| + \___/|_| |_| |_|_| |_|_| .__/ \___|_| |_| + |_| + +Omniperf version: 2.0.0 +Profiler choice: rocprofv1 Path: /home/auser/repos/omniperf/sample/workloads/vcopy/MI200 Target: MI200 Command: ./vcopy -n 1048576 -b 256 Kernel Selection: ['vecCopy'] Dispatch Selection: None IP Blocks: All -KernelName verbose: 2 -Current input file: /home/auser/repos/omniperf/sample/workloads/vcopy/MI200/perfmon/pmc_perf_12.txt -RPL: on '240301_152305' from '/opt/rocm-5.7.1' in '/home/auser/repos/omniperf/sample' -RPL: profiling '""./vcopy -n 1048576 -b 256""' -RPL: input file '/home/auser/repos/omniperf/sample/workloads/vcopy/MI200/perfmon/pmc_perf_12.txt' -RPL: output dir '/tmp/rpl_data_240301_152305_562565' -RPL: result dir '/tmp/rpl_data_240301_152305_562565/input0_results_240301_152305' -ROCProfiler: input from "/tmp/rpl_data_240301_152305_562565/input0.xml" - gpu_index = - kernel = vecCopy +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Collecting Performance Counters +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ... ``` @@ -324,32 +323,26 @@ Dispatch filtering is based on the *global* dispatch index of kernels in a run. The following example profiles only the 0th dispatched kernel in execution of the application: ```shell-session $ omniperf profile --name vcopy -d 0 -- ./vcopy -n 1048576 -b 256 -ROC Profiler: /opt/rocm-5.7.1/bin/rocprof -Execution mode = profile - -SoC = {'MI200'} -Profiler choice = rocprofv1 -omniperf ver: 1.0.10 + ___ _ __ + / _ \ _ __ ___ _ __ (_)_ __ ___ _ __ / _| +| | | | '_ ` _ \| '_ \| | '_ \ / _ \ '__| |_ +| |_| | | | | | | | | | | |_) | __/ | | _| + \___/|_| |_| |_|_| |_|_| .__/ \___|_| |_| + |_| + +Omniperf version: 2.0.0 +Profiler choice: rocprofv1 Path: /home/auser/repos/omniperf/sample/workloads/vcopy/MI200 Target: MI200 Command: ./vcopy -n 1048576 -b 256 Kernel Selection: None Dispatch Selection: ['0'] IP Blocks: All -KernelName verbose: 2 - -Current input file: /home/auser/repos/omniperf/sample/workloads/vcopy/MI200/perfmon/timestamps.txt -RPL: on '240301_152445' from '/opt/rocm-5.7.1' in '/home/auser/repos/omniperf/sample' -RPL: profiling '""./vcopy -n 1048576 -b 256""' -RPL: input file '/home/auser/repos/omniperf/sample/workloads/vcopy/MI200/perfmon/timestamps.txt' -RPL: output dir '/tmp/rpl_data_240301_152445_563349' -RPL: result dir '/tmp/rpl_data_240301_152445_563349/input0_results_240301_152445' -ROCProfiler: input from "/tmp/rpl_data_240301_152445_563349/input0.xml" - gpu_index = - kernel = - range = 0 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Collecting Performance Counters +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ... ```