Datatype selection option for roofline (#624)

Added command line option to specify which datatype(s) to capture into the roofline PDF(s).
All datatypes are still collected by roofline call if applicable, but only specific datatypes are plotted into PDF outputs. Will dump out all datatypes into one graph, but separate FP from Int into two graphs if needed. Will skip datatype and give error message if the datatype is not valid on a particular gpu arch.
Default is FP32

Reworked roofline calls and plotting to be general enough such that any new datatypes added into rocm-amdgpu-bench can easily be reflected in rocprof-compute with simple modifications in roofline_calc.py.

Adjusted ctest to reflect expected default pdf outputs from roofline.

---------

Signed-off-by: Carrie Fallows <Carrie.Fallows@amd.com>
这个提交包含在:
cfallows-amd 编写, GitHub 于 2025-03-25 15:02:09 -04:00 提交
1 父节点 58cf702d40
当前提交 a492e92034
8 个文件已更改
+179 -139

没有与搜索条件相匹配的文件

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 89 KiB

之后

宽度:  |  高度:  |  大小: 64 KiB

+6 -6
查看文件
@@ -474,6 +474,9 @@ Roofline options
Allows you to specify a device ID to collect performance data from when
running a roofline benchmark on your system.
``--roofline-data-type <datatype>``
Allows you to specify datatypes that you want plotted in the roofline PDF output(s). Selecting more than one datatype will overlay the results onto the same plot. Default: FP32
To distinguish different kernels in your ``.pdf`` roofline plot use
``--kernel-names``. This will give each kernel a unique marker identifiable from
the plot's key.
@@ -507,8 +510,7 @@ successfully.
$ ls workloads/vcopy/MI200/
total 48
-rw-r--r-- 1 auser agroup 13331 Mar 1 16:05 empirRoof_gpu-0_fp32_fp64.pdf
-rw-r--r-- 1 auser agroup 13136 Mar 1 16:05 empirRoof_gpu-0_int8_fp16.pdf
-rw-r--r-- 1 auser agroup 13331 Mar 1 16:05 empirRoof_gpu-0_FP32.pdf
drwxr-xr-x 1 auser agroup 0 Mar 1 16:03 perfmon
-rw-r--r-- 1 auser agroup 1101 Mar 1 16:03 pmc_perf.csv
-rw-r--r-- 1 auser agroup 1715 Mar 1 16:05 roofline.csv
@@ -517,11 +519,9 @@ successfully.
.. note::
ROCm Compute Profiler generates three roofline outputs to organize results and reduce
clutter. One chart plots FP32/FP64 performance, one plots I8/FP16
performance, and the other plots FP8 performance.
ROCm Compute Profiler currently captures roofline profiling for all data types, but has the ability to reduce clutter in the PDF outputs by selecting datatype(s). Selecting multiple datatypes will overlay the results into the same PDF. If the user would like separate PDFs for each datatype off of the same workload run, the user can run the profiling command again with the single datatype as long as the roofline.csv still exists in the workload folder.
The following image is a sample ``empirRoof_gpu-0_int8_fp16.pdf`` roofline
The following image is a sample ``empirRoof_gpu-0_FP32.pdf`` roofline
plot.
.. image:: ../../data/profile/sample-roof-plot.jpg
+1 -1
查看文件
@@ -231,7 +231,7 @@ The following table lists ROCm Compute Profiler's basic operations, their
* - :ref:`Standalone roofline analysis <standalone-roofline>`
- ``profile``
- ``--name``, ``--roof-only``, ``-- <profile_cmd>``
- ``--name``, ``--roof-only``, ``--roofline-data-type <data_type>``, ``-- <profile_cmd>``
* - :ref:`Import a workload to database <grafana-gui-import>`
- ``database``