Skip to content

[hip][AIRUNTIME-748] Implement hipMemGetDefaultMemPool api#4018

Open
sluzynsk-amd wants to merge 3 commits intodevelopfrom
users/sluzynsk/AIRUNTIME-748
Open

[hip][AIRUNTIME-748] Implement hipMemGetDefaultMemPool api#4018
sluzynsk-amd wants to merge 3 commits intodevelopfrom
users/sluzynsk/AIRUNTIME-748

Conversation

@sluzynsk-amd
Copy link
Contributor

This change adds new api hipMemGetDefaultMemPool to the runtime

Motivation

new api hipMemGetDefaultMemPool

Technical Details

  • added new api to clr
  • added nvidia call in hipother
  • added declaration in hip
  • added code for rocprofiler

JIRA ID

AIRUNTIME-748

Test Plan

local testing

Test Result

tests pass

Submission Checklist

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

Adds the hipMemGetDefaultMemPool HIP runtime API and wires it through the CLR dispatch table, ROCProfiler SDK tracing/IDs, and the HIP-NV (CUDA) backend implementation.

Changes:

  • Introduces hipMemGetDefaultMemPool declaration/export and CLR implementation (AMD path).
  • Extends HIP runtime dispatch table ABI/versioning and rocprofiler-sdk runtime API IDs/enum stringification.
  • Adds HIP-NV wrapper for hipMemGetDefaultMemPool (CUDA path).

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/hip/hip.def.cpp Registers new API for rocprofiler HIP runtime table metadata.
projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/hip/abi.cpp Updates ABI enforcement indices and step-version size checks.
projects/rocprofiler-sdk/source/include/rocprofiler-sdk/hip/runtime_api_id.h Adds new runtime API ID gated on table step version.
projects/rocprofiler-sdk/source/include/rocprofiler-sdk/hip/api_args.h Adds argument struct for tracing the new API.
projects/rocprofiler-sdk/source/include/rocprofiler-sdk/cxx/enum_string.hpp Adds enum label + updates step-version static_assert.
projects/hipother/hipnv/include/hip/nvidia_detail/nvidia_hip_runtime_api.h Adds CUDA/NVIDIA implementation of the new API.
projects/hip/include/hip/hip_runtime_api.h Adds public HIP runtime declaration and Doxygen block.
projects/clr/hipamd/src/hip_table_interface.cpp Adds public entrypoint that forwards via dispatch table.
projects/clr/hipamd/src/hip_mempool.cpp Implements AMD-side behavior to return default mem pool.
projects/clr/hipamd/src/hip_hcc.map.in Exports the new symbol from the shared library.
projects/clr/hipamd/src/hip_api_trace.cpp Wires implementation into dispatch table + bumps ABI versioning assertions.
projects/clr/hipamd/src/amdhip.def Adds export for Windows/def-based builds.
projects/clr/hipamd/include/hip/amd_detail/hip_prof_str.h Adds tracing ID/name/args formatting for the new API.
projects/clr/hipamd/include/hip/amd_detail/hip_api_trace.hpp Bumps runtime table step version and adds the new function pointer typedef/member.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

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

Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

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

Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@sluzynsk-amd sluzynsk-amd force-pushed the users/sluzynsk/AIRUNTIME-748 branch from c84e8de to 0298b50 Compare March 13, 2026 09:13
This change adds new api hipMemGetDefaultMemPool to the runtime

Signed-off-by: Sebastian Luzynski <sebastian.luzynski@amd.com>
This change adds 2 new tests:
- Unit_hipMemGetDefaultMemPool_Negative
- Unit_hipMemGetDefaultMemPool_Basic

Signed-off-by: Sebastian Luzynski <sebastian.luzynski@amd.com>
@sluzynsk-amd sluzynsk-amd force-pushed the users/sluzynsk/AIRUNTIME-748 branch from 0298b50 to b65a1f7 Compare March 17, 2026 17:28
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.

2 participants