Commit Graph

812 Commits

Author SHA1 Message Date
Indic, Vladimir de4708963e [Stochastic PC Sampling][GFX9] Increasing ROCr buffer to 4MBs. (#487)
Increasing ROCr buffer to 4MBs.
2025-07-18 12:06:17 -05:00
Madsen, Jonathan 4d6a61f5e5 [SDK] Fix null handles (#474)
* Fix null handle

- use .handle=0, not .handle=numeric_limits<>::max()

* Update lib.common.hasher

* Fix ROCPROFILER_CONTEXT_NONE

* Use context operator==

* Update CHANGELOG

* Updated null handle for scratch memory and changed allocation test so that free ops account for null agent

---------

Co-authored-by: Ian Trowbridge <Ian.Trowbridge@amd.com>
2025-07-18 12:05:52 -05:00
Nagaraj, Sriraksha fcfb5bd918 [SDK] Update UUID (rocprofiler_uuid_t) (#390)
* changing uuid abi

* fix

* review comments

* fix CI fail

* review comments

* fix

* adding static asserts

* making constructor constexpr

* fix CI fail

* upadate UUID length to 16 bytes

* fixing value64

Co-authored-by: Madsen, Jonathan <Jonathan.Madsen@amd.com>

* Update CHANGELOG.md

Co-authored-by: Madsen, Jonathan <Jonathan.Madsen@amd.com>

---------

Co-authored-by: Madsen, Jonathan <Jonathan.Madsen@amd.com>
2025-07-18 11:24:48 -05:00
Bonnell, Jason f4cce0d2d4 replace azure runners with internal (#518)
* replace azure runners with internal

* change to mi300a for debug

* revert back to mi300

* move some of the load to mi300a

* use mi300a for clang-tidy

---------

Co-authored-by: Kandula, Venkateshwar reddy <Venkateshwarreddy.Kandula@amd.com>
2025-07-17 18:09:17 -05:00
Indic, Vladimir 650d35bdaa [Host-Trap PC Sampling] Host-Trap PC sampling an introduce an arbitrary sampling skid of [0, 2] instructions (#515)
* Arbitrary host-trap sampling skid (doc)

The host-trap PC sampling might introduce a skid of [0, 2]
instructions. We documented this information and provides
some advice to application developers how to find
hot-spots in the profiles generated by host-trap sampling.
2025-07-17 17:59:46 +02:00
Wang, Huanran 5c45c77ec7 [rocprofv3] Sanitize string of command in rocpd (#467)
Sanitize string of command in rocpd

Co-authored-by: Huanran Wang <huanrwan@amd.com>
2025-07-15 13:01:14 -04:00
Tumakaev, Aleksei 4af73d078f [rocprofv3] Fix incorrect position of Allocation_Size header in memory_allocation csv (#510)
Fix incorrect position of Allocation_Size header in memory_allocation csv
2025-07-15 18:15:22 +02:00
Kandula, Venkateshwar reddy d2393c97f8 [CI] add hip api table version of 13 to enum string (#509)
add hip table version to 13, API_ID_LAST is not changed from version=12 since no new struct has been added.

Co-authored-by: Venkateshwar Reddy Kandula <vkandula@amd.com>
2025-07-11 16:22:12 -05:00
Welton, Benjamin 7e3ea0c58e [SWDEV-540753] Reduce memory allocations in device profiling (#507)
Cache packet creation in all cases to reduce the number of allocations/
destruction operations made down to KFD. There is a bug that we
encounter after a period of runtime in KFD where allocations fail to be
visable to the GPU (suspect this is a FW issue, similar to other FW
issues they have had along the same lines). This sidesteps that issue in
rocprof (and likely should be done regardless)

Co-authored-by: Benjamin Welton <bewelton@amd.com>
2025-07-11 12:46:19 -07:00
Nagaraj, Sriraksha 3aaffc42da [rocprofv3-avail] Documentation update and column formatting (#447)
* addressing issues

* doc fix

* test fix

* fix

* fix formatting issue and doc update

* fix column size

* fix

* fix formatting in output

* tests fix

* test fix

* add new line

* add new line

* fix new line

* fixing typo in using-rocprofv3-avail.rst
2025-07-10 11:41:12 -05:00
Elwazir, Ammar e5161f6e06 Fixing Docs Workflow (#505) 2025-07-09 17:19:16 -05:00
Elwazir, Ammar d68e1754d7 Fix Docs Workflow (#504)
* Update docs.yml

* Update docs.yml

* Update docs.yml
2025-07-09 12:45:49 -05:00
Elwazir, Ammar a871e3534a GPU-less runners update (#503)
* Update codeql.yml

* Update codeql.yml

* Update codeql.yml

* Update codeql.yml

* Update codeql.yml

* Update codeql.yml

* Update codeql.yml

* Update codeql.yml

* Update codeql.yml

* Update codeql.yml

* clean up

* clean up

* clean up

* Update codeql.yml

* Update codeql.yml

---------

Co-authored-by: Ammar ELWazir <aelwazir@amd.com>
2025-07-09 11:46:47 -05:00
U, Srihari 6f2a5a9646 Add perfetto support for scratch memory (#303)
* Add perfetto support for scratch memory

* Updated tests and docs.

* Update docs data

* Added underflow check

* Record all free events to 0 bytes

* Add format

* Address review comment

* updated tests for scratch memory

* update scratch-memory tests.
2025-07-09 21:05:45 +05:30
Welton, Benjamin 2c4e20b951 [SWDEV-516561][1/2] Add MARKER_RANGE_EXTENT to capture ROCTX ranges (#363)
* [SWDEV-516561][1/2] Add MARKER_RANGE_EXTENT to capture ROCTX ranges

Range extent to capture all work between roctxpush/pop operations. Entry callback takes place during roxtxpush and exit callback takes place in roctxpop. This is primarily to allow us to keep an ancestor id on the ancestor stack such that all operations that take place within the push/pop context can be annotated as being apart of this range. With the current setup (where push and pop are two separate operations that need to be combined externally), we cannot keep an ancestor id on the stack and thus cannot tie tracing events to particular ranges.

Correlation id information is inherited from the push operation. Ancestor id needs to be added in a future commit that also outputs this ancestor to CSV.

Output:

```
[ctest] {'size': 64, 'kind': 7, 'operation': 1, 'correlation_id': {'internal': 1525, 'external': 0, 'ancestor': 1524}, 'start_timestamp': 2932551479402642, 'end_timestamp': 2932551491178449, 'thread_id': 3254861}
[ctest] {'size': 64, 'kind': 8, 'operation': 2, 'correlation_id': {'internal': 1525, 'external': 0, 'ancestor': 1524}, 'start_timestamp': 2932551479405878, 'end_timestamp': 2932551491181214, 'thread_id': 3254861}
```

Note: Kind 8 = range extent op.

* Merge fix

Revert several changes

source/lib/rocprofiler-sdk/marker/range_marker.*

- separate out range marker implementation for standard marker implementation

Update public API with marker core range

Support marker core range in sdk (source/lib/rocprofiler-sdk)

Transition rocprofiler-sdk-tool and output lib to use marker core range

Misc fixes for tests

Fix logic in lib/output/generate{CSV,Stats}.cpp

Update tests/rocprofv3/tracing-hip-in-libraries (marker validation)

Fix test_otf2_data

* Test fixes

---------

Co-authored-by: Benjamin Welton <bewelton@amd.com>
2025-07-08 23:41:22 -07:00
Welton, Benjamin 2fa98c4d14 [SDK] Added retry for signal wait (#494)
Added retry for signal wait

Co-authored-by: Benjamin Welton <bewelton@amd.com>
2025-07-08 23:28:02 -07:00
Roy, Rakesh 30e239d1b7 Fix find_if build error for RHEL10 (#499)
overriding Jonathan's final approval ( as it is a long weekend in US/NA)
adding algorithm header to recognize stdlib's find_if looks fine
2025-07-04 09:20:23 -04:00
Bhardwaj, Gopesh e7616c3aad Adding OpenMP usage with rocprofv3 (#472)
* Adding openmp usage with rocprofv3

* minor changes

* Fixing missing line
2025-07-02 12:25:24 +05:30
Baraldi, Giovanni c0c08b2f08 [rocprofv3] Fix ATT library path (#476)
* Fix library path

* Update docs

* Review comments

* Update source/bin/rocprofv3.py

---------

Co-authored-by: Giovanni Baraldi <gbaraldi@amd.com>
2025-07-01 22:08:29 +02:00
Nagaraj, Sriraksha 1524ceb84d [SDK] Internal event id for AQL packet increased to 64-bit unsigned int (#380)
* event id to 64 bit size

* review comments

* review comments

* review comments

* fix

* handle exception

* fix formatting issue

* fix tests
2025-06-30 17:54:37 -05:00
Madsen, Jonathan 3590ecc10e [SDK] Fix buffer tracing stringify of stack-allocated char* buffer (#429)
* [SDK] Fix buffer tracing stringify of stack-allocated char* buffer

* Formatting

---------

Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
2025-06-30 17:51:26 -05:00
Madsen, Jonathan 730b4e0a54 [CI] Use rocprof-azure-gpuless-emu-runner-set for build-docs-from-source job (#493) 2025-06-30 17:50:43 -05:00
Trowbridge, Ian 0904b6e34d [rocprofv3] Add check for Stream Stack Pointer before use (#465)
* Added null check for stream_stack before get_stream_id is called

* Rename function and add check for stream strack before pop

* Removed empty check for stream stack and adding error log for get_stream_id in stream.cpp
2025-06-30 17:49:48 -05:00
Madsen, Jonathan 99e262ca4a [CI] Disable conversion script validation (#492)
- pytest fails when you selectively disable all the tests in the suite
2025-06-30 17:02:53 -05:00
Kuricheti, Mythreya 7842dfe839 [SDK] Filter agents that are not CPU or GPU (#374)
* Filter HSA agents

* Review comments
2025-06-30 15:54:48 -05:00
Madsen, Jonathan f0fe04b95e [CI] Disable other unstable tests (#491)
Disable other unstable tests

- validation test_validate_counter_collection_pmc1 for conversion script
- increase timeout for tests/rocprofv3/pc-sampling execution phase
2025-06-30 15:53:30 -05:00
Madsen, Jonathan 69f71b8097 [CI] Disable other unstable tests (#490)
* Disable other unstable tests

* Disable validating test_total_runtime in kernel-tracing

* The disabled tests will be stabilized and re-enabled by ROCm 7.0.1 or ROCm 7.1
2025-06-30 15:42:38 -05:00
Madsen, Jonathan 640ca55ac0 [CI] Testing stability (#486)
* [CI] Testing Stability

- CMake option ROCPROFILER_DISABLE_UNSTABLE_CTESTS
  - used for tests which periodically fail around 1 out of every 10 runs
  - set to ON while instability remains, this needs to set to OFF in ROCm 7.1 or, ideally, ROCm 7.0.1
- Use FIXTURES_SETUP and FIXTURES_REQUIRED for some tests
- replace "threw an exception" with "${ROCPROFILER_DEFAULT_FAIL_REGEX}" for misc FAIL_REGULAR_EXPRESSIONS

* Remove contents of all EXCLUDE_{TESTS,LABEL}_REGEX from CI workflow

* Disable patch git step in code-coverage run

* Tweak spin time of reproducible runtime

* Removed patch git step in code-coverage run

* Update ROCPROFILER_DEFAULT_FAIL_REGEX

* Mark test-counter-collection tests as unstable

- add fixtures setup/required

* Remove ATTACHED_FILES_ON_FAIL

- CDash doesn't store enable downloading these properly anyway

* Relax collection-period fuzzing window

* Disable unstable collection-period test

- too unstable

* formatting

* Disable unstable device_counting_service_test.async_counters

* Suppress perfetto internal data race errors

* Switch code-coverage CI jobs to mi300 runner

* Timeout increases

* rocprofv3-test-rocpd updates

- add fixtures
- switch executable
- redefine input/output paths

* Revert code-coverage job to mi300a runner

* Update rocprofv3-test-rocpd-execute-multiproc

- reduce problem size

* disable multiproc rocpd

* Split code-coverage into separate workflow

- network issues cause this job to fail frequently
- when in a separate workflow, it can be restarted easily

* Fixtures for rocprofv3-test-trace-hip-in-libraries

* Disable unstable device_counting_service_test.sync_counters

* Potential fix for code scanning alert no. 171: Workflow does not contain permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* Switch code-coverage to run on rocprof-azure

- mi300a EMU runner set is unstable (network issues)

* tests/rocprofv3/pc-sampling SKIP_REGULAR_EXPRESSION

* Update rocprofv3-test-list-avail-trace-execute

- reduce log level and increase timeout

* rocprofv3: Prevent recursive call to rocprofv3_error_signal_handler + log chaining

* rocprofv3: Use ROCP_ERROR + std::exit instead of ROCP_FATAL

- should help with SKIP_REGULAR_EXPRESSION

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-06-30 15:07:37 -05:00
Elwazir, Ammar 5962747bf7 Adding Manual Trigger for mainline and staging public sync (#489)
* Update sync-staging.yaml

* Update sync-mainline.yaml
2025-06-30 11:13:50 -05:00
Kandula, Venkateshwar reddy 375866383b [SDK] Add gfx950 targets for tests and samples (#399)
* add gfx950 targets.

* add gfx950 targets to ci workflows.

* Format.

---------

Co-authored-by: Venkateshwar Reddy Kandula <vkandula@amd.com>
Co-authored-by: Vaddireddy, Sushma <Sushma.Vaddireddy@amd.com>
2025-06-26 14:25:08 -05:00
Trowbridge, Ian 1f8b8c5e9f Modified perfetto output for HIP stream display (#431)
* Modified perfetto output for HIP stream display

* Moved stream_map file location and changed perfetto output names Private_Segment_Size and Group_Segment_Size to Scratch_Size and LDS_Block_Size respectively

* Used const_cast to remove const modifier on void*

* Reverted stream_map changes, now using tool_metadata map to track mapping between stream ptrs and stream IDs

* Removed buffer tracing args in perfetto, added tool_...hip buffer record struct that stores the HIP stream ID for display purposes

* Updated rocpd perfetto.cpp to reflect stream changes. Still need to add vgpr values and stream ID for HIP API

* Changes pass-by const reference to pass-by const value
2025-06-26 14:22:50 -05:00
Kuricheti, Mythreya 8a461afe20 [SDK] KFD new events API (#321)
* Remove page-migration

* Add KFD events API

* Address review comments

* Move assert checks

* Update enum-string utils

* Update codeowners

* Update KFD header

* Add perfetto category
2025-06-26 13:28:45 -05:00
Trowbridge, Ian eb8c9af720 Modified test for agent.cpp where GPUs are missing the UUID (#405)
* Modified test for agent.cpp where multiple GPUs share th same UUID

* Updated for review comments
2025-06-25 17:36:56 -05:00
Elwazir, Ammar 73ee59244d Fixing Docker Pull Rate Issue (#483)
Update rocm_release_compatibility.yml
2025-06-25 17:16:22 -05:00
Elwazir, Ammar 9ec3cc7f62 Python Lint Fix (#482)
Update python.yml
2025-06-25 14:58:56 -05:00
Elwazir, Ammar 25f5cbc0c7 Multiple CI Fixes & Clean up (#477)
* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* updating build essentials

* updating build essentials

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

---------

Co-authored-by: gobhardw <gopesh.bhardwaj@amd.com>
2025-06-25 13:38:13 -05:00
Verma, Saurabh f70f369d46 PC-Sampling doc updates - FW version (#455)
* Initial doc update

* addressed review comments

* addressed review comments - 2

* accept reviewer suggestions

Co-authored-by: Rawat, Swati <Swati.Rawat@amd.com>

* accept reviewer suggestions-2

Co-authored-by: Rawat, Swati <Swati.Rawat@amd.com>

* accept reviewer suggestions-3

Co-authored-by: Rawat, Swati <Swati.Rawat@amd.com>

* accept reviewer suggestions-4

Co-authored-by: Rawat, Swati <Swati.Rawat@amd.com>

* Update README.md

Co-authored-by: Rawat, Swati <Swati.Rawat@amd.com>

* Update CHANGELOG.md as per viewer suggestions

Co-authored-by: Rawat, Swati <Swati.Rawat@amd.com>

* accept review suggestion

Co-authored-by: Indic, Vladimir <Vladimir.Indic@amd.com>

* accept reviewer suggestion

Co-authored-by: Rawat, Swati <Swati.Rawat@amd.com>

* accept reviewer suggestions

Co-authored-by: Rawat, Swati <Swati.Rawat@amd.com>

---------

Co-authored-by: Rawat, Swati <Swati.Rawat@amd.com>
Co-authored-by: Indic, Vladimir <Vladimir.Indic@amd.com>
Co-authored-by: Bhardwaj, Gopesh <Gopesh.Bhardwaj@amd.com>
2025-06-25 13:11:18 +05:30
Trowbridge, Ian 0ab43420ba Add copyright disclaimer for scan (#453) 2025-06-24 16:25:26 -05:00
Elwazir, Ammar 86e40741ea Temp: Disable Scratch Memory Test (#473)
* Disable Scratch Memory Test

* Update continuous_integration.yml

* Update continuous_integration.yml
2025-06-24 16:02:56 -05:00
Elwazir, Ammar a2dc4ec041 Using Azure instead of Github Hosted Runners (#475)
* Update formatting.yml

* Update codeql.yml

* Update docs.yml

* Update generate_afar.yml

* Update python.yml

* Update rerun.yml

* Update restrictions.yml

* Update rocm_release_compatibility.yml

* Update scan.yaml

* Update sync-mainline.yaml

* Update sync-staging.yaml
2025-06-24 15:43:54 -05:00
Baraldi, Giovanni 9dadbbace5 Adding doc links for trace decoder, aqlprofile and viewer (#464)
Adding interlinks for trace decoder, aqlprofile and viewer

Co-authored-by: Giovanni Baraldi <gbaraldi@amd.com>
Co-authored-by: Bhardwaj, Gopesh <Gopesh.Bhardwaj@amd.com>
2025-06-18 14:10:18 +02:00
Trowbridge, Ian 883a57ece7 [SDK] [CI] Update HSA EXT Step Version (#460)
Update HSA EXT step version
2025-06-17 08:55:58 -07:00
Elwazir, Ammar aeb1621c2b [SDK] Support CMake option for using internal RCCL tracing + (temporary) enable in CI (#457)
* Temp: disable RCCL tracing

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Adding option to disable rccl tracing from CMake

* Update codeql.yml

* Misc updates

- ROCPROFILER_BUILD_RCCL -> ROCPROFILER_INTERNAL_RCCL_API_TRACE
- env.EXTRA_TEMP_CMAKE_OPTIONS -> env.GLOBAL_CMAKE_OPTIONS
- add (advanced) option ROCPROFILER_INTERNAL_RCCL_API_TRACE

* Fix rocprofiler::sdk::get_enum_label

- missing enum labels for HIP_RUNTIME_API_TABLE_STEP_VERSION > 8

* Update tests/rocprofv3/advanced-thread-trace/CMakeLists.txt

- improve various aspect of cmake -- particularly echoing where attdecoder_LIBRARY was found

* Use CMAKE_MESSAGE_INDENT

- add prefix to cmake messages to help indicate where messages are coming from
- make find_package(Python3 ...) QUIET for bindings

* Fix rocprofiler::sdk::get_enum_label

- handle HSA_AMD_EXT_API_TABLE_MAJOR_VERSION

* Fix rocprofv3 message for att library path

* Fix tests/rocprofv3/advanced-thread-trace/att_input.yml config

* Fix rocprofv3 check_att_capability + soversion/version library resolution

- Account for ROCPROF_ATT_LIBRARY_PATH in env in check_att_capability
- Add resolve_library_path
  - supports resolution of library names to SOVERSION and VERSION paths

* Fix python linting error (unused import)

---------

Co-authored-by: Ammar ELWazir <aelwazir@amd.com>
Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
2025-06-17 08:32:54 -05:00
Bhardwaj, Gopesh 3e43b1f019 Adding rocpd documenation (#449)
* Adding rocpd docuemenation

* rocpd format

* CHANGELOG update and indexing

* Fixing links

* format fixes

* fixing table

* major edits

* fixed logical error

* fixing rocprofv3 avail
2025-06-17 15:41:53 +05:30
Baraldi, Giovanni b1637869b3 Adding LDS Bank conflict metric to MI300 (#456)
Adding LDS Bank conflict metric to MI3

Co-authored-by: Giovanni Baraldi <gbaraldi@amd.com>
2025-06-13 19:28:57 +02:00
Trowbridge, Ian 72b97a8b7e Removed roc_video_dec files due to reoccurring errors (#439)
* Removed roc_video_dec files due to reoccurring errors

* Added back rocDecCreateVideoParser

* Fix remaining errors with rocdecode.cpp
2025-06-12 10:49:08 -05:00
Elwazir, Ammar 5c6b03801d Changing the Github Runner Sets (#446)
* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml
2025-06-12 10:32:01 -05:00
Baraldi, Giovanni 2fa95e6d6d Enable PC sampling to be run alongside ATT. Add ATT to changelog. (#445)
* Enable PC sampling to be run alongside ATT. Add ATT to changelog.

* Fix tests

* Review comments

---------

Co-authored-by: Giovanni Baraldi <gbaraldi@amd.com>
2025-06-10 20:19:00 +02:00
Elwazir, Ammar 80e058bf08 [CMake] Removing the mention of failed while running rocminfo (#409)
* Making sure if GPU_TARGETS is given as input that we ignore the usage of rocminfo

* Update rocprofiler-sdk-utilities.cmake

* Update rocprofiler-sdk-utilities.cmake
2025-06-10 10:46:40 -05:00
Kandula, Venkateshwar reddy 1c91774c6a [DOCS] SWDEV-534589 Update docs with new info in kernel_trace csv output (#438)
* Update docs with new info in kernel_trace csv output and add flag for csv in docs.

* Misc.

---------

Co-authored-by: Venkateshwar Reddy Kandula <vkandula@amd.com>
Co-authored-by: Vaddireddy, Sushma <Sushma.Vaddireddy@amd.com>
Co-authored-by: Bhardwaj, Gopesh <Gopesh.Bhardwaj@amd.com>
2025-06-10 08:20:07 +05:30