SWDEV-416580 - Add condition when memory has direct access, only use host fill if image is small

Change-Id: I3509c4aa21f6413adad3b46273ec650f5c577ddd


[ROCm/clr commit: cb426df1bd]
이 커밋은 다음에 포함됨:
victzhan 작성하고 Victor Zhang가 2023-08-17 17:23:49 -04:00를 커밋함
1 부모 17813d3e3c
커밋 4312ca9e32
2 파일이 변경됨
+12 -6

검색과 일치하는 파일 없음

+6 -3
파일 보기
@@ -2352,9 +2352,12 @@ bool KernelBlitManager::fillImage(device::Memory& memory, const void* pattern,
amd::ScopedLock k(lockXferOps_);
bool result = false;
// Use host fill if memory has direct access
if (setup_.disableFillImage_ || memory.isHostMemDirectAccess()) {
constexpr size_t kFillImageThreshold = 256 * 256;
// Use host fill if memory has direct access and image is small
if (setup_.disableFillImage_ ||
(gpuMem(memory).isHostMemDirectAccess() &&
(size.c[0] * size.c[1] * size.c[2]) <= kFillImageThreshold)) {
// Stall GPU before CPU access
gpu().releaseGpuMemoryFence();
result = HostBlitManager::fillImage(memory, pattern, origin, size, entire);