SWDEV-317141 - add param check for Graph Api

for hipGraphExecMemsetNodeSetParams

Change-Id: I748c7f273da08ace185bdee2b82fc0cd8584bdca


[ROCm/clr commit: 724717752e]
Этот коммит содержится в:
Payam authored and Payam Ghafari committed 2022-02-02 12:38:48 -05:00
1 родитель 6bbcf08fc8
Коммит 2443f2f954
1 file changed
+5 -1
+5 -1
Просмотреть файл
@@ -1034,7 +1034,11 @@ hipError_t hipGraphMemsetNodeSetParams(hipGraphNode_t node, const hipMemsetParam
hipError_t hipGraphExecMemsetNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t node,
const hipMemsetParams* pNodeParams) {
HIP_INIT_API(hipGraphExecMemsetNodeSetParams, hGraphExec, node, pNodeParams);
if (hGraphExec == nullptr || node == nullptr || pNodeParams == nullptr) {
if (hGraphExec == nullptr || node == nullptr || pNodeParams == nullptr ||
pNodeParams->dst == nullptr) {
HIP_RETURN(hipErrorInvalidValue);
}
if (ihipGraphMemsetParams_validate(pNodeParams) != hipSuccess) {
HIP_RETURN(hipErrorInvalidValue);
}
hipGraphNode_t clonedNode = hGraphExec->GetClonedNode(node);