From 8d48e0e6beb382b5aeb65beed7ce93691354c549 Mon Sep 17 00:00:00 2001 From: Sourabh Betigeri Date: Tue, 5 Jul 2022 09:39:09 -0700 Subject: [PATCH] SWDEV-273026 - Fixes to retrieve valid device memory data when device context is changed and p2p is enabled Change-Id: Ie3f0b81f7fc6de8df65ccff35f9aefb8f6abdfbe --- hipamd/src/hip_graph.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hipamd/src/hip_graph.cpp b/hipamd/src/hip_graph.cpp index 1e03177518..a845ec0774 100644 --- a/hipamd/src/hip_graph.cpp +++ b/hipamd/src/hip_graph.cpp @@ -82,6 +82,11 @@ hipError_t ihipGraphAddKernelNode(hipGraphNode_t* pGraphNode, hipGraph_t graph, return hipErrorInvalidDeviceFunction; } + status = ihipValidateKernelParams(pNodeParams); + if (hipSuccess != status) { + return status; + } + // 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)) {