Skip to content

Conversation

@stellaraccident
Copy link

  • Also fetches usage requirements from hip::amdhip64 -> rocprofiler-sdk-hip-nolink
  • Adds rocprofiler-sdk-hip-nolink as a dependency of two libraries that indirectly depend on hip headers via hip.h.
  • The above may not be completely as precise as it can be (it seems like there should be an intermediate library for this of some kind).
  • Also conditions the link of hsa-amd-aqlprofile64_library on whether the library was found. I have no idea if this is correct, but I don't have that library and lack an easy way to get it. Since the find_library can fail, I am left assuming it is optional (otherwise, there should be some error reporting). The resulting libraries seem to have all symbols defined.

* Also fetches usage requirements from hip::amdhip64 -> rocprofiler-sdk-hip-nolink
* Adds rocprofiler-sdk-hip-nolink as a dependency of two libraries that indirectly depend on hip headers via hip.h.
* The above may not be completely as precise as it can be (it seems like there should be an intermediate library for this of some kind).
* Also conditions the link of hsa-amd-aqlprofile64_library on whether the library was found. I have no idea if this is correct, but I don't have that library and lack an easy way to get it. Since the find_library can fail, I am left assuming it is optional (otherwise, there should be some error reporting). The resulting libraries seem to have all symbols defined.
stellaraccident added a commit to ROCm/TheRock that referenced this pull request Feb 13, 2025
* Fixes a hard-coded minor/patch HIP version (which was lower than what rocprofiler-sdk was looking for).
* Adds a PROFILER group and a PROFILER_SDK feature to gate.
* Adds rocprofiler-(compute|systems) to fetch list but does not wire them up yet.
* Includes a patch for some build issues: ROCm/rocprofiler-sdk#46
stellaraccident added a commit to ROCm/TheRock that referenced this pull request Feb 13, 2025
* Fixes a hard-coded minor/patch HIP version (which was lower than what
rocprofiler-sdk was looking for).
* Adds a PROFILER group and a PROFILER_SDK feature to gate.
* Adds rocprofiler-(compute|systems) to fetch list but does not wire
them up yet.
* Includes a patch for some build issues:
ROCm/rocprofiler-sdk#46
* Temporarily depending on installed libdw in the container (see #91).
* Temporarily depending on installed libatomic in the container (see
#92).
SwRaw pushed a commit to SwRaw/rocprofiler-sdk that referenced this pull request Apr 3, 2025
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>
@jayhawk-commits
Copy link
Contributor

This pull request has merge conflicts that need to be resolved. It cannot be imported to the ROCm/rocm-systems repo automatically.

ammallya pushed a commit that referenced this pull request Oct 28, 2025
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: c574881]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants