SWDEV-419996 - Allow both kernelParams and extra arguments to be set to null

When kernel function expects no parameters no error should be returned
if both kernelParams and extra arguments are set to null.

Change-Id: I5941bcc400b6fb380e623bdae0233ae3e4f73815


[ROCm/clr commit: 315082e554]
This commit is contained in:
Ioannis Assiouras committed 2023-09-07 12:57:46 -04:00
1 parent 5d9912f48b
commit a0ee7e2784
3 files changed
+6 -8

No files matched your search

-6
View File
@@ -76,12 +76,6 @@ hipError_t ihipGraphAddKernelNode(hip::GraphNode** pGraphNode, hip::Graph* graph
return hipErrorInvalidValue;
}
// If neither 'kernelParams' or 'extra' are provided or if both are provided, return error
if ((pNodeParams->kernelParams == nullptr && pNodeParams->extra == nullptr) ||
(pNodeParams->kernelParams != nullptr && pNodeParams->extra != nullptr)) {
return hipErrorInvalidValue;
}
hipError_t status = hip::GraphKernelNode::validateKernelParams(pNodeParams);
if (hipSuccess != status) {
return status;