[SDK] Support HIP 7.0 API changes (#432)

* [Do not merge] Make changes to api_args

* Support HIP 7.0 API changes

- Provide ROCPROFILER_SDK_ variants of ROCPROFILER_ version defines
- Provide ROCPROFILER_SDK_COMPUTE_VERSION
- hipCtxGetApiVersion changes parameter from int* to unsigned int*
- hipMemcpyHtoD and hipMemcpyHtoDAsync changed void* to const void*

* Fix comment

---------

Co-authored-by: Jatin Chaudhary <jatchaud@amd.com>
Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>

[ROCm/rocprofiler-sdk commit: caf1a2174e]
This commit is contained in:
Madsen, Jonathan
2025-06-03 21:50:50 -05:00
committed by GitHub
parent bb80373649
commit adc4e6995d
17 changed files with 172 additions and 27 deletions
@@ -65,7 +65,8 @@
# endif
#endif
#define ROCPROFILER_COMPUTE_VERSION(MAJOR, MINOR, PATCH) ((10000 * MAJOR) + (100 * MINOR) + (PATCH))
#define ROCPROFILER_COMPUTE_VERSION(MAJOR, MINOR, PATCH) \
ROCPROFILER_SDK_COMPUTE_VERSION(MAJOR, MINOR, PATCH)
// Below are used in HSA, HIP, and Marker API tracing
#define IMPL_DETAIL_EXPAND(X) X
@@ -43,7 +43,7 @@ namespace hsa
#define HSA_AMD_INTERFACE_VERSION \
ROCPROFILER_COMPUTE_VERSION(HSA_AMD_INTERFACE_VERSION_MAJOR, HSA_AMD_INTERFACE_VERSION_MINOR, 0)
#if HSA_AMD_INTERFACE_VERSION >= 10700
#if HSA_AMD_INTERFACE_VERSION >= ROCPROFILER_COMPUTE_VERSION(1, 7, 0)
constexpr auto hsa_amd_memory_pool_executable_flag = HSA_AMD_MEMORY_POOL_EXECUTABLE_FLAG;
#else
constexpr auto hsa_amd_memory_pool_executable_flag = (1 << 2);