Skip to content

Conversation

@bwelton
Copy link
Contributor

@bwelton bwelton commented Jan 28, 2026

Summary

  • Increase domain_ops_padding from 512 to 1024 to accommodate HIP runtime API's 515+ operations
  • Add compile-time static_assert to validate padding is sufficient for all API domains

Problem

The HIP runtime API now has 515+ operations, but domain_ops_padding was set to 512. This caused std::out_of_range exceptions when std::bitset::test() was called with operation IDs >= 512 (e.g., hipMemGetMemPool at op 512).

Solution

  • Increased padding to 1024 to allow for future growth
  • Added static_assert that checks max(all API LAST values) < domain_ops_padding at compile time

Test plan

  • Build succeeds (static_assert passes)
  • CI tests pass

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings January 28, 2026 21:41
@bwelton bwelton requested review from a team as code owners January 28, 2026 21:41
Copy link
Contributor

Copilot AI left a 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_padding from 512 to 1024.
  • Add a compile-time static_assert to ensure domain_ops_padding is 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.

bwelton and others added 3 commits January 28, 2026 13:51
…main.cpp

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-Authored-By: Claude (claude-opus-4.5) <noreply@anthropic.com>
@jrmadsen jrmadsen added bug fix CI bug fix Helps unblock CI — improves stability or fixes failure. Considered very high priority. labels Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug fix CI bug fix Helps unblock CI — improves stability or fixes failure. Considered very high priority. organization: ROCm project: rocprofiler-sdk

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants