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
This commit is contained in:
Ioannis Assiouras
2023-08-31 15:55:58 +01:00
orang tua 7be3a5e33e
melakukan 315082e554
3 mengubah file dengan 6 tambahan dan 8 penghapusan
-6
Melihat 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;