From 5c5b220561ba1bee2dee8b97816ef902dba1e10b Mon Sep 17 00:00:00 2001 From: sdashmiz Date: Tue, 7 Feb 2023 11:23:43 -0500 Subject: [PATCH] SWDEV-374378 - correct setparam for memcpy node - params should be valid when used for default flag since we support unified virtual address space Signed-off-by: sdashmiz Change-Id: I75d40e437b12ee58e72e423bb4818b484ce35b66 --- hipamd/src/hip_graph_internal.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hipamd/src/hip_graph_internal.cpp b/hipamd/src/hip_graph_internal.cpp index 48a7bc3091..68bcab0a39 100644 --- a/hipamd/src/hip_graph_internal.cpp +++ b/hipamd/src/hip_graph_internal.cpp @@ -77,14 +77,14 @@ hipError_t hipGraphMemcpyNode1D::ValidateParams(void* dst, const void* src, size if (origDstMemory->getContext().devices()[0] != dstMemory->getContext().devices()[0]) { return hipErrorInvalidValue; } - if (kind != hipMemcpyHostToDevice) { + if ((kind != hipMemcpyHostToDevice) && (kind != hipMemcpyDefault)) { return hipErrorInvalidValue; } } else if ((srcMemory != nullptr) && (dstMemory == nullptr)) { // device to host if (origSrcMemory->getContext().devices()[0] != srcMemory->getContext().devices()[0]) { return hipErrorInvalidValue; } - if (kind != hipMemcpyDeviceToHost) { + if ((kind != hipMemcpyDeviceToHost) && (kind != hipMemcpyDefault)) { return hipErrorInvalidValue; } } else if ((srcMemory != nullptr) && (dstMemory != nullptr)) {