SWDEV-511055 - fix HIP PAL memory allocation workaround for APU (#40)

This commit is contained in:
Li, Todd tiantuo
2025-04-24 15:07:16 -07:00
zatwierdzone przez GitHub
rodzic 1113eff3f9
commit 95cdc83eaf
+1 -2
Wyświetl plik
@@ -118,8 +118,7 @@ bool Memory::create(Resource::MemoryType memType, Resource::CreateParams* params
if (amd::IS_HIP && dev().settings().apuSystem_) {
const Pal::GpuMemoryHeapProperties& invisibleHeap = dev().GetGpuHeapInvisible();
Pal::gpusize totalAlloc = dev().TotalAlloc();
if (invisibleHeap.logicalSize > 0 && memType == Local &&
(totalAlloc > invisibleHeap.logicalSize)) {
if (memType == Local && (totalAlloc > invisibleHeap.logicalSize)) {
memType = RemoteUSWC;
}
}