Add missing API calls to rocprofiler (#1599)
Signed-off-by: Sebastian Luzynski <Sebastian.Luzynski@amd.com>
이 커밋은 다음에 포함됨:
@@ -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: |
|
||||
|
||||
@@ -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' }}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
새 이슈에서 참조
사용자 차단