From d93d05bcf1c7ea39e00c1d9c863aba2ae85b6f1c Mon Sep 17 00:00:00 2001 From: David Yat Sin Date: Thu, 27 Feb 2025 16:00:00 +0000 Subject: [PATCH] rocr: Temporarily disable alternate scratch memory Temporarily disable alternate scratch memory usage by default due to some stability issues. [ROCm/ROCR-Runtime commit: 9a950ab7884fa7ed74a728718be7110d0ab12d5e] --- projects/rocr-runtime/runtime/hsa-runtime/core/util/flag.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/projects/rocr-runtime/runtime/hsa-runtime/core/util/flag.h b/projects/rocr-runtime/runtime/hsa-runtime/core/util/flag.h index c75bffd0f5..95286b8a9d 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/core/util/flag.h +++ b/projects/rocr-runtime/runtime/hsa-runtime/core/util/flag.h @@ -154,7 +154,9 @@ class Flag { enable_scratch_async_reclaim_ = (var == "0") ? false : true; var = os::GetEnvVar("HSA_ENABLE_SCRATCH_ALT"); - enable_scratch_alt_ = (var == "0") || !enable_scratch_async_reclaim_ ? false : true; + //Temporary: Disable alternate scratch by default as it can cause occasional hangs + //enable_scratch_alt_ = (var == "0") || !enable_scratch_async_reclaim_ ? false : true; + enable_scratch_alt_ = (var == "1") && enable_scratch_async_reclaim_ ? true : false; tools_lib_names_ = os::GetEnvVar("HSA_TOOLS_LIB");