SWDEV-558836, SWDEV-558837 - Add hipMemSetMemPool and hipMemGetMemPoo… (#1349)

* SWDEV-558836, SWDEV-558837 - Add hipMemSetMemPool and hipMemGetMemPool implementation

* Add managed allocation type for mem pools

* Update rocprofiler-sdk with APis declaration
Bu işleme şunda yer alıyor:
vstojilj
2026-01-27 18:45:28 +01:00
işlemeyi yapan: GitHub
ebeveyn 324a864bc4
işleme 9a8942a89c
21 değiştirilmiş dosya ile 517 ekleme ve 17 silme
+6
Dosyayı Görüntüle
@@ -1009,6 +1009,10 @@ ROCPROFILER_ENUM_LABEL(ROCPROFILER_HIP_RUNTIME_API_ID_hipExtDisableLogging)
ROCPROFILER_ENUM_LABEL(ROCPROFILER_HIP_RUNTIME_API_ID_hipExtEnableLogging)
ROCPROFILER_ENUM_LABEL(ROCPROFILER_HIP_RUNTIME_API_ID_hipExtSetLoggingParams)
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 22
ROCPROFILER_ENUM_LABEL(ROCPROFILER_HIP_RUNTIME_API_ID_hipMemSetMemPool)
ROCPROFILER_ENUM_LABEL(ROCPROFILER_HIP_RUNTIME_API_ID_hipMemGetMemPool)
#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
@@ -1053,6 +1057,8 @@ static_assert(ROCPROFILER_HIP_RUNTIME_API_ID_LAST == 507);
static_assert(ROCPROFILER_HIP_RUNTIME_API_ID_LAST == 508);
#elif HIP_RUNTIME_API_TABLE_STEP_VERSION == 21
static_assert(ROCPROFILER_HIP_RUNTIME_API_ID_LAST == 511);
#elif HIP_RUNTIME_API_TABLE_STEP_VERSION == 22
static_assert(ROCPROFILER_HIP_RUNTIME_API_ID_LAST == 513);
#else
# if !defined(ROCPROFILER_UNSAFE_NO_VERSION_CHECK) && \
(defined(ROCPROFILER_CI) && ROCPROFILER_CI > 0)
+14
Dosyayı Görüntüle
@@ -3397,6 +3397,20 @@ typedef union rocprofiler_hip_api_args_t
size_t log_mask;
} hipExtSetLoggingParams;
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 22
struct
{
hipMemLocation* location;
hipMemAllocationType type;
hipMemPool_t pool;
} hipMemSetMemPool;
struct
{
hipMemPool_t* pool;
hipMemLocation* location;
hipMemAllocationType type;
} hipMemGetMemPool;
#endif
} rocprofiler_hip_api_args_t;
ROCPROFILER_EXTERN_C_FINI
+4
Dosyayı Görüntüle
@@ -580,6 +580,10 @@ typedef enum rocprofiler_hip_runtime_api_id_t // NOLINT(performance-enum-size)
ROCPROFILER_HIP_RUNTIME_API_ID_hipExtDisableLogging,
ROCPROFILER_HIP_RUNTIME_API_ID_hipExtEnableLogging,
ROCPROFILER_HIP_RUNTIME_API_ID_hipExtSetLoggingParams,
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 22
ROCPROFILER_HIP_RUNTIME_API_ID_hipMemSetMemPool,
ROCPROFILER_HIP_RUNTIME_API_ID_hipMemGetMemPool,
#endif
ROCPROFILER_HIP_RUNTIME_API_ID_LAST,
} rocprofiler_hip_runtime_api_id_t;
+6
Dosyayı Görüntüle
@@ -628,6 +628,10 @@ ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipExtDisableLogging_fn, 508);
ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipExtEnableLogging_fn, 509);
ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipExtSetLoggingParams_fn, 510);
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 22
ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipMemSetMemPool_fn, 511);
ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipMemGetMemPool_fn, 512);
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION == 0
ROCP_SDK_ENFORCE_ABI_VERSIONING(::HipDispatchTable, 442)
@@ -673,6 +677,8 @@ ROCP_SDK_ENFORCE_ABI_VERSIONING(::HipDispatchTable, 507)
ROCP_SDK_ENFORCE_ABI_VERSIONING(::HipDispatchTable, 508)
#elif HIP_RUNTIME_API_TABLE_STEP_VERSION == 21
ROCP_SDK_ENFORCE_ABI_VERSIONING(::HipDispatchTable, 511)
#elif HIP_RUNTIME_API_TABLE_STEP_VERSION == 22
ROCP_SDK_ENFORCE_ABI_VERSIONING(::HipDispatchTable, 513)
#else
INTERNAL_CI_ROCP_SDK_ENFORCE_ABI_VERSIONING(::HipDispatchTable, 0)
#endif
+3
Dosyayı Görüntüle
@@ -265,6 +265,9 @@ struct formatter<hipMemAllocationType> : rocprofiler::hip::details::base_formatt
ROCP_SDK_HIP_FORMAT_CASE_STMT(hipMemAllocationType, Max);
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 14
ROCP_SDK_HIP_FORMAT_CASE_STMT(hipMemAllocationType, Uncached);
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 22
ROCP_SDK_HIP_FORMAT_CASE_STMT(hipMemAllocationType, Managed);
#endif
ROCP_SDK_HIP_FORMAT_DFLT_CASE(hipMemAllocationType);
}
+5
Dosyayı Görüntüle
@@ -655,6 +655,11 @@ HIP_API_INFO_DEFINITION_0(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNT
HIP_API_INFO_DEFINITION_0(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNTIME_API_ID_hipExtEnableLogging, hipExtEnableLogging, hipExtEnableLogging_fn);
HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNTIME_API_ID_hipExtSetLoggingParams, hipExtSetLoggingParams, hipExtSetLoggingParams_fn, log_level, log_size, log_mask);
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 22
HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNTIME_API_ID_hipMemSetMemPool, hipMemSetMemPool, hipMemSetMemPool_fn, location, type, pool);
HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNTIME_API_ID_hipMemGetMemPool, hipMemGetMemPool, hipMemGetMemPool_fn, pool, location, type);
#endif
// clang-format on
#else