[SDK] Update HIP support for ROCm 7.0 (#413)

* Update HIP VERSION to 7.0.0, HIP_RUNTIME_API_TABLE_STEP_VERSION to 13

* Changed rocprofiler_config_interfaces.cmake to check version after finding package

* Update cmake/rocprofiler_config_interfaces.cmake

---------

Co-authored-by: Madsen, Jonathan <Jonathan.Madsen@amd.com>

[ROCm/rocprofiler-sdk commit: b90ef494dd]
Этот коммит содержится в:
Trowbridge, Ian
2025-05-27 13:14:08 -05:00
коммит произвёл GitHub
родитель 3f47d1fffa
Коммит 6efbc492f1
6 изменённых файлов: 176 добавлений и 1 удалений
+5 -1
Просмотреть файл
@@ -117,7 +117,6 @@ endif()
find_package(
hip
6.2
REQUIRED
CONFIG
HINTS
@@ -126,6 +125,11 @@ find_package(
PATHS
${rocm_version_DIR}
${ROCM_PATH})
if(hip_VERSION VERSION_LESS "6.2")
message(FATAL_ERROR "HIP version is ${hip_VERSION}, requires at least 6.2")
endif()
target_link_libraries(rocprofiler-sdk-hip INTERFACE hip::host)
rocprofiler_config_nolink_target(rocprofiler-sdk-hip-nolink hip::host)
+72
Просмотреть файл
@@ -3063,6 +3063,78 @@ typedef union rocprofiler_hip_api_args_t
const hipBatchMemOpNodeParams* nodeParams;
} hipGraphExecBatchMemOpNodeSetParams;
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 9
struct
{
hipEvent_t event;
hipStream_t stream;
unsigned int flags;
} hipEventRecordWithFlags;
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 10
struct
{
hipLinkState_t state;
hipJitInputType type;
void* data;
size_t size;
const char* name;
unsigned int numOptions;
hipJitOption* options;
void** optionValues;
} hipLinkAddData;
struct
{
hipLinkState_t state;
hipJitInputType type;
const char* path;
unsigned int numOptions;
hipJitOption* options;
void** optionValues;
} hipLinkAddFile;
struct
{
hipLinkState_t state;
void** hipBinOut;
size_t* sizeOut;
} hipLinkComplete;
struct
{
unsigned int numOptions;
hipJitOption* options;
void** optionValues;
hipLinkState_t* stateOut;
} hipLinkCreate;
struct
{
hipLinkState_t state;
} hipLinkDestroy;
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 11
struct
{
const hipLaunchConfig_t* config;
const void* fPtr;
void** args;
} hipLaunchKernelExC;
struct
{
const HIP_LAUNCH_CONFIG* config;
hipFunction_t f;
void** params;
void** extra;
} hipDrvLaunchKernelEx;
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 12
struct
{
void* handle;
hipDeviceptr_t dptr;
size_t size;
hipMemRangeHandleType handleType;
unsigned long long flags;
} hipMemGetHandleForAddressRange;
#endif
} rocprofiler_hip_api_args_t;
ROCPROFILER_EXTERN_C_FINI
+17
Просмотреть файл
@@ -513,6 +513,23 @@ typedef enum rocprofiler_hip_runtime_api_id_t // NOLINT(performance-enum-size)
ROCPROFILER_HIP_RUNTIME_API_ID_hipGraphBatchMemOpNodeGetParams,
ROCPROFILER_HIP_RUNTIME_API_ID_hipGraphBatchMemOpNodeSetParams,
ROCPROFILER_HIP_RUNTIME_API_ID_hipGraphExecBatchMemOpNodeSetParams,
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 9
ROCPROFILER_HIP_RUNTIME_API_ID_hipEventRecordWithFlags,
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 10
ROCPROFILER_HIP_RUNTIME_API_ID_hipLinkAddData,
ROCPROFILER_HIP_RUNTIME_API_ID_hipLinkAddFile,
ROCPROFILER_HIP_RUNTIME_API_ID_hipLinkComplete,
ROCPROFILER_HIP_RUNTIME_API_ID_hipLinkCreate,
ROCPROFILER_HIP_RUNTIME_API_ID_hipLinkDestroy,
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 11
ROCPROFILER_HIP_RUNTIME_API_ID_hipLaunchKernelExC,
ROCPROFILER_HIP_RUNTIME_API_ID_hipDrvLaunchKernelEx,
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 12
ROCPROFILER_HIP_RUNTIME_API_ID_hipMemGetHandleForAddressRange,
#endif
ROCPROFILER_HIP_RUNTIME_API_ID_LAST,
} rocprofiler_hip_runtime_api_id_t;
+31
Просмотреть файл
@@ -550,6 +550,27 @@ ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipGraphBatchMemOpNodeSetParams_fn, 466
ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipGraphExecBatchMemOpNodeSetParams_fn, 467)
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 9
ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipEventRecordWithFlags_fn, 468)
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 10
ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipLinkAddData_fn, 469)
ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipLinkAddFile_fn, 470)
ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipLinkComplete_fn, 471)
ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipLinkCreate_fn, 472)
ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipLinkDestroy_fn, 473)
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 11
ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipLaunchKernelExC_fn, 474)
ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipDrvLaunchKernelEx_fn, 475)
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 12
ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipMemGetHandleForAddressRange_fn, 476)
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION == 0
ROCP_SDK_ENFORCE_ABI_VERSIONING(::HipDispatchTable, 442)
#elif HIP_RUNTIME_API_TABLE_STEP_VERSION == 1
@@ -568,6 +589,16 @@ ROCP_SDK_ENFORCE_ABI_VERSIONING(::HipDispatchTable, 463)
ROCP_SDK_ENFORCE_ABI_VERSIONING(::HipDispatchTable, 464)
#elif HIP_RUNTIME_API_TABLE_STEP_VERSION == 8
ROCP_SDK_ENFORCE_ABI_VERSIONING(::HipDispatchTable, 468)
#elif HIP_RUNTIME_API_TABLE_STEP_VERSION == 9
ROCP_SDK_ENFORCE_ABI_VERSIONING(::HipDispatchTable, 469)
#elif HIP_RUNTIME_API_TABLE_STEP_VERSION == 10
ROCP_SDK_ENFORCE_ABI_VERSIONING(::HipDispatchTable, 474)
#elif HIP_RUNTIME_API_TABLE_STEP_VERSION == 11
ROCP_SDK_ENFORCE_ABI_VERSIONING(::HipDispatchTable, 476)
#elif HIP_RUNTIME_API_TABLE_STEP_VERSION == 12
ROCP_SDK_ENFORCE_ABI_VERSIONING(::HipDispatchTable, 477)
#elif HIP_RUNTIME_API_TABLE_STEP_VERSION == 13
ROCP_SDK_ENFORCE_ABI_VERSIONING(::HipDispatchTable, 477)
#else
INTERNAL_CI_ROCP_SDK_ENFORCE_ABI_VERSIONING(::HipDispatchTable, 0)
#endif
+30
Просмотреть файл
@@ -398,6 +398,36 @@ struct formatter<hipStreamBatchMemOpType> : rocprofiler::hip::details::base_form
}
};
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 11
ROCP_SDK_HIP_FORMATTER(
hipLaunchConfig_st,
"{}gridDim={}, blockDim={}, dynamicSmemBytes={}, stream={}, attrs={}, numAttrs={}",
'{',
v.gridDim,
v.blockDim,
v.dynamicSmemBytes,
static_cast<void*>(v.stream),
static_cast<void*>(v.attrs),
v.numAttrs,
'}')
ROCP_SDK_HIP_FORMATTER(HIP_LAUNCH_CONFIG_st,
"{}gridDimX={}, gridDimY={}, gridDimZ={}, blockDimX={}, blockDimY={}, "
"blockDimZ={}, sharedMemBytes={}, hStream={}, attrs={}, numAttrs={}",
'{',
v.gridDimX,
v.gridDimY,
v.gridDimZ,
v.blockDimX,
v.blockDimY,
v.blockDimZ,
v.sharedMemBytes,
static_cast<void*>(v.hStream),
static_cast<void*>(v.attrs),
v.numAttrs,
'}')
#endif
} // namespace fmt
#undef ROCP_SDK_HIP_FORMATTER
+21
Просмотреть файл
@@ -576,6 +576,27 @@ HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNT
HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNTIME_API_ID_hipGraphBatchMemOpNodeSetParams, hipGraphBatchMemOpNodeSetParams, hipGraphBatchMemOpNodeSetParams_fn, hNode, nodeParams);
HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNTIME_API_ID_hipGraphExecBatchMemOpNodeSetParams, hipGraphExecBatchMemOpNodeSetParams, hipGraphExecBatchMemOpNodeSetParams_fn, hGraphExec, hNode, nodeParams);
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 9
HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNTIME_API_ID_hipEventRecordWithFlags, hipEventRecordWithFlags, hipEventRecordWithFlags_fn, event, stream, flags);
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 10
HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNTIME_API_ID_hipLinkAddData, hipLinkAddData, hipLinkAddData_fn, state, type, data, size, name, numOptions, options, optionValues);
HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNTIME_API_ID_hipLinkAddFile, hipLinkAddFile, hipLinkAddFile_fn, state, type, path, numOptions, options, optionValues);
HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNTIME_API_ID_hipLinkComplete, hipLinkComplete, hipLinkComplete_fn, state, hipBinOut, sizeOut);
HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNTIME_API_ID_hipLinkCreate, hipLinkCreate, hipLinkCreate_fn, numOptions, options, optionValues, stateOut);
HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNTIME_API_ID_hipLinkDestroy, hipLinkDestroy, hipLinkDestroy_fn, state);
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 11
HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNTIME_API_ID_hipLaunchKernelExC, hipLaunchKernelExC, hipLaunchKernelExC_fn, config, fPtr, args);
HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNTIME_API_ID_hipDrvLaunchKernelEx, hipDrvLaunchKernelEx, hipDrvLaunchKernelEx_fn, config, f, params, extra);
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 12
HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNTIME_API_ID_hipMemGetHandleForAddressRange, hipMemGetHandleForAddressRange, hipMemGetHandleForAddressRange_fn, handle, dptr, size, handleType, flags);
#endif
// clang-format on
#else