diff --git a/source/lib/omnitrace/library/components/roctracer_callbacks.cpp b/source/lib/omnitrace/library/components/roctracer_callbacks.cpp index 006852fe8b..c06e19ba5f 100644 --- a/source/lib/omnitrace/library/components/roctracer_callbacks.cpp +++ b/source/lib/omnitrace/library/components/roctracer_callbacks.cpp @@ -431,7 +431,6 @@ hip_api_callback(uint32_t domain, uint32_t cid, const void* callback_data, void* OMNITRACE_HIP_API_QUEUE_CASE(hipMemPrefetchAsync, stream) OMNITRACE_HIP_API_QUEUE_CASE(hipMemcpy2DAsync, stream) OMNITRACE_HIP_API_QUEUE_CASE(hipMemcpy2DFromArrayAsync, stream) - OMNITRACE_HIP_API_QUEUE_CASE(hipMemcpy2DToArrayAsync, stream) OMNITRACE_HIP_API_QUEUE_CASE(hipMemcpy3DAsync, stream) OMNITRACE_HIP_API_QUEUE_CASE(hipMemcpyAsync, stream) OMNITRACE_HIP_API_QUEUE_CASE(hipMemcpyDtoDAsync, stream) @@ -455,11 +454,14 @@ hip_api_callback(uint32_t domain, uint32_t cid, const void* callback_data, void* OMNITRACE_HIP_API_QUEUE_CASE(hipStreamGetPriority, stream) OMNITRACE_HIP_API_QUEUE_CASE(hipStreamQuery, stream) OMNITRACE_HIP_API_QUEUE_CASE(hipStreamWaitEvent, stream) +#if OMNITRACE_HIP_VERSION >= 40300 + OMNITRACE_HIP_API_QUEUE_CASE(hipMemcpy2DToArrayAsync, stream) OMNITRACE_HIP_API_QUEUE_CASE(hipStreamWaitValue32, stream) OMNITRACE_HIP_API_QUEUE_CASE(hipStreamWaitValue64, stream) OMNITRACE_HIP_API_QUEUE_CASE(hipStreamWriteValue32, stream) OMNITRACE_HIP_API_QUEUE_CASE(hipStreamWriteValue64, stream) -#if OMNITRACE_HIP_VERSION_MAJOR >= 4 && OMNITRACE_HIP_VERSION_MINOR >= 5 +#endif +#if OMNITRACE_HIP_VERSION >= 40500 OMNITRACE_HIP_API_QUEUE_CASE(hipGraphLaunch, stream) OMNITRACE_HIP_API_QUEUE_CASE(hipGraphicsMapResources, stream) OMNITRACE_HIP_API_QUEUE_CASE(hipGraphicsUnmapResources, stream) @@ -468,7 +470,7 @@ hip_api_callback(uint32_t domain, uint32_t cid, const void* callback_data, void* OMNITRACE_HIP_API_QUEUE_CASE(hipStreamEndCapture, stream) OMNITRACE_HIP_API_QUEUE_CASE(hipWaitExternalSemaphoresAsync, stream) #endif -#if OMNITRACE_HIP_VERSION_MAJOR >= 5 +#if OMNITRACE_HIP_VERSION >= 50000 OMNITRACE_HIP_API_QUEUE_CASE(hipStreamIsCapturing, stream) OMNITRACE_HIP_API_QUEUE_CASE(hipStreamGetCaptureInfo, stream) OMNITRACE_HIP_API_QUEUE_CASE(hipStreamGetCaptureInfo_v2, stream) diff --git a/source/lib/omnitrace/library/defines.hpp.in b/source/lib/omnitrace/library/defines.hpp.in index f77651e88f..37e88dd48f 100644 --- a/source/lib/omnitrace/library/defines.hpp.in +++ b/source/lib/omnitrace/library/defines.hpp.in @@ -35,6 +35,10 @@ #endif // clang-format on +#define OMNITRACE_HIP_VERSION \ + ((10000 * OMNITRACE_HIP_VERSION_MAJOR) + (100 * OMNITRACE_HIP_VERSION_MINOR) + \ + OMNITRACE_HIP_VERSION_PATCH) + #define TIMEMORY_USER_COMPONENT_ENUM \ OMNITRACE_COMPONENT_idx, OMNITRACE_USER_REGION_idx, OMNITRACE_ROCTRACER_idx, \ OMNITRACE_SAMPLING_WALL_CLOCK_idx, OMNITRACE_SAMPLING_CPU_CLOCK_idx, \