Skip to content

rocr: add vhsakmt pointer query#243

Open
systems-assistant[bot] wants to merge 2 commits intodevelopfrom
import/develop/ROCm_ROCR-Runtime/honghuan_pr_virito
Open

rocr: add vhsakmt pointer query#243
systems-assistant[bot] wants to merge 2 commits intodevelopfrom
import/develop/ROCm_ROCR-Runtime/honghuan_pr_virito

Conversation

@systems-assistant
Copy link
Contributor

rocr: Add fallback to vhsakmt pointer query for virtualized environments

This patch enhances pointer query functionality by adding support for
virtualized HSAKMT environments. When the standard hsaKmtQueryPointerInfo
call fails or returns unknown pointer type, the code now falls back to
vhsaKmtQueryPointerInfo when HSAKMT_VIRTIO_ENABLED is defined.

Changes:

  • Add conditional include for hsakmt/hsakmt_virtio.h
  • Implement fallback mechanism in Runtime::PtrInfo()
  • Refactor error handling to support dual query paths
  • Maintain backward compatibility with existing HSAKMT implementations

This enables proper pointer information retrieval in virtualized GPU
environments while preserving existing functionality for native setups.


🔁 Imported from ROCm/ROCR-Runtime#324
🧑‍💻 Originally authored by @rocm-devops

HongleiHuang-amd and others added 2 commits August 8, 2025 15:56
Signed-off-by: Honglei Huang <Honglei1.Huang@amd.com>
jbonnell-amd pushed a commit that referenced this pull request Aug 11, 2025
…n) (#242)

* [SWDEV-518071] Return HSA not loaded status (device counter collection)

This is a state that a caller would want to know about to understand if
they got no counters because of a failure or if they were trying to
collect counters too early (as is the case in the sample, which can
attempt to collect counters before HSA is inited).

* Minor edit

* format

* [SWDEV-518081] Simplify Metric Loading (#243)

* [SWDEV-518071] Return HSA not loaded status (device counter collection)

This is a state that a caller would want to know about to understand if
they got no counters because of a failure or if they were trying to
collect counters too early (as is the case in the sample, which can
attempt to collect counters before HSA is inited).
* [SWDEV-518324] Add AST update support

Allows the ability for ASTs to be updated (instead of an unchangable
static value). Adds a shared pointer return type to protect against
static destructors/modifications from invalidating potentially in use
AST definitions. No functionality/use changes in this PR.
* [SWDEV-518593] Add updatable dimension cache + fix string issues (#252)

* [SWDEV-518593] Add updatable dimension cache + fix string issues

Updates dimension cache to use the same design pattern as AST/Metrics.

Fixes the string scoping issue seen in ASTs, which appears here as well.

* Add rocprofiler_create_counter

Creates derived counters based on input from the API. This PR does three
things:

1. Adds the API + test case
2. Validates that an AST can be constructed from the counter supplied.
3. Updates metrics, ast, and dimension caches to include the new metric.

Metric should be available for use immediately after the call completes.

Due to the regeneration of ASTs, this call should not be performed in
performance sensitive code.

* Suggestion fixes

---------

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

* Minor tweak

---------

Co-authored-by: Benjamin Welton <bewelton@amd.com>
Co-authored-by: Venkateshwar Reddy Kandula <vkandula@amd.com>

---------

Co-authored-by: Benjamin Welton <bewelton@amd.com>
Co-authored-by: Venkateshwar Reddy Kandula <vkandula@amd.com>

* Fixes for comments

---------

Co-authored-by: Benjamin Welton <bewelton@amd.com>
Co-authored-by: Kandula, Venkateshwar reddy <Venkateshwarreddy.Kandula@amd.com>
Co-authored-by: Venkateshwar Reddy Kandula <vkandula@amd.com>

---------

Co-authored-by: Benjamin Welton <bewelton@amd.com>
Co-authored-by: Kandula, Venkateshwar reddy <Venkateshwarreddy.Kandula@amd.com>
Co-authored-by: Venkateshwar Reddy Kandula <vkandula@amd.com>

[ROCm/rocprofiler-sdk commit: 0072852]
ammallya pushed a commit that referenced this pull request Nov 17, 2025
Change-Id: I2990597c6dd4b2e8cf3e11ce60f72049ebdd9a8c
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
ammallya pushed a commit that referenced this pull request Nov 18, 2025
Change-Id: I2990597c6dd4b2e8cf3e11ce60f72049ebdd9a8c
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>

[ROCm/amdsmi commit: 0fdaebd]
ammallya pushed a commit that referenced this pull request Nov 21, 2025
Change-Id: I2990597c6dd4b2e8cf3e11ce60f72049ebdd9a8c
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>

[ROCm/amdsmi commit: 0fdaebd]
ammallya pushed a commit that referenced this pull request Jan 21, 2026
* feat(GDA): add `get*` and `get*_nbi` APIs for mlx and bnxt NICs
   - implemented thread, wave and wg variants of `get*` and `get_nbi`.

* test(GDA): enable functional tests for `get*` and `get*_nbi` APIs
ammallya pushed a commit that referenced this pull request Jan 21, 2026
* feat(GDA): add `get*` and `get*_nbi` APIs for mlx and bnxt NICs
   - implemented thread, wave and wg variants of `get*` and `get_nbi`.

* test(GDA): enable functional tests for `get*` and `get*_nbi` APIs

[ROCm/rocshmem commit: 671f818]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants