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 <shadi.dashmiz@amd.com>
Change-Id: I75d40e437b12ee58e72e423bb4818b484ce35b66
Αυτή η υποβολή περιλαμβάνεται σε:
sdashmiz
2023-02-07 11:23:43 -05:00
υποβλήθηκε από Shadi Dashmiz
γονέας 2e4ce59cf4
υποβολή 5c5b220561
@@ -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)) {