Skip to content

SWDEV-546177 - hipModuleGetLoadingMode API impl#653

Open
agunashe wants to merge 33 commits intodevelopfrom
amd/dev/agunashe/SWDEV-546177_impl
Open

SWDEV-546177 - hipModuleGetLoadingMode API impl#653
agunashe wants to merge 33 commits intodevelopfrom
amd/dev/agunashe/SWDEV-546177_impl

Conversation

@agunashe
Copy link
Contributor

@agunashe agunashe commented Aug 20, 2025

API hipModuleGetLoadingMode implementation

Technical Details

API hipModuleGetLoadingMode implementation

Test Plan

rocprofiler and hip tests pass sucessfully

Test Result

NA

Submission Checklist

@agunashe agunashe requested review from a team as code owners August 20, 2025 00:14
anugodavar pushed a commit that referenced this pull request Aug 20, 2025
* SWDEV-539414 - Return error status from runtime handler when HIP_SKIP_ABORT_ON_GPU_ERROR is false

* SWDEV-539414 - default handler when GPU core file is generated

* SWDEV-540576 - Abort if user request a core dump

Change-Id: I9e2c640acf559880bd13641de9103e660ef822a3

---------

Co-authored-by: Assiouras, Ioannis <[email protected]>
Co-authored-by: agunashe <[email protected]>

[ROCm/clr commit: 9c1bff0]
mattwill-amd pushed a commit that referenced this pull request Aug 20, 2025
* SWDEV-539414 - Return error status from runtime handler when HIP_SKIP_ABORT_ON_GPU_ERROR is false

* SWDEV-539414 - default handler when GPU core file is generated

* SWDEV-540576 - Abort if user request a core dump

Change-Id: I9e2c640acf559880bd13641de9103e660ef822a3

---------

Co-authored-by: Assiouras, Ioannis <[email protected]>
Co-authored-by: agunashe <[email protected]>
@agunashe agunashe force-pushed the amd/dev/agunashe/SWDEV-546177_impl branch from de311e1 to 18240b2 Compare August 22, 2025 19:37
@agunashe agunashe force-pushed the amd/dev/agunashe/SWDEV-546177_impl branch 2 times, most recently from 332693f to 4b3a6e3 Compare September 8, 2025 22:15
@agunashe agunashe force-pushed the amd/dev/agunashe/SWDEV-546177_impl branch 3 times, most recently from 5329cbd to bdb99d6 Compare September 23, 2025 23:03
@itrowbri
Copy link
Contributor

itrowbri commented Sep 30, 2025

@agunashe are you incrementing the HIP_RUNTIME_API_TABLE_STEP_VERSION for this new function for the rocprofiler-sdk ABI code? If not, could you do so?

@agunashe agunashe force-pushed the amd/dev/agunashe/SWDEV-546177_impl branch 2 times, most recently from 4bc5efd to 12abe95 Compare October 14, 2025 16:54
@agunashe
Copy link
Contributor Author

/AzurePipelines run rocm-ci-caller

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@agunashe
Copy link
Contributor Author

/AzurePipelines run rocm-ci-caller

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@agunashe agunashe force-pushed the amd/dev/agunashe/SWDEV-546177_impl branch from 12abe95 to 75fd9df Compare October 15, 2025 19:35
ammallya pushed a commit that referenced this pull request Jan 30, 2026
[ROCm/rocdecode commit: 92bf931]
@agunashe agunashe marked this pull request as ready for review February 26, 2026 18:03
Copilot AI review requested due to automatic review settings February 26, 2026 18:03
@agunashe agunashe requested review from a team as code owners February 26, 2026 18:03
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

Implements the HIP runtime API hipModuleGetLoadingMode and wires it through the HIP dispatch table / rocprofiler ABI, plus adds unit tests and related lazy/eager module-loading plumbing.

Changes:

  • Add hipModuleGetLoadingMode to HIP headers, dispatch table, export lists, and rocprofiler SDK API metadata/ABI enforcement.
  • Introduce module loading mode flag (HIP_MODULE_LOADING) and use it to drive eager vs lazy population of dynamic module globals/functions.
  • Add new HIP unit tests for hipModuleGetLoadingMode.

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated no comments.

Show a summary per file
File Description
projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/hip/hip.def.cpp Registers the new runtime API in rocprofiler’s HIP API table metadata (guarded by step version).
projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/hip/abi.cpp Extends ABI enforcement/versioning for the new dispatch-table entry.
projects/rocprofiler-sdk/source/include/rocprofiler-sdk/hip/runtime_api_id.h Adds a new runtime API id enum entry for hipModuleGetLoadingMode.
projects/rocprofiler-sdk/source/include/rocprofiler-sdk/hip/api_args.h Adds args struct for hipModuleGetLoadingMode to the union.
projects/rocprofiler-sdk/source/include/rocprofiler-sdk/cxx/enum_string.hpp Adds string label + version static_assert for the new API id.
projects/hipother/hipnv/include/hip/nvidia_detail/nvidia_hip_runtime_api.h Adds CUDA-backend implementation mapping to cuModuleGetLoadingMode.
projects/hip/include/hip/hip_runtime_api.h Adds hipModuleLoadingMode_t enum and declares hipModuleGetLoadingMode with doxygen.
projects/hip-tests/catch/unit/module/hipModuleGetLoadingMode.cc New unit tests for default/eager mode and kernel execution behavior.
projects/hip-tests/catch/unit/module/CMakeLists.txt Adds the new test source to the module unit tests list.
projects/clr/rocclr/device/devprogram.cpp Refactors COMGR symbol name fetching to only do the work for matching symbol types.
projects/clr/hipamd/src/hip_table_interface.cpp Adds public API thunk calling the dispatch-table function pointer.
projects/clr/hipamd/src/hip_platform.hpp / hip_platform.cpp Adds PlatformState::getLoadingMode logic based on HIP_MODULE_LOADING.
projects/clr/hipamd/src/hip_module.cpp Implements hipModuleGetLoadingMode in the AMD runtime.
projects/clr/hipamd/src/hip_hcc.map.in / amdhip.def Exports the new API symbol.
projects/clr/hipamd/src/hip_code_object.hpp / hip_code_object.cpp Adds lazy/eager loading behavior for dynamic code objects (deferred population).
projects/clr/hipamd/src/hip_api_trace.cpp / include/hip_api_trace.hpp Extends dispatch table, ABI checks, and version to step 26.
projects/clr/hipamd/include/hip/amd_detail/hip_prof_str.h Extends profiler/tracer metadata with new API id, args, and string formatting.
projects/clr/CHANGELOG.md Documents the newly added HIP API.

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

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.

7 participants