rocrtst: Limit pool sizes to 2GB on emulator

Individual simple tests such as CPUAccessToGPUMemoryTest are taking
several hours on emulators as the total amount of VRAM keeps increasing.
Limit the pool sizes to 2GB, only on emulator.

Change-Id: I4b33e8549f89413da255731e6748f606ca64a663
Этот коммит содержится в:
David Yat Sin
2024-09-10 13:57:03 +00:00
родитель 5506b9af7a
Коммит 588a5a2fd3
+6
Просмотреть файл
@@ -400,6 +400,12 @@ hsa_status_t AcquirePoolInfo(hsa_amd_memory_pool_t pool,
&pool_i->size);
RET_IF_HSA_COMMON_ERR(err);
#ifdef ROCRTST_EMULATOR_BUILD
// Limit pool sizes to 2 GB on emulator
const size_t max_pool_size = 2*1024*1024*1024UL;
pool_i->size = std::min(pool_i->size, max_pool_size);
#endif
err = hsa_amd_memory_pool_get_info(pool,
HSA_AMD_MEMORY_POOL_INFO_RUNTIME_ALLOC_ALLOWED,
&pool_i->alloc_allowed);