SWDEV-301667 - Early return if src == dst for 1D copy
Change-Id: Icaa334c6579bb5e70e92347f8bc37edcf5adf796
This commit is contained in:
@@ -308,6 +308,7 @@ hipError_t ihipMemcpy_validate(void* dst, const void* src, size_t sizeBytes,
|
||||
if (dst == nullptr || src == nullptr) {
|
||||
return hipErrorInvalidValue;
|
||||
}
|
||||
|
||||
size_t sOffset = 0;
|
||||
amd::Memory* srcMemory = getMemoryObject(src, sOffset);
|
||||
size_t dOffset = 0;
|
||||
@@ -421,6 +422,9 @@ hipError_t ihipMemcpy(void* dst, const void* src, size_t sizeBytes, hipMemcpyKin
|
||||
if (status != hipSuccess) {
|
||||
return status;
|
||||
}
|
||||
if (src == dst && kind == hipMemcpyDefault) {
|
||||
return hipSuccess;
|
||||
}
|
||||
size_t sOffset = 0;
|
||||
amd::Memory* srcMemory = getMemoryObject(src, sOffset);
|
||||
size_t dOffset = 0;
|
||||
|
||||
Verwijs in nieuw issue
Block a user