SWDEV-388943,SWDEV-388954 - Corrected validations for memcpy kind.
Change-Id: I8338111ac46e4eba279d53969d12df3a23552049
[ROCm/clr commit: 2576153acd]
This commit is contained in:
کامیت شده توسط
Jaydeepkumar Patel
والد
e257db8ba7
کامیت
2536d245f6
@@ -1456,11 +1456,12 @@ class hipGraphMemcpyNodeFromSymbol : public hipGraphMemcpyNode1D {
|
||||
|
||||
size_t dOffset = 0;
|
||||
amd::Memory* dstMemory = getMemoryObject(dst, dOffset);
|
||||
if (dstMemory == nullptr && kind != hipMemcpyHostToDevice) {
|
||||
if (dstMemory == nullptr && kind != hipMemcpyDeviceToHost && kind != hipMemcpyDefault) {
|
||||
return hipErrorInvalidMemcpyDirection;
|
||||
} else if (dstMemory != nullptr && kind != hipMemcpyDeviceToDevice) {
|
||||
} else if (dstMemory != nullptr && dstMemory->getMemFlags() == 0 &&
|
||||
kind != hipMemcpyDeviceToDevice && kind != hipMemcpyDefault) {
|
||||
return hipErrorInvalidMemcpyDirection;
|
||||
} else if (kind == hipMemcpyHostToHost || kind == hipMemcpyDeviceToHost) {
|
||||
} else if (kind == hipMemcpyHostToHost || kind == hipMemcpyHostToDevice) {
|
||||
return hipErrorInvalidMemcpyDirection;
|
||||
}
|
||||
|
||||
|
||||
مرجع در شماره جدید
Block a user