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
This commit is contained in:
Jonathan R. Madsen
2024-09-13 17:10:35 -05:00
committed by GitHub
orang tua bc82eccf4f
melakukan 7861dcc6c6
12 mengubah file dengan 728 tambahan dan 512 penghapusan
@@ -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;