Skip to content

Commit 7b999b9

Browse files
authored
SWDEV-508965 - [6.4 Preview] Remove HIP_MEMSET_NODE_PARAMS struct (#121)
1 parent 403c3b0 commit 7b999b9

File tree

6 files changed

+18
-37
lines changed

6 files changed

+18
-37
lines changed

hipamd/include/hip/amd_detail/hip_api_trace.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,7 @@ typedef hipError_t (*t_hipHccModuleLaunchKernel)(hipFunction_t f, uint32_t globa
929929
typedef int (*t_hipGetStreamDeviceId)(hipStream_t stream);
930930
typedef hipError_t (*t_hipDrvGraphAddMemsetNode)(hipGraphNode_t* phGraphNode, hipGraph_t hGraph,
931931
const hipGraphNode_t* dependencies, size_t numDependencies,
932-
const HIP_MEMSET_NODE_PARAMS* memsetParams, hipCtx_t ctx);
932+
const hipMemsetParams* memsetParams, hipCtx_t ctx);
933933
typedef hipError_t (*t_hipGraphAddExternalSemaphoresWaitNode)(hipGraphNode_t* pGraphNode,
934934
hipGraph_t graph, const hipGraphNode_t* pDependencies,
935935
size_t numDependencies,
@@ -982,7 +982,7 @@ typedef hipError_t (*t_hipDrvGraphExecMemcpyNodeSetParams)(hipGraphExec_t hGraph
982982
hipCtx_t ctx);
983983

984984
typedef hipError_t (*t_hipDrvGraphExecMemsetNodeSetParams)(hipGraphExec_t hGraphExec,
985-
hipGraphNode_t hNode, const HIP_MEMSET_NODE_PARAMS* memsetParams,
985+
hipGraphNode_t hNode, const hipMemsetParams* memsetParams,
986986
hipCtx_t ctx);
987987
typedef hipError_t (*t_hipSetValidDevices)(int* device_arr, int len);
988988
typedef hipError_t (*t_hipMemcpyAtoD)(hipDeviceptr_t dstDevice, hipArray_t srcArray,

hipamd/include/hip/amd_detail/hip_prof_str.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1616,8 +1616,8 @@ typedef struct hip_api_data_s {
16161616
const hipGraphNode_t* dependencies;
16171617
hipGraphNode_t dependencies__val;
16181618
size_t numDependencies;
1619-
const HIP_MEMSET_NODE_PARAMS* memsetParams;
1620-
HIP_MEMSET_NODE_PARAMS memsetParams__val;
1619+
const hipMemsetParams* memsetParams;
1620+
hipMemsetParams memsetParams__val;
16211621
hipCtx_t ctx;
16221622
} hipDrvGraphAddMemsetNode;
16231623
struct {
@@ -1630,8 +1630,8 @@ typedef struct hip_api_data_s {
16301630
struct {
16311631
hipGraphExec_t hGraphExec;
16321632
hipGraphNode_t hNode;
1633-
const HIP_MEMSET_NODE_PARAMS* memsetParams;
1634-
HIP_MEMSET_NODE_PARAMS memsetParams__val;
1633+
const hipMemsetParams* memsetParams;
1634+
hipMemsetParams memsetParams__val;
16351635
hipCtx_t ctx;
16361636
} hipDrvGraphExecMemsetNodeSetParams;
16371637
struct {
@@ -4059,13 +4059,13 @@ typedef struct hip_api_data_s {
40594059
cb_data.args.hipDrvGraphAddMemcpyNode.copyParams = (const HIP_MEMCPY3D*)copyParams; \
40604060
cb_data.args.hipDrvGraphAddMemcpyNode.ctx = (hipCtx_t)ctx; \
40614061
};
4062-
// hipDrvGraphAddMemsetNode[('hipGraphNode_t*', 'phGraphNode'), ('hipGraph_t', 'hGraph'), ('const hipGraphNode_t*', 'dependencies'), ('size_t', 'numDependencies'), ('const HIP_MEMSET_NODE_PARAMS*', 'memsetParams'), ('hipCtx_t', 'ctx')]
4062+
// hipDrvGraphAddMemsetNode[('hipGraphNode_t*', 'phGraphNode'), ('hipGraph_t', 'hGraph'), ('const hipGraphNode_t*', 'dependencies'), ('size_t', 'numDependencies'), ('const hipMemsetParams*', 'memsetParams'), ('hipCtx_t', 'ctx')]
40634063
#define INIT_hipDrvGraphAddMemsetNode_CB_ARGS_DATA(cb_data) { \
40644064
cb_data.args.hipDrvGraphAddMemsetNode.phGraphNode = (hipGraphNode_t*)phGraphNode; \
40654065
cb_data.args.hipDrvGraphAddMemsetNode.hGraph = (hipGraph_t)hGraph; \
40664066
cb_data.args.hipDrvGraphAddMemsetNode.dependencies = (const hipGraphNode_t*)dependencies; \
40674067
cb_data.args.hipDrvGraphAddMemsetNode.numDependencies = (size_t)numDependencies; \
4068-
cb_data.args.hipDrvGraphAddMemsetNode.memsetParams = (const HIP_MEMSET_NODE_PARAMS*)memsetParams; \
4068+
cb_data.args.hipDrvGraphAddMemsetNode.memsetParams = (const hipMemsetParams*)memsetParams; \
40694069
cb_data.args.hipDrvGraphAddMemsetNode.ctx = (hipCtx_t)ctx; \
40704070
};
40714071
// hipDrvGraphExecMemcpyNodeSetParams[('hipGraphExec_t', 'hGraphExec'), ('hipGraphNode_t', 'hNode'), ('const HIP_MEMCPY3D*', 'copyParams'), ('hipCtx_t', 'ctx')]
@@ -4075,11 +4075,11 @@ typedef struct hip_api_data_s {
40754075
cb_data.args.hipDrvGraphExecMemcpyNodeSetParams.copyParams = (const HIP_MEMCPY3D*)copyParams; \
40764076
cb_data.args.hipDrvGraphExecMemcpyNodeSetParams.ctx = (hipCtx_t)ctx; \
40774077
};
4078-
// hipDrvGraphExecMemsetNodeSetParams[('hipGraphExec_t', 'hGraphExec'), ('hipGraphNode_t', 'hNode'), ('const HIP_MEMSET_NODE_PARAMS*', 'memsetParams'), ('hipCtx_t', 'ctx')]
4078+
// hipDrvGraphExecMemsetNodeSetParams[('hipGraphExec_t', 'hGraphExec'), ('hipGraphNode_t', 'hNode'), ('const hipMemsetParams*', 'memsetParams'), ('hipCtx_t', 'ctx')]
40794079
#define INIT_hipDrvGraphExecMemsetNodeSetParams_CB_ARGS_DATA(cb_data) { \
40804080
cb_data.args.hipDrvGraphExecMemsetNodeSetParams.hGraphExec = (hipGraphExec_t)hGraphExec; \
40814081
cb_data.args.hipDrvGraphExecMemsetNodeSetParams.hNode = (hipGraphNode_t)hNode; \
4082-
cb_data.args.hipDrvGraphExecMemsetNodeSetParams.memsetParams = (const HIP_MEMSET_NODE_PARAMS*)memsetParams; \
4082+
cb_data.args.hipDrvGraphExecMemsetNodeSetParams.memsetParams = (const hipMemsetParams*)memsetParams; \
40834083
cb_data.args.hipDrvGraphExecMemsetNodeSetParams.ctx = (hipCtx_t)ctx; \
40844084
};
40854085
// hipDrvGraphMemcpyNodeGetParams[('hipGraphNode_t', 'hNode'), ('HIP_MEMCPY3D*', 'nodeParams')]
@@ -6510,7 +6510,7 @@ static inline void hipApiArgsInit(hip_api_id_t id, hip_api_data_t* data) {
65106510
if (data->args.hipDrvGraphAddMemcpyNode.dependencies) data->args.hipDrvGraphAddMemcpyNode.dependencies__val = *(data->args.hipDrvGraphAddMemcpyNode.dependencies);
65116511
if (data->args.hipDrvGraphAddMemcpyNode.copyParams) data->args.hipDrvGraphAddMemcpyNode.copyParams__val = *(data->args.hipDrvGraphAddMemcpyNode.copyParams);
65126512
break;
6513-
// hipDrvGraphAddMemsetNode[('hipGraphNode_t*', 'phGraphNode'), ('hipGraph_t', 'hGraph'), ('const hipGraphNode_t*', 'dependencies'), ('size_t', 'numDependencies'), ('const HIP_MEMSET_NODE_PARAMS*', 'memsetParams'), ('hipCtx_t', 'ctx')]
6513+
// hipDrvGraphAddMemsetNode[('hipGraphNode_t*', 'phGraphNode'), ('hipGraph_t', 'hGraph'), ('const hipGraphNode_t*', 'dependencies'), ('size_t', 'numDependencies'), ('const hipMemsetParams*', 'memsetParams'), ('hipCtx_t', 'ctx')]
65146514
case HIP_API_ID_hipDrvGraphAddMemsetNode:
65156515
if (data->args.hipDrvGraphAddMemsetNode.phGraphNode) data->args.hipDrvGraphAddMemsetNode.phGraphNode__val = *(data->args.hipDrvGraphAddMemsetNode.phGraphNode);
65166516
if (data->args.hipDrvGraphAddMemsetNode.dependencies) data->args.hipDrvGraphAddMemsetNode.dependencies__val = *(data->args.hipDrvGraphAddMemsetNode.dependencies);
@@ -6520,7 +6520,7 @@ static inline void hipApiArgsInit(hip_api_id_t id, hip_api_data_t* data) {
65206520
case HIP_API_ID_hipDrvGraphExecMemcpyNodeSetParams:
65216521
if (data->args.hipDrvGraphExecMemcpyNodeSetParams.copyParams) data->args.hipDrvGraphExecMemcpyNodeSetParams.copyParams__val = *(data->args.hipDrvGraphExecMemcpyNodeSetParams.copyParams);
65226522
break;
6523-
// hipDrvGraphExecMemsetNodeSetParams[('hipGraphExec_t', 'hGraphExec'), ('hipGraphNode_t', 'hNode'), ('const HIP_MEMSET_NODE_PARAMS*', 'memsetParams'), ('hipCtx_t', 'ctx')]
6523+
// hipDrvGraphExecMemsetNodeSetParams[('hipGraphExec_t', 'hGraphExec'), ('hipGraphNode_t', 'hNode'), ('const hipMemsetParams*', 'memsetParams'), ('hipCtx_t', 'ctx')]
65246524
case HIP_API_ID_hipDrvGraphExecMemsetNodeSetParams:
65256525
if (data->args.hipDrvGraphExecMemsetNodeSetParams.memsetParams) data->args.hipDrvGraphExecMemsetNodeSetParams.memsetParams__val = *(data->args.hipDrvGraphExecMemsetNodeSetParams.memsetParams);
65266526
break;

hipamd/src/hip_api_trace.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ hipError_t hipImportExternalSemaphore(hipExternalSemaphore_t* extSem_out,
359359
const hipExternalSemaphoreHandleDesc* semHandleDesc);
360360
hipError_t hipDrvGraphAddMemsetNode(hipGraphNode_t* phGraphNode, hipGraph_t hGraph,
361361
const hipGraphNode_t* dependencies, size_t numDependencies,
362-
const HIP_MEMSET_NODE_PARAMS* memsetParams, hipCtx_t ctx);
362+
const hipMemsetParams* memsetParams, hipCtx_t ctx);
363363
hipError_t hipInit(unsigned int flags);
364364
hipError_t hipIpcCloseMemHandle(void* devPtr);
365365
hipError_t hipIpcGetEventHandle(hipIpcEventHandle_t* handle, hipEvent_t event);
@@ -789,7 +789,7 @@ hipError_t hipDrvGraphAddMemFreeNode(hipGraphNode_t* phGraphNode, hipGraph_t hGr
789789
hipError_t hipDrvGraphExecMemcpyNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t hNode,
790790
const HIP_MEMCPY3D* copyParams, hipCtx_t ctx);
791791
hipError_t hipDrvGraphExecMemsetNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t hNode,
792-
const HIP_MEMSET_NODE_PARAMS* memsetParams, hipCtx_t ctx);
792+
const hipMemsetParams* memsetParams, hipCtx_t ctx);
793793
hipError_t hipSetValidDevices(int* device_arr, int len);
794794
hipError_t hipMemcpyAtoD(hipDeviceptr_t dstDevice, hipArray_t srcArray, size_t srcOffset,
795795
size_t ByteCount);

hipamd/src/hip_graph.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1307,7 +1307,7 @@ hipError_t hipGraphAddMemsetNode(hipGraphNode_t* pGraphNode, hipGraph_t graph,
13071307

13081308
hipError_t hipDrvGraphAddMemsetNode(hipGraphNode_t* phGraphNode, hipGraph_t hGraph,
13091309
const hipGraphNode_t* dependencies, size_t numDependencies,
1310-
const HIP_MEMSET_NODE_PARAMS* memsetParams, hipCtx_t ctx) {
1310+
const hipMemsetParams* memsetParams, hipCtx_t ctx) {
13111311
HIP_INIT_API(hipDrvGraphAddMemsetNode, phGraphNode, hGraph, dependencies, numDependencies,
13121312
memsetParams, ctx);
13131313
if (phGraphNode == nullptr || hGraph == nullptr ||
@@ -3282,7 +3282,7 @@ hipError_t hipDrvGraphExecMemcpyNodeSetParams(hipGraphExec_t hGraphExec, hipGrap
32823282
}
32833283

32843284
hipError_t hipDrvGraphExecMemsetNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t hNode,
3285-
const HIP_MEMSET_NODE_PARAMS* memsetParams, hipCtx_t ctx) {
3285+
const hipMemsetParams* memsetParams, hipCtx_t ctx) {
32863286
HIP_INIT_API(hipDrvGraphExecMemsetNodeSetParams, hGraphExec, hNode, memsetParams);
32873287
hip::GraphNode* n = reinterpret_cast<hip::GraphNode*>(hNode);
32883288

hipamd/src/hip_graph_internal.hpp

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1995,15 +1995,6 @@ class GraphMemsetNode : public GraphNode {
19951995
std::memcpy(params, &memsetParams_, sizeof(hipMemsetParams));
19961996
}
19971997

1998-
void GetParams(HIP_MEMSET_NODE_PARAMS* params) {
1999-
params->dst = memsetParams_.dst;
2000-
params->elementSize = memsetParams_.elementSize;
2001-
params->height = memsetParams_.height;
2002-
params->pitch = memsetParams_.pitch;
2003-
params->value = memsetParams_.value;
2004-
params->width = memsetParams_.width;
2005-
}
2006-
20071998
hipError_t SetParamsInternal(const hipMemsetParams* params, bool isExec, size_t depth = 1) {
20081999
hipError_t hip_error = hipSuccess;
20092000
hip_error = ihipGraphMemsetParams_validate(params);
@@ -2076,16 +2067,6 @@ class GraphMemsetNode : public GraphNode {
20762067
return SetParamsInternal(params, isExec, depth);
20772068
}
20782069

2079-
hipError_t SetParams(const HIP_MEMSET_NODE_PARAMS* params, bool isExec = false, size_t depth = 1) {
2080-
hipMemsetParams pmemsetParams;
2081-
pmemsetParams.dst = params->dst;
2082-
pmemsetParams.elementSize = params->elementSize;
2083-
pmemsetParams.height = params->height;
2084-
pmemsetParams.pitch = params->pitch;
2085-
pmemsetParams.value = params->value;
2086-
pmemsetParams.width = params->width;
2087-
return SetParamsInternal(&pmemsetParams, isExec, depth);
2088-
}
20892070
hipError_t SetParams(GraphNode* node) override {
20902071
const GraphMemsetNode* memsetNode = static_cast<GraphMemsetNode const*>(node);
20912072
return SetParams(&memsetNode->memsetParams_, false, memsetNode->depth_);

hipamd/src/hip_table_interface.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@ hipError_t hipImportExternalSemaphore(hipExternalSemaphore_t* extSem_out,
831831
}
832832
hipError_t hipDrvGraphAddMemsetNode(hipGraphNode_t* phGraphNode, hipGraph_t hGraph,
833833
const hipGraphNode_t* dependencies, size_t numDependencies,
834-
const HIP_MEMSET_NODE_PARAMS* memsetParams, hipCtx_t ctx) {
834+
const hipMemsetParams* memsetParams, hipCtx_t ctx) {
835835
return hip::GetHipDispatchTable()->hipDrvGraphAddMemsetNode_fn(phGraphNode, hGraph,
836836
dependencies, numDependencies, memsetParams, ctx);
837837
}
@@ -1785,7 +1785,7 @@ hipError_t hipGetFuncBySymbol(hipFunction_t* functionPtr, const void* symbolPtr)
17851785
return hip::GetHipDispatchTable()->hipGetFuncBySymbol_fn(functionPtr, symbolPtr);
17861786
}
17871787
hipError_t hipDrvGraphExecMemsetNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t hNode,
1788-
const HIP_MEMSET_NODE_PARAMS* memsetParams, hipCtx_t ctx) {
1788+
const hipMemsetParams* memsetParams, hipCtx_t ctx) {
17891789
return hip::GetHipDispatchTable()->hipDrvGraphExecMemsetNodeSetParams_fn(hGraphExec, hNode,
17901790
memsetParams, ctx);
17911791
}

0 commit comments

Comments
 (0)