SWDEV-416580 - Add condition when memory has direct access, only use host fill if image is small
Change-Id: I3509c4aa21f6413adad3b46273ec650f5c577ddd
[ROCm/clr commit: cb426df1bd]
이 커밋은 다음에 포함됨:
1 부모
17813d3e3c
커밋
4312ca9e32
2 파일이 변경됨
+12
-6
검색과 일치하는 파일 없음
@@ -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);
|
||||
|
||||
새 이슈에서 참조
사용자 차단