diff --git a/.github/workflows/rocprofiler-sdk-code_coverage.yml b/.github/workflows/rocprofiler-sdk-code_coverage.yml index 9da9675761..5dc46056ee 100644 --- a/.github/workflows/rocprofiler-sdk-code_coverage.yml +++ b/.github/workflows/rocprofiler-sdk-code_coverage.yml @@ -266,7 +266,7 @@ jobs: echo "✅ ROCProfiler-Register Installation complete!" - name: Build and Install ROCR-Runtime - if: env.ENABLE_ROCR_BUILD + if: ${{ env.ENABLE_ROCR_BUILD == 'true' }} shell: bash working-directory: projects/rocr-runtime run: | @@ -283,7 +283,7 @@ jobs: echo "✅ ROCR-Runtime Installation complete!" - name: Build and Install HIP - if: env.ENABLE_HIP_CLR_BUILD + if: ${{ env.ENABLE_HIP_CLR_BUILD == 'true' }} shell: bash working-directory: projects run: | diff --git a/.github/workflows/rocprofiler-sdk-continuous_integration.yml b/.github/workflows/rocprofiler-sdk-continuous_integration.yml index 0e38df3bd6..229a47d066 100644 --- a/.github/workflows/rocprofiler-sdk-continuous_integration.yml +++ b/.github/workflows/rocprofiler-sdk-continuous_integration.yml @@ -63,7 +63,7 @@ env: GLOBAL_CMAKE_OPTIONS: "" ENABLE_ROCR_BUILD: "true" - ENABLE_HIP_CLR_BUILD: "false" + ENABLE_HIP_CLR_BUILD: "true" CI_MODE: ${{ github.event_name == 'schedule' && 'Nightly' || 'Continuous' }} diff --git a/projects/rocprofiler-sdk/source/include/rocprofiler-sdk/cxx/enum_string.hpp b/projects/rocprofiler-sdk/source/include/rocprofiler-sdk/cxx/enum_string.hpp index 4c9ed13717..a831c82f1b 100644 --- a/projects/rocprofiler-sdk/source/include/rocprofiler-sdk/cxx/enum_string.hpp +++ b/projects/rocprofiler-sdk/source/include/rocprofiler-sdk/cxx/enum_string.hpp @@ -990,6 +990,14 @@ ROCPROFILER_ENUM_LABEL(ROCPROFILER_HIP_RUNTIME_API_ID_hipLibraryGetKernelCount) #if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 16 ROCPROFILER_ENUM_LABEL(ROCPROFILER_HIP_RUNTIME_API_ID_hipStreamCopyAttributes) #endif +#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 17 +ROCPROFILER_ENUM_LABEL(ROCPROFILER_HIP_RUNTIME_API_ID_hipLibraryEnumerateKernels) +ROCPROFILER_ENUM_LABEL(ROCPROFILER_HIP_RUNTIME_API_ID_hipKernelGetLibrary) +ROCPROFILER_ENUM_LABEL(ROCPROFILER_HIP_RUNTIME_API_ID_hipKernelGetName) +#endif +#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 18 +ROCPROFILER_ENUM_LABEL(ROCPROFILER_HIP_RUNTIME_API_ID_hipOccupancyAvailableDynamicSMemPerBlock) +#endif #if HIP_RUNTIME_API_TABLE_STEP_VERSION == 0 static_assert(ROCPROFILER_HIP_RUNTIME_API_ID_LAST == 442); #elif HIP_RUNTIME_API_TABLE_STEP_VERSION == 1 @@ -1024,6 +1032,10 @@ static_assert(ROCPROFILER_HIP_RUNTIME_API_ID_LAST == 496); static_assert(ROCPROFILER_HIP_RUNTIME_API_ID_LAST == 501); #elif HIP_RUNTIME_API_TABLE_STEP_VERSION == 16 static_assert(ROCPROFILER_HIP_RUNTIME_API_ID_LAST == 502); +#elif HIP_RUNTIME_API_TABLE_STEP_VERSION == 17 +static_assert(ROCPROFILER_HIP_RUNTIME_API_ID_LAST == 505); +#elif HIP_RUNTIME_API_TABLE_STEP_VERSION == 18 +static_assert(ROCPROFILER_HIP_RUNTIME_API_ID_LAST == 506); #else # if !defined(ROCPROFILER_UNSAFE_NO_VERSION_CHECK) && \ (defined(ROCPROFILER_CI) && ROCPROFILER_CI > 0) diff --git a/projects/rocprofiler-sdk/source/include/rocprofiler-sdk/hip/api_args.h b/projects/rocprofiler-sdk/source/include/rocprofiler-sdk/hip/api_args.h index 012b709941..7c04267021 100644 --- a/projects/rocprofiler-sdk/source/include/rocprofiler-sdk/hip/api_args.h +++ b/projects/rocprofiler-sdk/source/include/rocprofiler-sdk/hip/api_args.h @@ -3331,6 +3331,33 @@ typedef union rocprofiler_hip_api_args_t hipStream_t src; } hipStreamCopyAttributes; #endif +#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 17 + struct + { + hipKernel_t* kernels; + unsigned int numKernels; + hipLibrary_t library; + } hipLibraryEnumerateKernels; + struct + { + hipLibrary_t* library; + hipKernel_t kernel; + } hipKernelGetLibrary; + struct + { + const char** name; + hipKernel_t kernel; + } hipKernelGetName; +#endif +#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 18 + struct + { + size_t* dynamicSmemSize; + const void* f; + int numBlocks; + int blockSize; + } hipOccupancyAvailableDynamicSMemPerBlock; +#endif } rocprofiler_hip_api_args_t; ROCPROFILER_EXTERN_C_FINI diff --git a/projects/rocprofiler-sdk/source/include/rocprofiler-sdk/hip/runtime_api_id.h b/projects/rocprofiler-sdk/source/include/rocprofiler-sdk/hip/runtime_api_id.h index b0f6314e99..1675ed84be 100644 --- a/projects/rocprofiler-sdk/source/include/rocprofiler-sdk/hip/runtime_api_id.h +++ b/projects/rocprofiler-sdk/source/include/rocprofiler-sdk/hip/runtime_api_id.h @@ -561,6 +561,14 @@ typedef enum rocprofiler_hip_runtime_api_id_t // NOLINT(performance-enum-size) #endif #if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 16 ROCPROFILER_HIP_RUNTIME_API_ID_hipStreamCopyAttributes, +#endif +#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 17 + ROCPROFILER_HIP_RUNTIME_API_ID_hipLibraryEnumerateKernels, + ROCPROFILER_HIP_RUNTIME_API_ID_hipKernelGetLibrary, + ROCPROFILER_HIP_RUNTIME_API_ID_hipKernelGetName, +#endif +#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 18 + ROCPROFILER_HIP_RUNTIME_API_ID_hipOccupancyAvailableDynamicSMemPerBlock, #endif ROCPROFILER_HIP_RUNTIME_API_ID_LAST, } rocprofiler_hip_runtime_api_id_t; diff --git a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/hip/abi.cpp b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/hip/abi.cpp index ea0b0931ad..780a848e57 100644 --- a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/hip/abi.cpp +++ b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/hip/abi.cpp @@ -605,6 +605,16 @@ ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipLibraryGetKernelCount_fn, 500); ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipStreamCopyAttributes_fn, 501); #endif +#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 17 +ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipLibraryEnumerateKernels_fn, 502); +ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipKernelGetLibrary_fn, 503); +ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipKernelGetName_fn, 504); +#endif + +#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 18 +ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipOccupancyAvailableDynamicSMemPerBlock_fn, 505); +#endif + #if HIP_RUNTIME_API_TABLE_STEP_VERSION == 0 ROCP_SDK_ENFORCE_ABI_VERSIONING(::HipDispatchTable, 442) #elif HIP_RUNTIME_API_TABLE_STEP_VERSION == 1 @@ -639,6 +649,10 @@ ROCP_SDK_ENFORCE_ABI_VERSIONING(::HipDispatchTable, 496) ROCP_SDK_ENFORCE_ABI_VERSIONING(::HipDispatchTable, 501) #elif HIP_RUNTIME_API_TABLE_STEP_VERSION == 16 ROCP_SDK_ENFORCE_ABI_VERSIONING(::HipDispatchTable, 502) +#elif HIP_RUNTIME_API_TABLE_STEP_VERSION == 17 +ROCP_SDK_ENFORCE_ABI_VERSIONING(::HipDispatchTable, 505) +#elif HIP_RUNTIME_API_TABLE_STEP_VERSION == 18 +ROCP_SDK_ENFORCE_ABI_VERSIONING(::HipDispatchTable, 506) #else INTERNAL_CI_ROCP_SDK_ENFORCE_ABI_VERSIONING(::HipDispatchTable, 0) #endif diff --git a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/hip/hip.def.cpp b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/hip/hip.def.cpp index f14a55609b..b7eaa439f5 100644 --- a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/hip/hip.def.cpp +++ b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/hip/hip.def.cpp @@ -631,6 +631,16 @@ HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNT #if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 16 HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNTIME_API_ID_hipStreamCopyAttributes, hipStreamCopyAttributes, hipStreamCopyAttributes_fn, dst, src); #endif + +#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 17 +HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNTIME_API_ID_hipLibraryEnumerateKernels, hipLibraryEnumerateKernels, hipLibraryEnumerateKernels_fn, kernels, numKernels, library); +HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNTIME_API_ID_hipKernelGetLibrary, hipKernelGetLibrary, hipKernelGetLibrary_fn, library, kernel); +HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNTIME_API_ID_hipKernelGetName, hipKernelGetName, hipKernelGetName_fn, name, kernel); +#endif + +#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 18 +HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNTIME_API_ID_hipOccupancyAvailableDynamicSMemPerBlock, hipOccupancyAvailableDynamicSMemPerBlock, hipOccupancyAvailableDynamicSMemPerBlock_fn, dynamicSmemSize, f, numBlocks, blockSize); +#endif // clang-format on #else