Commit Graph

622 Commitit

Tekijä SHA1 Viesti Päivämäärä
xuchen-amd e7a7af539a Add mi325 specs. (#663) 2025-04-07 17:03:40 -04:00
cfallows-amd c45e20f325 Fixes for roofline datatype plot outputs (#659)
Profile mode:
Fix roofline plots for datatypes that have peakVALU only. Check for highest roofline to plot the bandwidth lines to proper height, don't rely on existence of peakMFMA for every datatype.
Analyze mode:
Add roofline-data-type option for viewing pdfs in standalone gui. Default is same as profile mode, FP32.

---------

Signed-off-by: Carrie Fallows <Carrie.Fallows@amd.com>
2025-04-07 12:10:37 -04:00
vedithal-amd f9aa7be97c Support MI 350 profiling (#632)
* Add MI 350 hardware information

* Refactor MI GPU YAML file and corresponding interface

* Add SoC file for gfx950 architecture

* Add analysis report configs for MI 350 containing existing metrics

* Add placeholder None valued metrics for previous architectures to make
  baseline comparison work

* Enable testing on MI 350

* Analysis config metric changes
    - SPI changes
        - Update metric formula for default SPI pipe counter
             - Use efficiently collected pipe wise SPI counters
        - Add SPI Wave Occupancy
        - Add Scheduler-Pipe Wave Utilization
        - Update formula for VGPR Writes
        - Add Scheduler-Pipe FIFO Full Rate
   - CPC changes
	- Add CPC SYNC FIFO Full Rate
	- Add CPC CANE Stall Rate
        - Add CPC ADC Utilization
   - SQ changes
        - Add VALU co-issue efficiency
        - Add F6F4 datatype metrics
        - Update formula for total FLOPs by adding F6F4 counters
        - Add LDS STORE / LOAD / ATOMIC metrics
        - Add LDS STORE / LOAD / ATOMIC bandwidth
        - Add LDS FIFO and TA ADDR / CMD / DATA FIFO full rates

* Collect TCP_TCP_LATENCY_sum only for gfx950 (MI 350)

* Do not inject SQ_ACCUM_PREV_HIRES unnecesarily

* Do not hardcode memory and shader clock speeds

* Write num_hbm_channels to sysinfo.csv instead of hbm_bw while profiling

* Move generate sysinfo.csv to pre processing step of profiling

* Add warnings to use --specs-correction for missing sysinfo.csv values during analysis phase

* Update CHANGELOG

* Analysis phase warning to use --specs-correction when needed
2025-04-03 02:21:18 -04:00
xuchen-amd f3736778f4 Add mi350 ta td tcp tcc counters (#653)
* Add mi350 TA and TD metrics.

* Add mi350 TCC metrics, and separate write and atomic metrics.

* Add mi350 TCP metrics.

* Add none values for non-gfx950 socs, remove missing metrics in rocprofv3.

---------

Signed-off-by: xuchen-amd <xuchen@amd.com>
2025-04-02 21:25:47 -04:00
xuchen-amd c7202923b0 remove flask debug msg (#655)
* Suppress Flask warning message in quiet mode.

* Init args.gui if dne.
2025-04-02 20:29:39 -04:00
xuchen-amd dce75f4afa Enable tuned performance counters for gfx950 (#652)
* Enable non-functional performance counters for gfx950.

* Update changelog.

* Add none value metrics for non-gfx950 socs

* Remove rocprofv3 missing metrics.
2025-04-02 14:43:12 -04:00
raramakr df2296529b SWDEV-521636 - Add dependent script path to system path in rocprof-compute (#651)
In wheel environment, rocprof-compute in bin folder is not a soft link. For executing rocprof-compute from bin folder, the system path should also have the dependency script paths. Added the same
2025-04-02 09:41:02 -07:00
xuchen-amd e77dd1a1ab Improve chip id logic (#648)
* Improve chip id logic, add missing physical and virtual chip ids.
2025-04-01 12:18:07 -04:00
ywang103-amd 7b38766caa re-write fucntion that detects whether v1 is in use to avoid false negative result when ROCPROF is not set (#647) 2025-03-31 16:40:53 -04:00
Fei Zheng 9bacad0876 Support host-trap PC Sampling on CLI (beta version) 2025-03-28 16:51:49 -06:00
Ben Richard 9bd45f5135 Read Accum_VGPR_Count from rocprof output if provided (#645) 2025-03-28 10:43:24 -04:00
ywang103-amd 7c1f14123a fix the wrong number of channels of TCC counters to put in pmc txt file (#633) 2025-03-27 18:15:41 -04:00
ywang103-amd cdb93b7a4c fix ip block test by changing ways of extracting agent id (#639) 2025-03-27 16:28:00 -04:00
vedithal-amd af76525baa Inject SQ_ACCUM_PREV_HIRES for LEVEL counters only (#641) 2025-03-27 10:24:21 -04:00
cfallows-amd 6cb5bcdbe9 Add datatypes for roofline profiling (#642)
Rebuild of rocm-amdgpu-bench roofline binaries for MI200/MI300 systems with rocm6.
Added datatype options to roofline feature.

---------

Signed-off-by: Carrie Fallows <Carrie.Fallows@amd.com>
2025-03-26 21:07:48 -04:00
Cole Ramos 04f92b72a9 Fix incorrect logging in mi_gpu_spec.py (#626)
* Move console logging to logger function to avoid circular dependency in utils module

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

* Apply python formatting

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

* Remove the default StreamHandler before adding the custom

 If you are not explicitly removing this default handler, it could be causing duplicate outputs.

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

* Fix lingering bugs from merge conflict resolution

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

* Comply to python formatting and update pre-commit hook helper

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

* Removing redundant console_log call as the get_mi300_num_xcds() call, otherwise ALL Mi200 profiling runs will print this message

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

---------

Signed-off-by: coleramos425 <colramos@amd.com>
2025-03-25 17:06:37 -05:00
xuchen-amd 3294c495f5 Improve readability. (#628) 2025-03-25 17:49:42 -04:00
Cole Ramos 38c7dce84a Generalize locale checker to support more UTF-8 types (#623)
Signed-off-by: coleramos425 <colramos@amd.com>
2025-03-25 16:39:02 -05:00
ywang103-amd 983f902fa0 fix the crash related to agent id in rocprofv3 (#631) 2025-03-25 16:33:12 -04:00
ywang103-amd a92bf96e56 disable TCC flattern for rocprofv1 to avoid its crash becasue of unsupported implementation (#629) 2025-03-25 15:12:19 -04:00
cfallows-amd a492e92034 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>
2025-03-25 15:02:09 -04:00
vedithal-amd 58cf702d40 Remove static pmc files (#606)
* Delete static pmc files

* Counter parsing changes
	- Move counter parsing logic to another function
	- Fix counter parsing regex
	- Log list of counters being collected

* Sanity check counters supported by rocprof
	- Emit warning instead of error since rocprof support counters
	  list might be inaccurate

* Do not collect these counters
	- TCP_TCP_LATENCY_sum (except for gfx908 and gfx90a)
	- SQC_DCACHE_INFLIGHT_LEVEL

* Update logic of writing TCC channel counter definition yaml file

* Fix bug in capture_subprocess_output() utility function
	- Make logging optional in capture_subprocess_output()

* Fix formatting and tests

* Update changelong
2025-03-24 17:43:29 -04:00
ywang103-amd 0c0906f238 fix the part that casue _sum counters missing for TCC (#627) 2025-03-24 11:16:03 -04:00
cfallows-amd fbe5e34a46 Add Alibaba Cloud Linux 3 to distro checking for roofline (#620)
Signed-off-by: Carrie Fallows <Carrie.Fallows@amd.com>
2025-03-21 12:46:17 -04:00
xuchen-amd 2e7f82aa13 Improve chip info logic. (#581)
* Clean up unused functions.

* Fix number of XCDs for MI300X CPX (core partition).

* Add support for memory partition mode.

* Modify total_xcd to adapt to all gpu models.

* Run black and isort.

* Make gpu_arch regex more generic.

* Add error checking for compute partition mode num xcds.

* Set gpu_chip_id as optional.

* Fix get_gpu_model.

---------

Signed-off-by: xuchen-amd <xuchen@amd.com>
2025-03-21 02:02:58 -04:00
ywang103-amd b596098d14 Revert "fix the error of output path of multi-node mode (#616)" (#621) 2025-03-20 22:03:02 -04:00
ywang103-amd 46e15dc840 TCC per channel metric's fix for rocprofv3 (#597) 2025-03-20 20:09:27 -04:00
ywang103-amd 23b42e90c9 fix the error of output path of multi-node mode (#616)
* solve the error that makes name passed by -n not used in multi-node applications

* isort and black formatted
2025-03-18 17:19:19 -04:00
vedithal-amd 45b8937d5d Fix kernel filtering when using rocprofv3 (#615)
When using rocprof v3:
* Use --kernel-include-regex for kernel name filtering
* Use --kernel-iteration-range for kernel dispatch filtering

Update changelog
2025-03-18 11:26:45 -04:00
vedithal-amd 64ccd588de Band aid fix for MI 100 no counters collected (#614)
* rocprofv3 might not collect any counters for MI 100, handle this case gracefully to prevent test failures
2025-03-18 11:26:17 -04:00
Ben Richard 96a25e8cbc Remove dependency on en_US.UTF-8 locale (#613)
Set locale to C.utf8 instead of en_US.UTF-8

Avoid forcing the user to use en_US.UTF-8. Most Linux systems have C.utf8.
2025-03-17 16:40:36 -04:00
ywang103-amd 0c6cec5671 replace rocm-smi with amd-smi cmd (#612) 2025-03-17 16:20:41 -04:00
cfallows-amd 1c237c1382 Debug logging during intensities calculations when no flops recorded (#608)
Added debug log for when no flops are recorded (total_flops is 0), so AI points will not be plotted.
Removed commented out print statement that is not functional- contains nonexistent method call.

Signed-off-by: Carrie Fallows <Carrie.Fallows@amd.com>
2025-03-14 12:37:19 -04:00
vedithal-amd 30752d1547 selective counter bugfix (#602)
Allow block filter of the form xx.x
2025-03-11 13:34:48 -04:00
cfallows-amd 097d30dc5c Add fp8 graph to standalone gui in analysis mode (#600)
Signed-off-by: Carrie Fallows <Carrie.Fallows@amd.com>
2025-03-11 13:32:37 -04:00
Fei Zheng 7e8d2d2c0e Fix counter collection inconsistency with rocprofv3 2025-03-10 21:05:40 -06:00
vedithal-amd 55cf0e237e Analysis report block based filtering for profiling (#566)
* Analysis report block based filtering for profiling

* Profiling mode changes

- `-b` option now additionally accepts metric id(s), similar to `-b` option in analyze mode (e.g. 6, 6.2, 6.23)
    - Only counters mentioned in the selected analysis report blocks will be collected
        - Add parsing logic to identify hardware counters from analysis report blocks
        - Add filtering logic to only write filtered counters in perfmon files
        - Log not collected counters in one line
- `--list-metrics` option added in profile mode to list possible metric id(s) similar to analyze mode
- Write arguments provided during profiling in profiling_configuration.yaml file

* Analysis mode changes

- During analysis mode, only show report blocks selected during profiling
    - If `-b` option is provided in analysis mode, then follow provided filters
- Do not show empty tables in analysis report

* Miscellaneous changes

- Update CHANGELOG
- Add test cases
    - Instruction mix report block filter
    - Instruction mix and Memory chart report block filter
    - Instruction mix report block filter and CPC hardware block filter
    - TA hardware block filter
    - --list-metrics in profile mode should work
- Move binary handler fixtures to conftest.py to avoid importing
  fixtures
- cmake file in tests directory has been updated to compile sample/vmem.hip for testing

* Public documentation changes

- Use the term "Hardware report block" instead of "Hardware block"
- Add documentation for "--list-metrics" option in profile mode
- Add example of filtering by hardware report block such as instruction
  mix and wavefront launch statistics
- Add deprecation warning for hardware component (sq, tcc) based filtering
2025-03-10 14:42:56 -04:00
cfallows-amd 848fa1dc18 FP8 roofline support (#592)
Adding FP8 datatype to roofline feature in rocprof-compute on MI300-based systems.
FP8 now shows in terminal output and roofline csv, and outputs a standalone PDF.

---------

Signed-off-by: Carrie Fallows <Carrie.Fallows@amd.com>
2025-03-07 11:27:01 -05:00
Fei Zheng f64c83fc5e fix specs-correction 2025-03-07 11:27:01 -05:00
xuchen-amd 1b6bc89137 Disable --kokkos-trace in rocprof-compute (#594)
.
2025-03-07 11:27:01 -05:00
xuchen-amd b81310070e Fix rocprofv1 output processing. (#588) 2025-03-07 11:27:01 -05:00
Fei Zheng 6ece52fbe8 Change normal_unit default to per_kernel 2025-02-27 12:46:47 -07:00
Fei Zheng 58217f2c6a Add FP8 metrics for MI300 2025-02-26 18:45:19 -07:00
vedithal-amd 19a9365bb9 Do not fail if VERSION.sha not found (#579)
* Create VERSION.sha file while creating standalone binary

* Do not fail on VERSION.sha not found

* Add git to docker container for testing
2025-02-26 11:39:37 -05:00
vedithal-amd 649660d54e Check PATH to verify executable in remaining args (#578) 2025-02-24 13:33:55 -05:00
xuchen-amd 10e1d57bfb Improve kokkos trace handling. (#573)
* Improve kokkos trace is handling.

* Fix formatting.

* Syntax fix and adding comments.
2025-02-22 14:07:14 -05:00
ywang103-amd e5803eb243 Parser: to_int() return None instead of np.nan (#569) 2025-02-20 10:20:06 -05:00
ywang103-amd b9fc44992a fix missing parameter of spatial multiplexing for create_df_pmc (#567) 2025-02-14 14:23:16 -05:00
ywang103-amd 808a9a79ed Spatial multiplexing: part2, analysis (#542)
Co-authored-by: Yang Wang <ywang103@amd.com>
2025-02-13 15:38:59 -08:00
ywang103-amd 5ee37b3353 fix crash for running rocprofv3 on mi100 (#557)
* initial hack to fix for v3 stucking on mi100 becasue of -m parameter and missing counter csv file

* proper formating

* refactored profiler option function to take soc arch

* resolve missing step that casued error for profiler option

* fix typo of arch name

* change method of putting soc info into profiler option

* isort and black format

* add comment for the part that handles missing counter csv file

* remove unncecessary import

---------

Co-authored-by: YANG WANG <ywang@ywang-ubuntu.amd.com>
2025-02-10 17:59:03 -05:00