-
Notifications
You must be signed in to change notification settings - Fork 121
[rocprofiler-sdk] Fix domain_ops_padding for 515+ HIP operations #2941
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
The HIP runtime API now has 515+ operations (as of ROCm 7.x), but domain_ops_padding was set to 512. This caused std::out_of_range exceptions when checking operations >= 512 via std::bitset::test(). Changes: - Increase domain_ops_padding from 512 to 1024 - Add compile-time static_assert to validate padding is sufficient for all API domains (HIP, HSA, marker, RCCL, rocDecode, rocJPEG) Co-Authored-By: Claude (claude-opus-4.5) <noreply@anthropic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Updates rocprofiler-sdk’s operation bitset sizing to prevent out-of-range access as HIP runtime API operation IDs grow beyond the previous 512-bit limit.
Changes:
- Increase
domain_ops_paddingfrom 512 to 1024. - Add a compile-time
static_assertto ensuredomain_ops_paddingis large enough for the largest API ID domain.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/context/domain.hpp | Increases domain_ops_padding to avoid std::bitset out-of-range for larger operation ID values. |
| projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/context/domain.cpp | Adds a compile-time check comparing max *_API_ID_LAST against domain_ops_padding. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/context/domain.hpp
Outdated
Show resolved
Hide resolved
projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/context/domain.cpp
Outdated
Show resolved
Hide resolved
…main.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-Authored-By: Claude (claude-opus-4.5) <noreply@anthropic.com>
Summary
domain_ops_paddingfrom 512 to 1024 to accommodate HIP runtime API's 515+ operationsstatic_assertto validate padding is sufficient for all API domainsProblem
The HIP runtime API now has 515+ operations, but
domain_ops_paddingwas set to 512. This causedstd::out_of_rangeexceptions whenstd::bitset::test()was called with operation IDs >= 512 (e.g.,hipMemGetMemPoolat op 512).Solution
max(all API LAST values) < domain_ops_paddingat compile timeTest plan
🤖 Generated with Claude Code