5.0.1/5.1.3: hip_prof_str.h changes after running hip_prof_gen.py which causes build failure
littlewu2508 opened this issue · 2 comments
I try to build hip-5.0.1 with profile USE_PROF_API=1
, but while building hip_prof_gen.py
threw "Warning: "/ext4-disk/build/portage/dev-util/hip-5.0.1/work/hipamd-rocm-5.0.1/include/hip/amd_detail/hip_prof_str.h" needs to be re-generated and checked-in with the current changes"
and exit with return code 1. I found that the hip_prof_str.h in src and build dir is different:
diff -u hip-5.0.1_build/include/hip/amd_detail/hip_prof_str.h hipamd-rocm-5.0.1/include/hip/amd_detail/hip_prof_str.h
--- hip-5.0.1_build/include/hip/amd_detail/hip_prof_str.h 2022-02-21 12:44:30.100019006 +0800
+++ hipamd-rocm-5.0.1/include/hip/amd_detail/hip_prof_str.h 2022-02-01 22:54:45.000000000 +0800
@@ -302,9 +302,7 @@
HIP_API_ID_hipStreamGetCaptureInfo_v2 = 289,
HIP_API_ID_hipStreamIsCapturing = 290,
HIP_API_ID_hipStreamUpdateCaptureDependencies = 291,
- HIP_API_ID_hipDrvPointerGetAttributes = 292,
- HIP_API_ID_hipPointerGetAttribute = 293,
- HIP_API_ID_LAST = 293,
+ HIP_API_ID_LAST = 291,
HIP_API_ID_hipArray3DGetDescriptor = HIP_API_ID_NONE,
HIP_API_ID_hipArrayGetDescriptor = HIP_API_ID_NONE,
@@ -411,7 +409,6 @@
case HIP_API_ID_hipDrvMemcpy2DUnaligned: return "hipDrvMemcpy2DUnaligned";
case HIP_API_ID_hipDrvMemcpy3D: return "hipDrvMemcpy3D";
case HIP_API_ID_hipDrvMemcpy3DAsync: return "hipDrvMemcpy3DAsync";
- case HIP_API_ID_hipDrvPointerGetAttributes: return "hipDrvPointerGetAttributes";
case HIP_API_ID_hipEventCreate: return "hipEventCreate";
case HIP_API_ID_hipEventCreateWithFlags: return "hipEventCreateWithFlags";
case HIP_API_ID_hipEventDestroy: return "hipEventDestroy";
@@ -604,7 +601,6 @@
case HIP_API_ID_hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags: return "hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags";
case HIP_API_ID_hipOccupancyMaxPotentialBlockSize: return "hipOccupancyMaxPotentialBlockSize";
case HIP_API_ID_hipPeekAtLastError: return "hipPeekAtLastError";
- case HIP_API_ID_hipPointerGetAttribute: return "hipPointerGetAttribute";
case HIP_API_ID_hipPointerGetAttributes: return "hipPointerGetAttributes";
case HIP_API_ID_hipProfilerStart: return "hipProfilerStart";
case HIP_API_ID_hipProfilerStop: return "hipProfilerStop";
@@ -711,7 +707,6 @@
if (strcmp("hipDrvMemcpy2DUnaligned", name) == 0) return HIP_API_ID_hipDrvMemcpy2DUnaligned;
if (strcmp("hipDrvMemcpy3D", name) == 0) return HIP_API_ID_hipDrvMemcpy3D;
if (strcmp("hipDrvMemcpy3DAsync", name) == 0) return HIP_API_ID_hipDrvMemcpy3DAsync;
- if (strcmp("hipDrvPointerGetAttributes", name) == 0) return HIP_API_ID_hipDrvPointerGetAttributes;
if (strcmp("hipEventCreate", name) == 0) return HIP_API_ID_hipEventCreate;
if (strcmp("hipEventCreateWithFlags", name) == 0) return HIP_API_ID_hipEventCreateWithFlags;
if (strcmp("hipEventDestroy", name) == 0) return HIP_API_ID_hipEventDestroy;
@@ -904,7 +899,6 @@
if (strcmp("hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", name) == 0) return HIP_API_ID_hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags;
if (strcmp("hipOccupancyMaxPotentialBlockSize", name) == 0) return HIP_API_ID_hipOccupancyMaxPotentialBlockSize;
if (strcmp("hipPeekAtLastError", name) == 0) return HIP_API_ID_hipPeekAtLastError;
- if (strcmp("hipPointerGetAttribute", name) == 0) return HIP_API_ID_hipPointerGetAttribute;
if (strcmp("hipPointerGetAttributes", name) == 0) return HIP_API_ID_hipPointerGetAttributes;
if (strcmp("hipProfilerStart", name) == 0) return HIP_API_ID_hipProfilerStart;
if (strcmp("hipProfilerStop", name) == 0) return HIP_API_ID_hipProfilerStop;
@@ -1199,14 +1193,6 @@
hipStream_t stream;
} hipDrvMemcpy3DAsync;
struct {
- unsigned int numAttributes;
- hipPointer_attribute* attributes;
- hipPointer_attribute attributes__val;
- void** data;
- void* data__val;
- hipDeviceptr_t ptr;
- } hipDrvPointerGetAttributes;
- struct {
hipEvent_t* event;
hipEvent_t event__val;
} hipEventCreate;
@@ -2436,11 +2422,6 @@
int blockSizeLimit;
} hipOccupancyMaxPotentialBlockSize;
struct {
- void* data;
- hipPointer_attribute attribute;
- hipDeviceptr_t ptr;
- } hipPointerGetAttribute;
- struct {
hipPointerAttribute_t* attributes;
hipPointerAttribute_t attributes__val;
const void* ptr;
@@ -2523,7 +2504,7 @@
hipGraph_t* graph_out;
hipGraph_t graph_out__val;
const hipGraphNode_t** dependencies_out;
- hipGraphNode_t* dependencies_out__val;
+ const hipGraphNode_t* dependencies_out__val;
size_t* numDependencies_out;
size_t numDependencies_out__val;
} hipStreamGetCaptureInfo_v2;
@@ -2948,9 +2929,6 @@
cb_data.args.hipDrvMemcpy3DAsync.pCopy = (const HIP_MEMCPY3D*)pCopy; \
cb_data.args.hipDrvMemcpy3DAsync.stream = (hipStream_t)stream; \
};
-// hipDrvPointerGetAttributes[('unsigned int', 'numAttributes'), ('hipPointer_attribute*', 'attributes'), ('void**', 'data'), ('hipDeviceptr_t', 'ptr')]
-#define INIT_hipDrvPointerGetAttributes_CB_ARGS_DATA(cb_data) { \
-};
// hipEventCreate[('hipEvent_t*', 'event')]
#define INIT_hipEventCreate_CB_ARGS_DATA(cb_data) { \
cb_data.args.hipEventCreate.event = (hipEvent_t*)event; \
@@ -3143,11 +3121,6 @@
};
// hipGraphAddChildGraphNode[('hipGraphNode_t*', 'pGraphNode'), ('hipGraph_t', 'graph'), ('const hipGraphNode_t*', 'pDependencies'), ('size_t', 'numDependencies'), ('hipGraph_t', 'childGraph')]
#define INIT_hipGraphAddChildGraphNode_CB_ARGS_DATA(cb_data) { \
- cb_data.args.hipGraphAddChildGraphNode.pGraphNode = (hipGraphNode_t*)pGraphNode; \
- cb_data.args.hipGraphAddChildGraphNode.graph = (hipGraph_t)graph; \
- cb_data.args.hipGraphAddChildGraphNode.pDependencies = (const hipGraphNode_t*)pDependencies; \
- cb_data.args.hipGraphAddChildGraphNode.numDependencies = (size_t)numDependencies; \
- cb_data.args.hipGraphAddChildGraphNode.childGraph = (hipGraph_t)childGraph; \
};
// hipGraphAddDependencies[('hipGraph_t', 'graph'), ('const hipGraphNode_t*', 'from'), ('const hipGraphNode_t*', 'to'), ('size_t', 'numDependencies')]
#define INIT_hipGraphAddDependencies_CB_ARGS_DATA(cb_data) { \
@@ -3165,27 +3138,12 @@
};
// hipGraphAddEventRecordNode[('hipGraphNode_t*', 'pGraphNode'), ('hipGraph_t', 'graph'), ('const hipGraphNode_t*', 'pDependencies'), ('size_t', 'numDependencies'), ('hipEvent_t', 'event')]
#define INIT_hipGraphAddEventRecordNode_CB_ARGS_DATA(cb_data) { \
- cb_data.args.hipGraphAddEventRecordNode.pGraphNode = (hipGraphNode_t*)pGraphNode; \
- cb_data.args.hipGraphAddEventRecordNode.graph = (hipGraph_t)graph; \
- cb_data.args.hipGraphAddEventRecordNode.pDependencies = (const hipGraphNode_t*)pDependencies; \
- cb_data.args.hipGraphAddEventRecordNode.numDependencies = (size_t)numDependencies; \
- cb_data.args.hipGraphAddEventRecordNode.event = (hipEvent_t)event; \
};
// hipGraphAddEventWaitNode[('hipGraphNode_t*', 'pGraphNode'), ('hipGraph_t', 'graph'), ('const hipGraphNode_t*', 'pDependencies'), ('size_t', 'numDependencies'), ('hipEvent_t', 'event')]
#define INIT_hipGraphAddEventWaitNode_CB_ARGS_DATA(cb_data) { \
- cb_data.args.hipGraphAddEventWaitNode.pGraphNode = (hipGraphNode_t*)pGraphNode; \
- cb_data.args.hipGraphAddEventWaitNode.graph = (hipGraph_t)graph; \
- cb_data.args.hipGraphAddEventWaitNode.pDependencies = (const hipGraphNode_t*)pDependencies; \
- cb_data.args.hipGraphAddEventWaitNode.numDependencies = (size_t)numDependencies; \
- cb_data.args.hipGraphAddEventWaitNode.event = (hipEvent_t)event; \
};
// hipGraphAddHostNode[('hipGraphNode_t*', 'pGraphNode'), ('hipGraph_t', 'graph'), ('const hipGraphNode_t*', 'pDependencies'), ('size_t', 'numDependencies'), ('const hipHostNodeParams*', 'pNodeParams')]
#define INIT_hipGraphAddHostNode_CB_ARGS_DATA(cb_data) { \
- cb_data.args.hipGraphAddHostNode.pGraphNode = (hipGraphNode_t*)pGraphNode; \
- cb_data.args.hipGraphAddHostNode.graph = (hipGraph_t)graph; \
- cb_data.args.hipGraphAddHostNode.pDependencies = (const hipGraphNode_t*)pDependencies; \
- cb_data.args.hipGraphAddHostNode.numDependencies = (size_t)numDependencies; \
- cb_data.args.hipGraphAddHostNode.pNodeParams = (const hipHostNodeParams*)pNodeParams; \
};
// hipGraphAddKernelNode[('hipGraphNode_t*', 'pGraphNode'), ('hipGraph_t', 'graph'), ('const hipGraphNode_t*', 'pDependencies'), ('size_t', 'numDependencies'), ('const hipKernelNodeParams*', 'pNodeParams')]
#define INIT_hipGraphAddKernelNode_CB_ARGS_DATA(cb_data) { \
@@ -3216,27 +3174,9 @@
};
// hipGraphAddMemcpyNodeFromSymbol[('hipGraphNode_t*', 'pGraphNode'), ('hipGraph_t', 'graph'), ('const hipGraphNode_t*', 'pDependencies'), ('size_t', 'numDependencies'), ('void*', 'dst'), ('const void*', 'symbol'), ('size_t', 'count'), ('size_t', 'offset'), ('hipMemcpyKind', 'kind')]
#define INIT_hipGraphAddMemcpyNodeFromSymbol_CB_ARGS_DATA(cb_data) { \
- cb_data.args.hipGraphAddMemcpyNodeFromSymbol.pGraphNode = (hipGraphNode_t*)pGraphNode; \
- cb_data.args.hipGraphAddMemcpyNodeFromSymbol.graph = (hipGraph_t)graph; \
- cb_data.args.hipGraphAddMemcpyNodeFromSymbol.pDependencies = (const hipGraphNode_t*)pDependencies; \
- cb_data.args.hipGraphAddMemcpyNodeFromSymbol.numDependencies = (size_t)numDependencies; \
- cb_data.args.hipGraphAddMemcpyNodeFromSymbol.dst = (void*)dst; \
- cb_data.args.hipGraphAddMemcpyNodeFromSymbol.symbol = (const void*)symbol; \
- cb_data.args.hipGraphAddMemcpyNodeFromSymbol.count = (size_t)count; \
- cb_data.args.hipGraphAddMemcpyNodeFromSymbol.offset = (size_t)offset; \
- cb_data.args.hipGraphAddMemcpyNodeFromSymbol.kind = (hipMemcpyKind)kind; \
};
// hipGraphAddMemcpyNodeToSymbol[('hipGraphNode_t*', 'pGraphNode'), ('hipGraph_t', 'graph'), ('const hipGraphNode_t*', 'pDependencies'), ('size_t', 'numDependencies'), ('const void*', 'symbol'), ('const void*', 'src'), ('size_t', 'count'), ('size_t', 'offset'), ('hipMemcpyKind', 'kind')]
#define INIT_hipGraphAddMemcpyNodeToSymbol_CB_ARGS_DATA(cb_data) { \
- cb_data.args.hipGraphAddMemcpyNodeToSymbol.pGraphNode = (hipGraphNode_t*)pGraphNode; \
- cb_data.args.hipGraphAddMemcpyNodeToSymbol.graph = (hipGraph_t)graph; \
- cb_data.args.hipGraphAddMemcpyNodeToSymbol.pDependencies = (const hipGraphNode_t*)pDependencies; \
- cb_data.args.hipGraphAddMemcpyNodeToSymbol.numDependencies = (size_t)numDependencies; \
- cb_data.args.hipGraphAddMemcpyNodeToSymbol.symbol = (const void*)symbol; \
- cb_data.args.hipGraphAddMemcpyNodeToSymbol.src = (const void*)src; \
- cb_data.args.hipGraphAddMemcpyNodeToSymbol.count = (size_t)count; \
- cb_data.args.hipGraphAddMemcpyNodeToSymbol.offset = (size_t)offset; \
- cb_data.args.hipGraphAddMemcpyNodeToSymbol.kind = (hipMemcpyKind)kind; \
};
// hipGraphAddMemsetNode[('hipGraphNode_t*', 'pGraphNode'), ('hipGraph_t', 'graph'), ('const hipGraphNode_t*', 'pDependencies'), ('size_t', 'numDependencies'), ('const hipMemsetParams*', 'pMemsetParams')]
#define INIT_hipGraphAddMemsetNode_CB_ARGS_DATA(cb_data) { \
@@ -3248,13 +3188,9 @@
};
// hipGraphChildGraphNodeGetGraph[('hipGraphNode_t', 'node'), ('hipGraph_t*', 'pGraph')]
#define INIT_hipGraphChildGraphNodeGetGraph_CB_ARGS_DATA(cb_data) { \
- cb_data.args.hipGraphChildGraphNodeGetGraph.node = (hipGraphNode_t)node; \
- cb_data.args.hipGraphChildGraphNodeGetGraph.pGraph = (hipGraph_t*)pGraph; \
};
// hipGraphClone[('hipGraph_t*', 'pGraphClone'), ('hipGraph_t', 'originalGraph')]
#define INIT_hipGraphClone_CB_ARGS_DATA(cb_data) { \
- cb_data.args.hipGraphClone.pGraphClone = (hipGraph_t*)pGraphClone; \
- cb_data.args.hipGraphClone.originalGraph = (hipGraph_t)originalGraph; \
};
// hipGraphCreate[('hipGraph_t*', 'pGraph'), ('unsigned int', 'flags')]
#define INIT_hipGraphCreate_CB_ARGS_DATA(cb_data) { \
@@ -3267,33 +3203,21 @@
};
// hipGraphDestroyNode[('hipGraphNode_t', 'node')]
#define INIT_hipGraphDestroyNode_CB_ARGS_DATA(cb_data) { \
- cb_data.args.hipGraphDestroyNode.node = (hipGraphNode_t)node; \
};
// hipGraphEventRecordNodeGetEvent[('hipGraphNode_t', 'node'), ('hipEvent_t*', 'event_out')]
#define INIT_hipGraphEventRecordNodeGetEvent_CB_ARGS_DATA(cb_data) { \
- cb_data.args.hipGraphEventRecordNodeGetEvent.node = (hipGraphNode_t)node; \
- cb_data.args.hipGraphEventRecordNodeGetEvent.event_out = (hipEvent_t*)event_out; \
};
// hipGraphEventRecordNodeSetEvent[('hipGraphNode_t', 'node'), ('hipEvent_t', 'event')]
#define INIT_hipGraphEventRecordNodeSetEvent_CB_ARGS_DATA(cb_data) { \
- cb_data.args.hipGraphEventRecordNodeSetEvent.node = (hipGraphNode_t)node; \
- cb_data.args.hipGraphEventRecordNodeSetEvent.event = (hipEvent_t)event; \
};
// hipGraphEventWaitNodeGetEvent[('hipGraphNode_t', 'node'), ('hipEvent_t*', 'event_out')]
#define INIT_hipGraphEventWaitNodeGetEvent_CB_ARGS_DATA(cb_data) { \
- cb_data.args.hipGraphEventWaitNodeGetEvent.node = (hipGraphNode_t)node; \
- cb_data.args.hipGraphEventWaitNodeGetEvent.event_out = (hipEvent_t*)event_out; \
};
// hipGraphEventWaitNodeSetEvent[('hipGraphNode_t', 'node'), ('hipEvent_t', 'event')]
#define INIT_hipGraphEventWaitNodeSetEvent_CB_ARGS_DATA(cb_data) { \
- cb_data.args.hipGraphEventWaitNodeSetEvent.node = (hipGraphNode_t)node; \
- cb_data.args.hipGraphEventWaitNodeSetEvent.event = (hipEvent_t)event; \
};
// hipGraphExecChildGraphNodeSetParams[('hipGraphExec_t', 'hGraphExec'), ('hipGraphNode_t', 'node'), ('hipGraph_t', 'childGraph')]
#define INIT_hipGraphExecChildGraphNodeSetParams_CB_ARGS_DATA(cb_data) { \
- cb_data.args.hipGraphExecChildGraphNodeSetParams.hGraphExec = (hipGraphExec_t)hGraphExec; \
- cb_data.args.hipGraphExecChildGraphNodeSetParams.node = (hipGraphNode_t)node; \
- cb_data.args.hipGraphExecChildGraphNodeSetParams.childGraph = (hipGraph_t)childGraph; \
};
// hipGraphExecDestroy[('hipGraphExec_t', 'graphExec')]
#define INIT_hipGraphExecDestroy_CB_ARGS_DATA(cb_data) { \
@@ -3301,21 +3225,12 @@
};
// hipGraphExecEventRecordNodeSetEvent[('hipGraphExec_t', 'hGraphExec'), ('hipGraphNode_t', 'hNode'), ('hipEvent_t', 'event')]
#define INIT_hipGraphExecEventRecordNodeSetEvent_CB_ARGS_DATA(cb_data) { \
- cb_data.args.hipGraphExecEventRecordNodeSetEvent.hGraphExec = (hipGraphExec_t)hGraphExec; \
- cb_data.args.hipGraphExecEventRecordNodeSetEvent.hNode = (hipGraphNode_t)hNode; \
- cb_data.args.hipGraphExecEventRecordNodeSetEvent.event = (hipEvent_t)event; \
};
// hipGraphExecEventWaitNodeSetEvent[('hipGraphExec_t', 'hGraphExec'), ('hipGraphNode_t', 'hNode'), ('hipEvent_t', 'event')]
#define INIT_hipGraphExecEventWaitNodeSetEvent_CB_ARGS_DATA(cb_data) { \
- cb_data.args.hipGraphExecEventWaitNodeSetEvent.hGraphExec = (hipGraphExec_t)hGraphExec; \
- cb_data.args.hipGraphExecEventWaitNodeSetEvent.hNode = (hipGraphNode_t)hNode; \
- cb_data.args.hipGraphExecEventWaitNodeSetEvent.event = (hipEvent_t)event; \
};
// hipGraphExecHostNodeSetParams[('hipGraphExec_t', 'hGraphExec'), ('hipGraphNode_t', 'node'), ('const hipHostNodeParams*', 'pNodeParams')]
#define INIT_hipGraphExecHostNodeSetParams_CB_ARGS_DATA(cb_data) { \
- cb_data.args.hipGraphExecHostNodeSetParams.hGraphExec = (hipGraphExec_t)hGraphExec; \
- cb_data.args.hipGraphExecHostNodeSetParams.node = (hipGraphNode_t)node; \
- cb_data.args.hipGraphExecHostNodeSetParams.pNodeParams = (const hipHostNodeParams*)pNodeParams; \
};
// hipGraphExecKernelNodeSetParams[('hipGraphExec_t', 'hGraphExec'), ('hipGraphNode_t', 'node'), ('const hipKernelNodeParams*', 'pNodeParams')]
#define INIT_hipGraphExecKernelNodeSetParams_CB_ARGS_DATA(cb_data) { \
@@ -3325,58 +3240,24 @@
};
// hipGraphExecMemcpyNodeSetParams[('hipGraphExec_t', 'hGraphExec'), ('hipGraphNode_t', 'node'), ('hipMemcpy3DParms*', 'pNodeParams')]
#define INIT_hipGraphExecMemcpyNodeSetParams_CB_ARGS_DATA(cb_data) { \
- cb_data.args.hipGraphExecMemcpyNodeSetParams.hGraphExec = (hipGraphExec_t)hGraphExec; \
- cb_data.args.hipGraphExecMemcpyNodeSetParams.node = (hipGraphNode_t)node; \
- cb_data.args.hipGraphExecMemcpyNodeSetParams.pNodeParams = (hipMemcpy3DParms*)pNodeParams; \
};
// hipGraphExecMemcpyNodeSetParams1D[('hipGraphExec_t', 'hGraphExec'), ('hipGraphNode_t', 'node'), ('void*', 'dst'), ('const void*', 'src'), ('size_t', 'count'), ('hipMemcpyKind', 'kind')]
#define INIT_hipGraphExecMemcpyNodeSetParams1D_CB_ARGS_DATA(cb_data) { \
- cb_data.args.hipGraphExecMemcpyNodeSetParams1D.hGraphExec = (hipGraphExec_t)hGraphExec; \
- cb_data.args.hipGraphExecMemcpyNodeSetParams1D.node = (hipGraphNode_t)node; \
- cb_data.args.hipGraphExecMemcpyNodeSetParams1D.dst = (void*)dst; \
- cb_data.args.hipGraphExecMemcpyNodeSetParams1D.src = (const void*)src; \
- cb_data.args.hipGraphExecMemcpyNodeSetParams1D.count = (size_t)count; \
- cb_data.args.hipGraphExecMemcpyNodeSetParams1D.kind = (hipMemcpyKind)kind; \
};
// hipGraphExecMemcpyNodeSetParamsFromSymbol[('hipGraphExec_t', 'hGraphExec'), ('hipGraphNode_t', 'node'), ('void*', 'dst'), ('const void*', 'symbol'), ('size_t', 'count'), ('size_t', 'offset'), ('hipMemcpyKind', 'kind')]
#define INIT_hipGraphExecMemcpyNodeSetParamsFromSymbol_CB_ARGS_DATA(cb_data) { \
- cb_data.args.hipGraphExecMemcpyNodeSetParamsFromSymbol.hGraphExec = (hipGraphExec_t)hGraphExec; \
- cb_data.args.hipGraphExecMemcpyNodeSetParamsFromSymbol.node = (hipGraphNode_t)node; \
- cb_data.args.hipGraphExecMemcpyNodeSetParamsFromSymbol.dst = (void*)dst; \
- cb_data.args.hipGraphExecMemcpyNodeSetParamsFromSymbol.symbol = (const void*)symbol; \
- cb_data.args.hipGraphExecMemcpyNodeSetParamsFromSymbol.count = (size_t)count; \
- cb_data.args.hipGraphExecMemcpyNodeSetParamsFromSymbol.offset = (size_t)offset; \
- cb_data.args.hipGraphExecMemcpyNodeSetParamsFromSymbol.kind = (hipMemcpyKind)kind; \
};
// hipGraphExecMemcpyNodeSetParamsToSymbol[('hipGraphExec_t', 'hGraphExec'), ('hipGraphNode_t', 'node'), ('const void*', 'symbol'), ('const void*', 'src'), ('size_t', 'count'), ('size_t', 'offset'), ('hipMemcpyKind', 'kind')]
#define INIT_hipGraphExecMemcpyNodeSetParamsToSymbol_CB_ARGS_DATA(cb_data) { \
- cb_data.args.hipGraphExecMemcpyNodeSetParamsToSymbol.hGraphExec = (hipGraphExec_t)hGraphExec; \
- cb_data.args.hipGraphExecMemcpyNodeSetParamsToSymbol.node = (hipGraphNode_t)node; \
- cb_data.args.hipGraphExecMemcpyNodeSetParamsToSymbol.symbol = (const void*)symbol; \
- cb_data.args.hipGraphExecMemcpyNodeSetParamsToSymbol.src = (const void*)src; \
- cb_data.args.hipGraphExecMemcpyNodeSetParamsToSymbol.count = (size_t)count; \
- cb_data.args.hipGraphExecMemcpyNodeSetParamsToSymbol.offset = (size_t)offset; \
- cb_data.args.hipGraphExecMemcpyNodeSetParamsToSymbol.kind = (hipMemcpyKind)kind; \
};
// hipGraphExecMemsetNodeSetParams[('hipGraphExec_t', 'hGraphExec'), ('hipGraphNode_t', 'node'), ('const hipMemsetParams*', 'pNodeParams')]
#define INIT_hipGraphExecMemsetNodeSetParams_CB_ARGS_DATA(cb_data) { \
- cb_data.args.hipGraphExecMemsetNodeSetParams.hGraphExec = (hipGraphExec_t)hGraphExec; \
- cb_data.args.hipGraphExecMemsetNodeSetParams.node = (hipGraphNode_t)node; \
- cb_data.args.hipGraphExecMemsetNodeSetParams.pNodeParams = (const hipMemsetParams*)pNodeParams; \
};
// hipGraphExecUpdate[('hipGraphExec_t', 'hGraphExec'), ('hipGraph_t', 'hGraph'), ('hipGraphNode_t*', 'hErrorNode_out'), ('hipGraphExecUpdateResult*', 'updateResult_out')]
#define INIT_hipGraphExecUpdate_CB_ARGS_DATA(cb_data) { \
- cb_data.args.hipGraphExecUpdate.hGraphExec = (hipGraphExec_t)hGraphExec; \
- cb_data.args.hipGraphExecUpdate.hGraph = (hipGraph_t)hGraph; \
- cb_data.args.hipGraphExecUpdate.hErrorNode_out = (hipGraphNode_t*)hErrorNode_out; \
- cb_data.args.hipGraphExecUpdate.updateResult_out = (hipGraphExecUpdateResult*)updateResult_out; \
};
// hipGraphGetEdges[('hipGraph_t', 'graph'), ('hipGraphNode_t*', 'from'), ('hipGraphNode_t*', 'to'), ('size_t*', 'numEdges')]
#define INIT_hipGraphGetEdges_CB_ARGS_DATA(cb_data) { \
- cb_data.args.hipGraphGetEdges.graph = (hipGraph_t)graph; \
- cb_data.args.hipGraphGetEdges.from = (hipGraphNode_t*)from; \
- cb_data.args.hipGraphGetEdges.to = (hipGraphNode_t*)to; \
- cb_data.args.hipGraphGetEdges.numEdges = (size_t*)numEdges; \
};
// hipGraphGetNodes[('hipGraph_t', 'graph'), ('hipGraphNode_t*', 'nodes'), ('size_t*', 'numNodes')]
#define INIT_hipGraphGetNodes_CB_ARGS_DATA(cb_data) { \
@@ -3392,13 +3273,9 @@
};
// hipGraphHostNodeGetParams[('hipGraphNode_t', 'node'), ('hipHostNodeParams*', 'pNodeParams')]
#define INIT_hipGraphHostNodeGetParams_CB_ARGS_DATA(cb_data) { \
- cb_data.args.hipGraphHostNodeGetParams.node = (hipGraphNode_t)node; \
- cb_data.args.hipGraphHostNodeGetParams.pNodeParams = (hipHostNodeParams*)pNodeParams; \
};
// hipGraphHostNodeSetParams[('hipGraphNode_t', 'node'), ('const hipHostNodeParams*', 'pNodeParams')]
#define INIT_hipGraphHostNodeSetParams_CB_ARGS_DATA(cb_data) { \
- cb_data.args.hipGraphHostNodeSetParams.node = (hipGraphNode_t)node; \
- cb_data.args.hipGraphHostNodeSetParams.pNodeParams = (const hipHostNodeParams*)pNodeParams; \
};
// hipGraphInstantiate[('hipGraphExec_t*', 'pGraphExec'), ('hipGraph_t', 'graph'), ('hipGraphNode_t*', 'pErrorNode'), ('char*', 'pLogBuffer'), ('size_t', 'bufferSize')]
#define INIT_hipGraphInstantiate_CB_ARGS_DATA(cb_data) { \
@@ -3410,9 +3287,6 @@
};
// hipGraphInstantiateWithFlags[('hipGraphExec_t*', 'pGraphExec'), ('hipGraph_t', 'graph'), ('unsigned long long', 'flags')]
#define INIT_hipGraphInstantiateWithFlags_CB_ARGS_DATA(cb_data) { \
- cb_data.args.hipGraphInstantiateWithFlags.pGraphExec = (hipGraphExec_t*)pGraphExec; \
- cb_data.args.hipGraphInstantiateWithFlags.graph = (hipGraph_t)graph; \
- cb_data.args.hipGraphInstantiateWithFlags.flags = (unsigned long long)flags; \
};
// hipGraphKernelNodeGetParams[('hipGraphNode_t', 'node'), ('hipKernelNodeParams*', 'pNodeParams')]
#define INIT_hipGraphKernelNodeGetParams_CB_ARGS_DATA(cb_data) { \
@@ -3441,29 +3315,12 @@
};
// hipGraphMemcpyNodeSetParams1D[('hipGraphNode_t', 'node'), ('void*', 'dst'), ('const void*', 'src'), ('size_t', 'count'), ('hipMemcpyKind', 'kind')]
#define INIT_hipGraphMemcpyNodeSetParams1D_CB_ARGS_DATA(cb_data) { \
- cb_data.args.hipGraphMemcpyNodeSetParams1D.node = (hipGraphNode_t)node; \
- cb_data.args.hipGraphMemcpyNodeSetParams1D.dst = (void*)dst; \
- cb_data.args.hipGraphMemcpyNodeSetParams1D.src = (const void*)src; \
- cb_data.args.hipGraphMemcpyNodeSetParams1D.count = (size_t)count; \
- cb_data.args.hipGraphMemcpyNodeSetParams1D.kind = (hipMemcpyKind)kind; \
};
// hipGraphMemcpyNodeSetParamsFromSymbol[('hipGraphNode_t', 'node'), ('void*', 'dst'), ('const void*', 'symbol'), ('size_t', 'count'), ('size_t', 'offset'), ('hipMemcpyKind', 'kind')]
#define INIT_hipGraphMemcpyNodeSetParamsFromSymbol_CB_ARGS_DATA(cb_data) { \
- cb_data.args.hipGraphMemcpyNodeSetParamsFromSymbol.node = (hipGraphNode_t)node; \
- cb_data.args.hipGraphMemcpyNodeSetParamsFromSymbol.dst = (void*)dst; \
- cb_data.args.hipGraphMemcpyNodeSetParamsFromSymbol.symbol = (const void*)symbol; \
- cb_data.args.hipGraphMemcpyNodeSetParamsFromSymbol.count = (size_t)count; \
- cb_data.args.hipGraphMemcpyNodeSetParamsFromSymbol.offset = (size_t)offset; \
- cb_data.args.hipGraphMemcpyNodeSetParamsFromSymbol.kind = (hipMemcpyKind)kind; \
};
// hipGraphMemcpyNodeSetParamsToSymbol[('hipGraphNode_t', 'node'), ('const void*', 'symbol'), ('const void*', 'src'), ('size_t', 'count'), ('size_t', 'offset'), ('hipMemcpyKind', 'kind')]
#define INIT_hipGraphMemcpyNodeSetParamsToSymbol_CB_ARGS_DATA(cb_data) { \
- cb_data.args.hipGraphMemcpyNodeSetParamsToSymbol.node = (hipGraphNode_t)node; \
- cb_data.args.hipGraphMemcpyNodeSetParamsToSymbol.symbol = (const void*)symbol; \
- cb_data.args.hipGraphMemcpyNodeSetParamsToSymbol.src = (const void*)src; \
- cb_data.args.hipGraphMemcpyNodeSetParamsToSymbol.count = (size_t)count; \
- cb_data.args.hipGraphMemcpyNodeSetParamsToSymbol.offset = (size_t)offset; \
- cb_data.args.hipGraphMemcpyNodeSetParamsToSymbol.kind = (hipMemcpyKind)kind; \
};
// hipGraphMemsetNodeGetParams[('hipGraphNode_t', 'node'), ('hipMemsetParams*', 'pNodeParams')]
#define INIT_hipGraphMemsetNodeGetParams_CB_ARGS_DATA(cb_data) { \
@@ -3477,33 +3334,18 @@
};
// hipGraphNodeFindInClone[('hipGraphNode_t*', 'pNode'), ('hipGraphNode_t', 'originalNode'), ('hipGraph_t', 'clonedGraph')]
#define INIT_hipGraphNodeFindInClone_CB_ARGS_DATA(cb_data) { \
- cb_data.args.hipGraphNodeFindInClone.pNode = (hipGraphNode_t*)pNode; \
- cb_data.args.hipGraphNodeFindInClone.originalNode = (hipGraphNode_t)originalNode; \
- cb_data.args.hipGraphNodeFindInClone.clonedGraph = (hipGraph_t)clonedGraph; \
};
// hipGraphNodeGetDependencies[('hipGraphNode_t', 'node'), ('hipGraphNode_t*', 'pDependencies'), ('size_t*', 'pNumDependencies')]
#define INIT_hipGraphNodeGetDependencies_CB_ARGS_DATA(cb_data) { \
- cb_data.args.hipGraphNodeGetDependencies.node = (hipGraphNode_t)node; \
- cb_data.args.hipGraphNodeGetDependencies.pDependencies = (hipGraphNode_t*)pDependencies; \
- cb_data.args.hipGraphNodeGetDependencies.pNumDependencies = (size_t*)pNumDependencies; \
};
// hipGraphNodeGetDependentNodes[('hipGraphNode_t', 'node'), ('hipGraphNode_t*', 'pDependentNodes'), ('size_t*', 'pNumDependentNodes')]
#define INIT_hipGraphNodeGetDependentNodes_CB_ARGS_DATA(cb_data) { \
- cb_data.args.hipGraphNodeGetDependentNodes.node = (hipGraphNode_t)node; \
- cb_data.args.hipGraphNodeGetDependentNodes.pDependentNodes = (hipGraphNode_t*)pDependentNodes; \
- cb_data.args.hipGraphNodeGetDependentNodes.pNumDependentNodes = (size_t*)pNumDependentNodes; \
};
// hipGraphNodeGetType[('hipGraphNode_t', 'node'), ('hipGraphNodeType*', 'pType')]
#define INIT_hipGraphNodeGetType_CB_ARGS_DATA(cb_data) { \
- cb_data.args.hipGraphNodeGetType.node = (hipGraphNode_t)node; \
- cb_data.args.hipGraphNodeGetType.pType = (hipGraphNodeType*)pType; \
};
// hipGraphRemoveDependencies[('hipGraph_t', 'graph'), ('const hipGraphNode_t*', 'from'), ('const hipGraphNode_t*', 'to'), ('size_t', 'numDependencies')]
#define INIT_hipGraphRemoveDependencies_CB_ARGS_DATA(cb_data) { \
- cb_data.args.hipGraphRemoveDependencies.graph = (hipGraph_t)graph; \
- cb_data.args.hipGraphRemoveDependencies.from = (const hipGraphNode_t*)from; \
- cb_data.args.hipGraphRemoveDependencies.to = (const hipGraphNode_t*)to; \
- cb_data.args.hipGraphRemoveDependencies.numDependencies = (size_t)numDependencies; \
};
// hipGraphicsGLRegisterBuffer[('hipGraphicsResource**', 'resource'), ('GLuint', 'buffer'), ('unsigned int', 'flags')]
#define INIT_hipGraphicsGLRegisterBuffer_CB_ARGS_DATA(cb_data) { \
@@ -4205,9 +4047,6 @@
// hipPeekAtLastError[]
#define INIT_hipPeekAtLastError_CB_ARGS_DATA(cb_data) { \
};
-// hipPointerGetAttribute[('void*', 'data'), ('hipPointer_attribute', 'attribute'), ('hipDeviceptr_t', 'ptr')]
-#define INIT_hipPointerGetAttribute_CB_ARGS_DATA(cb_data) { \
-};
// hipPointerGetAttributes[('hipPointerAttribute_t*', 'attributes'), ('const void*', 'ptr')]
#define INIT_hipPointerGetAttributes_CB_ARGS_DATA(cb_data) { \
cb_data.args.hipPointerGetAttributes.attributes = (hipPointerAttribute_t*)attributes; \
@@ -4289,18 +4128,9 @@
};
// hipStreamGetCaptureInfo[('hipStream_t', 'stream'), ('hipStreamCaptureStatus*', 'pCaptureStatus'), ('unsigned long long*', 'pId')]
#define INIT_hipStreamGetCaptureInfo_CB_ARGS_DATA(cb_data) { \
- cb_data.args.hipStreamGetCaptureInfo.stream = (hipStream_t)stream; \
- cb_data.args.hipStreamGetCaptureInfo.pCaptureStatus = (hipStreamCaptureStatus*)pCaptureStatus; \
- cb_data.args.hipStreamGetCaptureInfo.pId = (unsigned long long*)pId; \
};
// hipStreamGetCaptureInfo_v2[('hipStream_t', 'stream'), ('hipStreamCaptureStatus*', 'captureStatus_out'), ('unsigned long long*', 'id_out'), ('hipGraph_t*', 'graph_out'), ('const hipGraphNode_t**', 'dependencies_out'), ('size_t*', 'numDependencies_out')]
#define INIT_hipStreamGetCaptureInfo_v2_CB_ARGS_DATA(cb_data) { \
- cb_data.args.hipStreamGetCaptureInfo_v2.stream = (hipStream_t)stream; \
- cb_data.args.hipStreamGetCaptureInfo_v2.captureStatus_out = (hipStreamCaptureStatus*)captureStatus_out; \
- cb_data.args.hipStreamGetCaptureInfo_v2.id_out = (unsigned long long*)id_out; \
- cb_data.args.hipStreamGetCaptureInfo_v2.graph_out = (hipGraph_t*)graph_out; \
- cb_data.args.hipStreamGetCaptureInfo_v2.dependencies_out = (const hipGraphNode_t**)dependencies_out; \
- cb_data.args.hipStreamGetCaptureInfo_v2.numDependencies_out = (size_t*)numDependencies_out; \
};
// hipStreamGetFlags[('hipStream_t', 'stream'), ('unsigned int*', 'flags')]
#define INIT_hipStreamGetFlags_CB_ARGS_DATA(cb_data) { \
@@ -4314,8 +4144,6 @@
};
// hipStreamIsCapturing[('hipStream_t', 'stream'), ('hipStreamCaptureStatus*', 'pCaptureStatus')]
#define INIT_hipStreamIsCapturing_CB_ARGS_DATA(cb_data) { \
- cb_data.args.hipStreamIsCapturing.stream = (hipStream_t)stream; \
- cb_data.args.hipStreamIsCapturing.pCaptureStatus = (hipStreamCaptureStatus*)pCaptureStatus; \
};
// hipStreamQuery[('hipStream_t', 'stream')]
#define INIT_hipStreamQuery_CB_ARGS_DATA(cb_data) { \
@@ -4327,10 +4155,6 @@
};
// hipStreamUpdateCaptureDependencies[('hipStream_t', 'stream'), ('hipGraphNode_t*', 'dependencies'), ('size_t', 'numDependencies'), ('unsigned int', 'flags')]
#define INIT_hipStreamUpdateCaptureDependencies_CB_ARGS_DATA(cb_data) { \
- cb_data.args.hipStreamUpdateCaptureDependencies.stream = (hipStream_t)stream; \
- cb_data.args.hipStreamUpdateCaptureDependencies.dependencies = (hipGraphNode_t*)dependencies; \
- cb_data.args.hipStreamUpdateCaptureDependencies.numDependencies = (size_t)numDependencies; \
- cb_data.args.hipStreamUpdateCaptureDependencies.flags = (unsigned int)flags; \
};
// hipStreamWaitEvent[('hipStream_t', 'stream'), ('hipEvent_t', 'event'), ('unsigned int', 'flags')]
#define INIT_hipStreamWaitEvent_CB_ARGS_DATA(cb_data) { \
@@ -4761,11 +4585,6 @@
case HIP_API_ID_hipDrvMemcpy3DAsync:
if (data->args.hipDrvMemcpy3DAsync.pCopy) data->args.hipDrvMemcpy3DAsync.pCopy__val = *(data->args.hipDrvMemcpy3DAsync.pCopy);
break;
-// hipDrvPointerGetAttributes[('unsigned int', 'numAttributes'), ('hipPointer_attribute*', 'attributes'), ('void**', 'data'), ('hipDeviceptr_t', 'ptr')]
- case HIP_API_ID_hipDrvPointerGetAttributes:
- if (data->args.hipDrvPointerGetAttributes.attributes) data->args.hipDrvPointerGetAttributes.attributes__val = *(data->args.hipDrvPointerGetAttributes.attributes);
- if (data->args.hipDrvPointerGetAttributes.data) data->args.hipDrvPointerGetAttributes.data__val = *(data->args.hipDrvPointerGetAttributes.data);
- break;
// hipEventCreate[('hipEvent_t*', 'event')]
case HIP_API_ID_hipEventCreate:
if (data->args.hipEventCreate.event) data->args.hipEventCreate.event__val = *(data->args.hipEventCreate.event);
@@ -5517,9 +5336,6 @@
// hipPeekAtLastError[]
case HIP_API_ID_hipPeekAtLastError:
break;
-// hipPointerGetAttribute[('void*', 'data'), ('hipPointer_attribute', 'attribute'), ('hipDeviceptr_t', 'ptr')]
- case HIP_API_ID_hipPointerGetAttribute:
- break;
// hipPointerGetAttributes[('hipPointerAttribute_t*', 'attributes'), ('const void*', 'ptr')]
case HIP_API_ID_hipPointerGetAttributes:
if (data->args.hipPointerGetAttributes.attributes) data->args.hipPointerGetAttributes.attributes__val = *(data->args.hipPointerGetAttributes.attributes);
@@ -6067,16 +5883,6 @@
oss << ", stream=" << data->args.hipDrvMemcpy3DAsync.stream;
oss << ")";
break;
- case HIP_API_ID_hipDrvPointerGetAttributes:
- oss << "hipDrvPointerGetAttributes(";
- oss << "numAttributes=" << data->args.hipDrvPointerGetAttributes.numAttributes;
- if (data->args.hipDrvPointerGetAttributes.attributes == NULL) oss << ", attributes=NULL";
- else oss << ", attributes=" << data->args.hipDrvPointerGetAttributes.attributes__val;
- if (data->args.hipDrvPointerGetAttributes.data == NULL) oss << ", data=NULL";
- else oss << ", data=" << data->args.hipDrvPointerGetAttributes.data__val;
- oss << ", ptr=" << data->args.hipDrvPointerGetAttributes.ptr;
- oss << ")";
- break;
case HIP_API_ID_hipEventCreate:
oss << "hipEventCreate(";
if (data->args.hipEventCreate.event == NULL) oss << "event=NULL";
@@ -7698,13 +7504,6 @@
oss << "hipPeekAtLastError(";
oss << ")";
break;
- case HIP_API_ID_hipPointerGetAttribute:
- oss << "hipPointerGetAttribute(";
- oss << "data=" << data->args.hipPointerGetAttribute.data;
- oss << ", attribute=" << data->args.hipPointerGetAttribute.attribute;
- oss << ", ptr=" << data->args.hipPointerGetAttribute.ptr;
- oss << ")";
- break;
case HIP_API_ID_hipPointerGetAttributes:
oss << "hipPointerGetAttributes(";
if (data->args.hipPointerGetAttributes.attributes == NULL) oss << "attributes=NULL";
5.0.2 has the same problem. The gziped diff is:
hip_prof_str_diff.gz
Updates: in version 5.1.3, I encountered another issue as well as this one.
Running
python /ext4-disk/build/portage/dev-util/hip-5.1.3/work/hipamd-rocm-5.1.3/src/hip_prof_gen.py -v -t --priv /ext4-disk/build/portage/dev-util/hip-5.1.3/work/HIP-rocm-5.1.3/include/hip/hip_runtime_api.h /ext4-disk/build/portage/dev-util/hip-5.1.3/work/hipamd-rocm-5.1.3/src /ext4-disk/build/portage/dev-util/hip-5.1.3/work/hipamd-rocm-5.1.3/include/hip/amd_detail/hip_prof_str.h /ext4-disk/build/portage/dev-util/hip-5.1.3/work/hipamd-rocm-5.1.3_build/include/hip/amd_detail/hip_prof_str.h
I got fatal error:
init name mismatch: 'hipDestroySurfaceObject' <> 'ihipDestroySurfaceObject', file '/ext4-disk/build/portage/dev-util/hip-5.1.3/work/hipamd-rocm-5.1.3/src/hip_surface.cpp', line (83)
I backported 4168c6d which fix that. Then I got
bad args: args_str: 'hipGraphicsResource** resource,GLuint image,GLtarget,unsigned int flags' arg_pair: 'GLtarget', file '/ext4-disk/build/portage/dev-util/hip-5.1.3/work/hipamd-rocm-5.1.3/src/hip_gl.cpp', line (218)
So I backported part of fb5a640 :
diff --git a/src/hip_prof_gen.py b/src/hip_prof_gen.py
index bd32d5bf..a3071a75 100755
--- a/src/hip_prof_gen.py
+++ b/src/hip_prof_gen.py
@@ -81,7 +81,7 @@ def filtr_api_args(args_str):
args_str = re.sub(r'\s*,\s*', r',', args_str);
args_str = re.sub(r'\s+', r' ', args_str);
args_str = re.sub(r'\s*(\*+)\s*', r'\1 ', args_str);
- args_str = re.sub(r'(enum|struct) ', '', args_str);
+ args_str = re.sub(r'(\benum|struct) ', '', args_str);
return args_str
# Normalizing types
@@ -129,7 +129,9 @@ def pointer_ck(arg_type):
m = re.match(r'(.*)\*$', arg_type)
if m:
ptr_type = m.group(1)
- ptr_type = re.sub(r'const ', '', ptr_type)
+ n = re.match(r'(.*)\*\*$', arg_type)
+ if not n:
+ ptr_type = re.sub(r'const ', '', ptr_type)
if ptr_type == 'void': ptr_type = ''
return ptr_type
#############################################################
@@ -613,7 +615,7 @@ if (len(sys.argv) < 4):
" -p - HIP_INIT_API macro patching mode\n" +
"\n" +
" Example:\n" +
- " $ " + sys.argv[0] + " -v -p -t --priv ./include/hip/amd_detail/hip_runtime_api.h" +
+ " $ " + sys.argv[0] + " -v -p -t --priv ../hip/include/hip/hip_runtime_api.h" +
" ./src ./include/hip/amd_detail/hip_prof_str.h ./include/hip/amd_detail/hip_prof_str.h.new");
# API header file given as an argument
--
2.34.1
And then comes to the same error: "/ext4-disk/build/portage/dev-util/hip-5.1.3/work/hipamd-rocm-5.1.3/include/hip/amd_detail/hip_prof_str.h" needs to be re-generated and checked-in with the current changes
And the diff of hip_prof_str.h is: hip_prof_str_diff.gz