Commit Graph

560 Commits

Author SHA1 Message Date
Mallya, Ameya Keshava eaaeafbfa4 Fixed Workflow for updated KWS structure
[ROCm/rocprofiler-sdk commit: c5140c83a5]
2025-01-17 08:15:36 -08:00
Jakaraddi, Manjunath 324c57ede1 SWDEV-500520: Updated documentation for hang issue (#79)
* SWDEV-500520: Updated documentation for hang issue

* Avoid fatal error when invalid metric is found

* removing invalid metrics

* clang formatting

[ROCm/rocprofiler-sdk commit: dfee6489b1]
2025-01-16 02:14:22 -08:00
Welton, Benjamin ee959cc591 [SWDEV-509659] Skip rocprof device counting tests if lacking permissions (#125)
* [SWDEV-509659] Skip rocprof device counting tests if lacking permissions

Skips non-intercept test if proper permissions are not obtained
(SYS_PERFMON). This should be the only test that fails due to permission
issues (others do not require the IOCTL to pass).

Regex match sample: https://regexr.com/8b29s

* Update source/lib/rocprofiler-sdk/counters/tests/CMakeLists.txt

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

* fix

* Update source/lib/rocprofiler-sdk/counters/tests/CMakeLists.txt

---------

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

[ROCm/rocprofiler-sdk commit: 536fbba627]
2025-01-16 01:51:06 -06:00
Welton, Benjamin 9a8b8bf905 Small debug print fix in ioctl.cpp (#120)
* Small debug print fix in ioctl.cpp

Fix debug print statement to print agent id.

* formatting

---------

Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>

[ROCm/rocprofiler-sdk commit: 71dc203b0c]
2025-01-15 18:00:04 -08:00
Madsen, Jonathan baee324bfc Fix host function logging (#63)
Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>

[ROCm/rocprofiler-sdk commit: fae4ad614c]
2025-01-15 19:54:35 -06:00
Madsen, Jonathan 3250a26c79 Split ABI checks for rocprofiler-sdk-roctx into separate file (#21)
* Split ABI checks for rocprofiler-sdk-roctx into separate file

* Update source/lib/rocprofiler-sdk-roctx/abi.cpp

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

* Update source/lib/rocprofiler-sdk-roctx/abi.cpp

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

* New line

---------

Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
Co-authored-by: Indic, Vladimir <Vladimir.Indic@amd.com>

[ROCm/rocprofiler-sdk commit: 1b7ab08ded]
2025-01-15 19:32:50 -06:00
Mallya, Ameya Keshava 8641afe3fe Changed branch to mainline
[ROCm/rocprofiler-sdk commit: 720763daac]
2025-01-15 11:08:20 -08:00
Elwazir, Ammar 0611359850 rocprofv3: fix collection period unit handling (#103)
* Fixing Collection Period

* Fixing default value for collection period unit

* Formatting

---------

Co-authored-by: Ammar ELWazir <aelwazir@amd.com>

[ROCm/rocprofiler-sdk commit: 94474de480]
2025-01-14 11:19:16 -06:00
Bhardwaj, Gopesh a4aa2fd14e miscellaneous doc updates (#86)
* miscellaneous doc updates

* updated deprecartion message

* Updated memory allocation tracking documentation

* Update comparing-with-legacy-tools.rst

Co-authored-by: Elwazir, Ammar <Ammar.Elwazir@amd.com>

* Update comparing-with-legacy-tools.rst

Co-authored-by: Elwazir, Ammar <Ammar.Elwazir@amd.com>

* Update comparing-with-legacy-tools.rst

---------

Co-authored-by: Ian Trowbridge <ian.trowbridge@amd.com>
Co-authored-by: Elwazir, Ammar <Ammar.Elwazir@amd.com>

[ROCm/rocprofiler-sdk commit: 81f600e3ba]
2025-01-14 11:17:45 -06:00
Mallya, Ameya Keshava 1457d95d9f Added necessary variable for commenting
[ROCm/rocprofiler-sdk commit: 70bcd05fd4]
2025-01-13 20:26:23 -08:00
Mallya, Ameya Keshava 5ed2e2f54c Potential fix for KWS
[ROCm/rocprofiler-sdk commit: c7bf11e080]
2025-01-13 19:37:58 -08:00
Baraldi, Giovanni 8abb65b166 Adding source snapshot and partial serialization (#99)
* Adding source snapshot

* Adding option to serialize only on target kernel

* Fix for tidy

* Formatting

* Testing the new flag

---------

Co-authored-by: Giovanni Baraldi <gbaraldi@amd.com>

[ROCm/rocprofiler-sdk commit: a2fa188e14]
2025-01-10 15:43:06 -08:00
Baraldi, Giovanni e226e2a11a SWDEV-508485: Adding MFMA F8 metric (#112)
Co-authored-by: Giovanni Baraldi <gbaraldi@amd.com>

[ROCm/rocprofiler-sdk commit: 27266eb242]
2025-01-09 15:27:16 -06:00
Galantsev, Dmitrii 207cb06783 OTF2 - Fix lib vs lib64 location on some systems (#68)
On my dev machine I use OpenSUSE Tumbleweed. For some reason OTF2 gets
installed into BUILD/external/otf2/lib64/, while cmake for the lib
searches BUILD/external/otf2/lib and cannot find it.

My fix sets the location to always match CMAKE_INSTALL_LIBDIR

Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>

[ROCm/rocprofiler-sdk commit: 271f017251]
2025-01-08 22:47:44 -06:00
Madsen, Jonathan 247ba0afa1 Download perfetto trace_processor_shell (#105)
* Download perfetto trace_processor_shell

* Upgrade to perfetto-trace-processor-shell v0.0.4

* Fix run-ci.py warning

- warning message:

CMake Warning (dev) at /.../build/CTestCustom.cmake:16:
  Syntax Warning in cmake code at column 77
  Argument not separated from preceding token by whitespace.

* Update tests/pytest-packages/pytest_utils/perfetto_reader.py

---------

Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>

[ROCm/rocprofiler-sdk commit: 2c3bdeaed9]
2025-01-08 20:32:48 -06:00
Choudhary, Rahul 06ac2cdc68 Delete .github/workflows/force-sync.yml
[ROCm/rocprofiler-sdk commit: 67e00e63b8]
2025-01-07 10:29:31 -08:00
Baraldi, Giovanni 1a90147c48 SWDEV-490031: Adding new rdc ops metrics (#96)
Co-authored-by: Giovanni Baraldi <gbaraldi@amd.com>

[ROCm/rocprofiler-sdk commit: fddd8ac4aa]
2025-01-06 11:02:23 +00:00
Indic, Vladimir 5c0235ccc4 ROCProfV3 PC sampling tests: Initial multi-agents test (#72)
Testing multi-agent host-trap PC sampling support in ROCProfV3.

[ROCm/rocprofiler-sdk commit: 00d4c179c6]
2025-01-04 02:35:16 +01:00
Bhardwaj, Gopesh 93421ab066 update PR template (#90)
[ROCm/rocprofiler-sdk commit: 1ca289699e]
2024-12-26 11:24:58 +05:30
Indic, Vladimir c79b0a2eb6 Enable PC sampling on MI300A CI runners (#88)
Co-authored-by: Bhardwaj, Gopesh <Gopesh.Bhardwaj@amd.com>

[ROCm/rocprofiler-sdk commit: abf7280aae]
2024-12-25 10:39:22 +01:00
Bhardwaj, Gopesh d75abf3ae2 Disabling counter-collection-buffer test for MI325 (#89)
Disabling counter-collection-buffer for MI325

[ROCm/rocprofiler-sdk commit: 0b13a14014]
2024-12-25 10:44:21 +05:30
Baraldi, Giovanni d93586b57a SWDEV-492607: Fix for bvh (#87)
Co-authored-by: Giovanni Baraldi <gbaraldi@amd.com>

[ROCm/rocprofiler-sdk commit: 0a8c31842d]
2024-12-24 15:47:13 +01:00
Indic, Vladimir a2f431fdd4 Renaming ROCProfV3 host-trap exec-mask-manipulation tests (#76)
Renaming ROCProfV3 host-trap exec-mask-manipulation tests

[ROCm/rocprofiler-sdk commit: 2d2430b94a]
2024-12-23 18:43:06 +01:00
Nagaraj, Sriraksha 9e379fe2fb fix abort-app CI fail (#39)
* fix abort-app CI fail

* Update source/lib/rocprofiler-sdk-tool/tool.cpp

---------

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

[ROCm/rocprofiler-sdk commit: 202853d579]
2024-12-22 14:17:48 -06:00
Nagaraj, Sriraksha e5dde1b230 fix dimensions in avail output (#82)
* fix dimensions in avail output

* review comment addressed

[ROCm/rocprofiler-sdk commit: 554537f140]
2024-12-20 13:26:02 -06:00
Indic, Vladimir 47a66adf1f ROCProfV3: fatal message if PC sampling unsupported, but requested (#60)
If a user requests PC sampling on a system that does not support this feature,
report a fatal error message and stop executing the program.

[ROCm/rocprofiler-sdk commit: 0ce75c1043]
2024-12-20 08:04:16 -08:00
Baraldi, Giovanni d0d378897a SWDEV-495749: Adding SIMD_UTILIZATION metric (#74)
* SWDEV-495749: Adding SIMD_UTILIZATION metric

* Fix mfmautil

---------

Co-authored-by: Giovanni Baraldi <gbaraldi@amd.com>

[ROCm/rocprofiler-sdk commit: 200a8624bc]
2024-12-20 14:35:18 +00:00
Welton, Benjamin 926c1ed153 Add support for device counter collection ioctl (#46)
Add support for device counter colleciton ioctl

Adds support for the device counter collection IOCTL. This IOCTL
allows for device wide counters to be collected even if the queue
is not intercepted by rocprofiler-sdk (required for system profilers).

A test is also included which checks this behavior by creating a queue
that does not have profiling enabled on it and checks to see if SQ
counters can be read from it. Note: this test will be skipped if the KFD
version does not contain this IOCTL.

Right now the check is "soft" in that if the IOCTL is present and there
is an error with permissions, rocprofiler will continue but will print
an error stating that system wide device profiling and collected counter
values may be degraded. This is primarily to avoid breaking existing
users (like PAPI) who may not need the IOCTL's capability and to give
them time to update.

Co-authored-by: Benjamin Welton <ben@amd.com>

[ROCm/rocprofiler-sdk commit: c574881cdb]
2024-12-19 13:27:35 -08:00
Indic, Vladimir 86417237a6 Remove numpy dependency from rocprofv3.py (#75)
Remove numpy dependency from rocprofv3.py

[ROCm/rocprofiler-sdk commit: 9c21c49aa1]
2024-12-19 20:52:42 +01:00
Baraldi, Giovanni f8442415f8 SWDEV-492607: Adding ATT wrapper (#40)
* Adding att parser wrapper

* Adding ATT tests as optional

* Adding decoder API for query capability

* Removed samples

* Formatting

* adding new line

* Removed perfetto and moved to static library

* using default search for lib

* Updated to SDK

* Namespace changes

* Added tests

* Small refactor

* Updated API to receive agent_id

* Fixing tests

* Tidy fixes

* Not write to file

* Switch to filesystem.hpp

* Compilation fixes

* Formatting

* Tidy fix

* Removed likely

* Adding tests

* Added gfx9 test

* Adding gfx12 tests

* Formatting

* Enable tidy

* Fix tests

* Fix deadlock on agent test

* Workaround ASAN

* Moving query outside class.

* Fix standalone tool

* Addressing comments

* Formatting

* Change query name

* Fixed some tests. Updated PR comments.

* Formatting

* Improved coverage

* Formatting

* Fix for comments

* Formatting

* Adding some description. Fix error type.

---------

Co-authored-by: Giovanni Baraldi <gbaraldi@amd.com>

[ROCm/rocprofiler-sdk commit: 2c8e88a76b]
2024-12-18 18:53:32 -08:00
Trowbridge, Ian b2aa29eb0a Skip Building of OpenMP Samples and Tests (#77)
* Add option to disable openmp samples

* Skip building openmp tests and samples for now

[ROCm/rocprofiler-sdk commit: 9de284a568]
2024-12-18 11:37:51 -06:00
Elwazir, Ammar 31e086b2ab Changing Mi300 Names (#69)
* Changing Mi300 Names

Making Mi300 names more specific:
Adding multiple type to differentiate between Mi300X, Mi300A, Mi325X

* Enable Mi300A PC Sampling testing

[ROCm/rocprofiler-sdk commit: 590f2a1cd0]
2024-12-13 12:19:23 -06:00
Baraldi, Giovanni 661b608227 SWDEV-489158: Fix for exit thread safety (#61)
* SWDEV-489158: Fix for exit thread safety

* Fixed exit thread logic

* Force CI to rerun

* Remove .vscode

* Fix thread safety bug

* Addressed some comments

* Formatting

---------

Co-authored-by: Giovanni Baraldi <gbaraldi@amd.com>

[ROCm/rocprofiler-sdk commit: f4984f9dcc]
2024-12-11 12:41:19 -06:00
Mallya, Ameya Keshava 0157d4e7ff Reusable PSDB/OSDB (#65)
* Deleting redundant action

* Single reusable workflow for PSDB and OSDB

* fixed calling psdb for mainline

[ROCm/rocprofiler-sdk commit: f80480cc86]
2024-12-10 13:13:17 -08:00
Bhardwaj, Gopesh 681740b52b gobhardw/docs logging (#10)
* reducing docs logging

* Addressing review comments

* exclude dirs

* maximize NUM_PROC_THREADS

* parallel build

[ROCm/rocprofiler-sdk commit: 3ee06ed747]
2024-12-10 14:15:59 +05:30
Welton, Benjamin 1850de7ee1 [AFAR VII] rocprofiler_sample_device_counting_service return data as part of API call (#57)
---------

Co-authored-by: Benjamin Welton <bewelton@amd.com>
Co-authored-by: Benjamin Welton <ben@amd.com>

[ROCm/rocprofiler-sdk commit: 253c9adfc1]
2024-12-06 22:37:45 -08:00
Madsen, Jonathan 22b4e6739d Fix code coverage comment (#58)
Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>

[ROCm/rocprofiler-sdk commit: bd33176966]
2024-12-06 18:44:34 -06:00
Nagaraj, Sriraksha fd9da7dc43 Updating rocprofv3 doc for pc sampling beta option (#59)
* Updating rocprofv3 doc for pc sampling beta option

* Update source/docs/rocprofv3_input_schema.json

* Update using-rocprofv3.rst

---------

Co-authored-by: Elwazir, Ammar <Ammar.Elwazir@amd.com>

[ROCm/rocprofiler-sdk commit: c509fe799d]
2024-12-06 17:41:28 -06:00
Madsen, Jonathan 0ed4441ca7 rocprofv3: Updates to counter collection optimizations (#24)
* Updates to counter collection optimizations

* Fix logic error

---------

Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>

[ROCm/rocprofiler-sdk commit: a09eda05b2]
2024-12-06 23:29:12 +00:00
Nagaraj, Sriraksha 2cb3c6d84f fix avail test (#50)
* fix avail test

* changing the regular expression

* Adding fatal error to avail script

* Revert "changing the regular expression"

This reverts commit e522143b5d9dccb870fd7f5667619ed32687d1e6.

[ROCm/rocprofiler-sdk commit: 5556774c3a]
2024-12-06 17:07:45 -06:00
Choudhary, Rahul 32fe16606a Update PSDB.yml - removing synchronize events to avoid duplicate triggers
[ROCm/rocprofiler-sdk commit: 745fd143dd]
2024-12-06 14:17:25 -08:00
Nagaraj, Sriraksha 921f57bac3 --pc-sampling-beta-enable in ROCProfV3 (#56)
PC sampling must be explicitly enabled. 
Emit fatal error otherwise.

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

---------

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

[ROCm/rocprofiler-sdk commit: 17fdc33d05]
2024-12-06 22:04:23 +01:00
Choudhary, Rahul 117d2131d0 Update kws.yml fixing the file extension name
[ROCm/rocprofiler-sdk commit: 6880dd1257]
2024-12-06 11:44:05 -08:00
Indic, Vladimir 00b558c037 PC Sampling API: emit info logs instead of error (#53)
* PC Sampling API: emit info logs instead of error

Inside PC sampling API, emit info logs instead of
error logs. The tests verifies status code of each
API call and decide when to skip, instead of relying
on messages in logs.

The samples_processing.cpp test has been removed as it's
not used.

[ROCm/rocprofiler-sdk commit: b4d7ee7887]
2024-12-06 20:40:30 +01:00
Madsen, Jonathan a70771f8dc Misc AFAR VII updates + clang-tidy-19 + bump version to 0.6.0 (#54)
* Misc AFAR VII updates + clang-tidy-19 + bump version to 0.6.0

- move tests/rocprofv3/trace-period to tests/rocprofv3/collection-period
- bump clang-tidy to v19
- fix misc clang-tidy errors

* Update the collection period test

- don't attach files on fail bc when test is disabled, it causes problems

---------

Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>

[ROCm/rocprofiler-sdk commit: bd447ab941]
2024-12-06 12:35:29 -06:00
Mallya, Ameya Keshava eb15bcdf4e Updated KWS action location to fix failure (#51)
[ROCm/rocprofiler-sdk commit: f18158f56a]
2024-12-06 11:02:00 -06:00
Indic, Vladimir f09ebc11c0 Temporarily disable sampled VM_IDs check (#55)
Temporarily disable sampled VM_IDs check

[ROCm/rocprofiler-sdk commit: 1d5ed0440d]
2024-12-06 14:45:33 +01:00
Jakaraddi, Manjunath 82261be227 SWDEV-492623: Hip Host Function to Device Symbols Mapping (#18)
* Adding changes to register and read symbols from the hip fat binary

* adding json output for host_functions

* added error handling

* adding json tool support

* Adding tests

* formatting changes

* Adding documentation

* refactoring as per amd-staging

* Adding intializers and changing macros

* Fix page-migration background thread on fork (#31)

* Fix page-migration background thread on fork

After falling off main in the forked child, all the children
try to join on on the parent's monitoring thread. This results
in a deadlock. Parent is waiting for the child to exit, but
the child is trying to join the parent's thread which is
signaled from the parent's static destructors.

Even with just one parent and child, due to copy-on-write
semantics, a child signalling the background thread to join
will still block (thread's updated state is not visible
in the child).

This fix creates background treads on fork per-child with a
pthread_atfork handler, ensuring that each child has its own
monitoring thread.

* Formatting fixes

* Detach page-migration background thread and update test timeout

* Attach files with ctest

* Update corr-id assert

* Tweak on-fork, simplify background thread

* Revert thread detach

* Adding --collection-period feature in rocprofv3 to match v1/v2 parity (#9)

* Adding Trace Period feature to rocprofv3

* Adding feature documentation

* Update source/bin/rocprofv3.py

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Fixing format

* Moving to Collection Period and changing the input params

* Format Fixes

* Fixing rebasing issues

* Removing atomic include from the tool

* Adding more options for units, optimizing the code

* Fixing rocprofv3.py

* Fixing time conv & adding time controlled app

* Fixing format

* Changing to shared memory testing methodology

* use of shmem use

* Fix include headers for transpose-time-controlled.cpp

* Format upload-image-to-github.py

* Removing shmem and using only env var to dump timestamps from the tool

* Tool Fixes + Test Config

* Adding Tests

* Fixing Review comments

* Update trace period implementation

* Update trace period tests

* check between start and stop timestamps

* Merge Fix

* Update validate.py

* Improve safety of rocprofiler_stop_context after finalization

* Pass context id to collection_period_cntrl by value

* Adding 20 us error margin

* Ensure log level for collection-period test is not more than warning

---------

Co-authored-by: Ammar ELWazir <aelwazir@amd.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>

* Update lib/rocprofiler-sdk/code_object/hip/code_object.*

- move error code check macros to implementation
- fix macros which check error code
- use constexpr values instead of #define

* Update lib/rocprofiler-sdk/code_object/hip/code_object.*

- debugging for error that cannot be locally reproduced

* Update lib/rocprofiler-sdk/code_object/hip/code_object.*

- improve error handling and logging

* Update lib/rocprofiler-sdk/code_object/hip/code_object.*

- tweak to non-fatal logging messages

* Update lib/rocprofiler-sdk/code_object/hip/code_object.*

- cleanup of logging messages

* Update host kernel symbol register data fields

* Update source/lib/rocprofiler-sdk/code_object/hip/code_object.hpp

---------

Co-authored-by: Madsen, Jonathan <Jonathan.Madsen@amd.com>
Co-authored-by: Kuricheti, Mythreya <Mythreya.Kuricheti@amd.com>
Co-authored-by: Elwazir, Ammar <Ammar.Elwazir@amd.com>
Co-authored-by: Ammar ELWazir <aelwazir@amd.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>

[ROCm/rocprofiler-sdk commit: 78d8f4b8ea]
2024-12-06 11:42:37 +00:00
Indic, Vladimir a0a0a4cffe [AFAR VII] Using v_rcp_f32 instead of v_fmac_f32 in exec_mask_manipulation.cpp (#47)
use v_rcp_f32 instead of v_fmac_f32

[ROCm/rocprofiler-sdk commit: 61ce79c84d]
2024-12-05 23:21:00 -08:00
Trowbridge, Ian 792329fefd SWDEV-492625 memory free functions (#11)
* SWDEV-492625: Track free memory HSA functions to help determine total amount of memory allocated on the system at any one time

* Minor fixes to address comments

* Update allocation size description

* Moved get function back to specialization, minor typo fixes

* Removed memory_operation_type field, removed memory_pool allocation enum, converted starting address to hex string for json format.

* Made conversion to hex_string a function, changed address to use union rocprofiler_address_t type, changed VMEM descriptors

* Removed as_hex from the global namespace

* Formatting

* Removed TRACK_EVENT for memory allocation, now TRACK_COUNTER for memory allocation is being performed

* Check if address was recorded before retrieving allocation size in generate Perfetto

* Formatting

* Update source/lib/output/generatePerfetto.cpp

* Explicitly disable app-abort tests

* Remove excluding app-abort test from workflow CI

- redundant bc these tests are explicitly marked as disabled now

---------

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

[ROCm/rocprofiler-sdk commit: 79006bb896]
2024-12-06 00:05:30 -06:00