Update HIP tracing ABI (#1025)

* Update HIP ABI tracing

* Minor HIP abi.cpp updates

* Misc roctx updates (version.h + more)

* Common static thread-local template struct

- static_tl_object
- similar to static_object but with thread-local semantics

* rocprofiler-sdk/version.h updates

* Update for HIP_RUNTIME_API_TABLE_STEP_VERSION == {4,5,6}

* Fix roctx.cpp tweaks
这个提交包含在:
Jonathan R. Madsen
2024-09-13 17:10:35 -05:00
提交者 GitHub
父节点 bc82eccf4f
当前提交 7861dcc6c6
修改 12 个文件,包含 728 行新增512 行删除
@@ -39,10 +39,10 @@
*/
/**
* @brief The function was introduced in version 10.0 of the interface and has the
* symbol version string of ``"ROCTX_10.0"``.
* @brief The function was introduced in version 0.0 of the interface and has the
* symbol version string of ``"ROCPROFILER_SDK_ROCTX_0.0"``.
*/
#define ROCTX_VERSION_10_0
#define ROCPROFILER_SDK_ROCTX_VERSION_0_0
/** @} */
@@ -86,7 +86,7 @@
#define ROCTX_IMPORT ROCTX_IMPORT_DECORATOR
#if !defined(ROCTX_API)
# if defined(rocprofiler_EXPORTS)
# if defined(roctx_EXPORTS)
# define ROCTX_API ROCTX_EXPORT
# else
# define ROCTX_API ROCTX_IMPORT
@@ -23,6 +23,10 @@
#pragma once
/**
* @def ROCTX_IS_ROCPROFILER_SDK
* @brief Preprocessor define indicating the roctx header is a rocprofiler-sdk project
* @addtogroup VERSIONING_GROUP
*
* @def ROCTX_VERSION_MAJOR
* @brief The major version of the interface as a macro so it can be used
* by the preprocessor.
@@ -84,6 +88,8 @@
* @addtogroup VERSIONING_GROUP
*/
#define ROCTX_IS_ROCPROFILER_SDK 1
// clang-format off
#define ROCTX_VERSION_MAJOR @PROJECT_VERSION_MAJOR@
#define ROCTX_VERSION_MINOR @PROJECT_VERSION_MINOR@
+50 -24
查看文件
@@ -2888,30 +2888,6 @@ typedef union rocprofiler_hip_api_args_t
hipFunction_t* functionPtr;
const void* symbolPtr;
} hipGetFuncBySymbol;
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 4
struct
{
hipGraphNode_t* phGraphNode;
hipGraph_t hGraph;
const hipGraphNode_t* dependencies;
size_t numDependencies;
hipDeviceptr_t dptr;
} hipDrvGraphAddMemFreeNode;
struct
{
hipGraphExec_t hGraphExec;
hipGraphNode_t hNode;
const HIP_MEMCPY3D* copyParams;
hipCtx_t ctx;
} hipDrvGraphExecMemcpyNodeSetParams;
struct
{
hipGraphExec_t hGraphExec;
hipGraphNode_t hNode;
const HIP_MEMSET_NODE_PARAMS* memsetParams;
hipCtx_t ctx;
} hipDrvGraphExecMemsetNodeSetParams;
struct
{
int* device_arr;
@@ -2967,6 +2943,30 @@ typedef union rocprofiler_hip_api_args_t
size_t height;
hipMemcpyKind kind;
} hipMemcpy2DArrayToArray;
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 4
struct
{
hipGraphNode_t* phGraphNode;
hipGraph_t hGraph;
const hipGraphNode_t* dependencies;
size_t numDependencies;
hipDeviceptr_t dptr;
} hipDrvGraphAddMemFreeNode;
struct
{
hipGraphExec_t hGraphExec;
hipGraphNode_t hNode;
const HIP_MEMCPY3D* copyParams;
hipCtx_t ctx;
} hipDrvGraphExecMemcpyNodeSetParams;
struct
{
hipGraphExec_t hGraphExec;
hipGraphNode_t hNode;
const HIP_MEMSET_NODE_PARAMS* memsetParams;
hipCtx_t ctx;
} hipDrvGraphExecMemsetNodeSetParams;
struct
{
hipGraphExec_t graphExec;
@@ -2989,6 +2989,32 @@ typedef union rocprofiler_hip_api_args_t
hipExternalMemory_t extMem;
const hipExternalMemoryMipmappedArrayDesc* mipmapDesc;
} hipExternalMemoryGetMappedMipmappedArray;
struct
{
hipGraphNode_t hNode;
HIP_MEMCPY3D* nodeParams;
} hipDrvGraphMemcpyNodeGetParams;
struct
{
hipGraphNode_t hNode;
const HIP_MEMCPY3D* nodeParams;
} hipDrvGraphMemcpyNodeSetParams;
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 5
struct
{
void** ptr;
size_t size;
unsigned int flags;
} hipExtHostAlloc;
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 6
struct
{
size_t* maxWidthInElements;
const hipChannelFormatDesc* fmtDesc;
int device;
} hipDeviceGetTexture1DLinearMaxWidth;
#endif
} rocprofiler_hip_api_args_t;
@@ -482,11 +482,6 @@ typedef enum // NOLINT(performance-enum-size)
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 3
ROCPROFILER_HIP_RUNTIME_API_ID_hipGetFuncBySymbol,
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 4
ROCPROFILER_HIP_RUNTIME_API_ID_hipDrvGraphAddMemFreeNode,
ROCPROFILER_HIP_RUNTIME_API_ID_hipDrvGraphExecMemcpyNodeSetParams,
ROCPROFILER_HIP_RUNTIME_API_ID_hipDrvGraphExecMemsetNodeSetParams,
ROCPROFILER_HIP_RUNTIME_API_ID_hipSetValidDevices,
ROCPROFILER_HIP_RUNTIME_API_ID_hipMemcpyAtoD,
ROCPROFILER_HIP_RUNTIME_API_ID_hipMemcpyDtoA,
@@ -494,10 +489,23 @@ typedef enum // NOLINT(performance-enum-size)
ROCPROFILER_HIP_RUNTIME_API_ID_hipMemcpyAtoHAsync,
ROCPROFILER_HIP_RUNTIME_API_ID_hipMemcpyHtoAAsync,
ROCPROFILER_HIP_RUNTIME_API_ID_hipMemcpy2DArrayToArray,
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 4
ROCPROFILER_HIP_RUNTIME_API_ID_hipDrvGraphAddMemFreeNode,
ROCPROFILER_HIP_RUNTIME_API_ID_hipDrvGraphExecMemcpyNodeSetParams,
ROCPROFILER_HIP_RUNTIME_API_ID_hipDrvGraphExecMemsetNodeSetParams,
ROCPROFILER_HIP_RUNTIME_API_ID_hipGraphExecGetFlags,
ROCPROFILER_HIP_RUNTIME_API_ID_hipGraphNodeSetParams,
ROCPROFILER_HIP_RUNTIME_API_ID_hipGraphExecNodeSetParams,
ROCPROFILER_HIP_RUNTIME_API_ID_hipExternalMemoryGetMappedMipmappedArray,
ROCPROFILER_HIP_RUNTIME_API_ID_hipDrvGraphMemcpyNodeGetParams,
ROCPROFILER_HIP_RUNTIME_API_ID_hipDrvGraphMemcpyNodeSetParams,
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 5
ROCPROFILER_HIP_RUNTIME_API_ID_hipExtHostAlloc,
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 6
ROCPROFILER_HIP_RUNTIME_API_ID_hipDeviceGetTexture1DLinearMaxWidth,
#endif
ROCPROFILER_HIP_RUNTIME_API_ID_LAST,
} rocprofiler_hip_runtime_api_id_t;
@@ -23,6 +23,10 @@
#pragma once
/**
* @def ROCPROFILER_IS_ROCPROFILER_SDK
* @brief Preprocessor define indicating the rocprofiler header is a rocprofiler-sdk project
* @addtogroup VERSIONING_GROUP
*
* @def ROCPROFILER_VERSION_MAJOR
* @brief The major version of the interface as a macro so it can be used
* by the preprocessor.
@@ -84,6 +88,8 @@
* @addtogroup VERSIONING_GROUP
*/
#define ROCPROFILER_IS_ROCPROFILER_SDK 1
// clang-format off
#define ROCPROFILER_VERSION_MAJOR @PROJECT_VERSION_MAJOR@
#define ROCPROFILER_VERSION_MINOR @PROJECT_VERSION_MINOR@