Add missing API calls to rocprofiler (#1599)

Signed-off-by: Sebastian Luzynski <Sebastian.Luzynski@amd.com>
This commit is contained in:
sluzynsk-amd
2025-11-03 10:40:16 -05:00
committed by GitHub
parent fee5bd9a4e
commit 9f940c7265
7 changed files with 74 additions and 3 deletions
@@ -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;