SWDEV-306602 - [SANITIZER_AMDGPU] Force copyBuffer to use ROCr functions when ASAN is ON

Change-Id: I04a4cdd5ab8c5543f2a0f08c139c45ac7aebe64a
This commit is contained in:
Bing Ma
2021-10-06 15:29:55 -07:00
zatwierdzone przez Bing Ma
rodzic c9f73f8d31
commit 02f939a40d
+8 -1
Wyświetl plik
@@ -2056,8 +2056,15 @@ bool KernelBlitManager::copyBuffer(device::Memory& srcMemory, device::Memory& ds
amd::ScopedLock k(lockXferOps_);
bool result = false;
bool p2p = (&gpuMem(srcMemory).dev() != &gpuMem(dstMemory).dev());
bool asan = false;
#if defined(__clang__)
#if __has_feature(address_sanitizer)
asan = true;
#endif
#endif
if (setup_.disableHwlCopyBuffer_ ||
(!srcMemory.isHostMemDirectAccess() && !dstMemory.isHostMemDirectAccess() && !p2p)) {
(!srcMemory.isHostMemDirectAccess() && !dstMemory.isHostMemDirectAccess() &&
!(p2p || asan))) {
uint blitType = BlitCopyBuffer;
size_t dim = 1;
size_t globalWorkOffset[3] = {0, 0, 0};