File tree Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -131,10 +131,10 @@ and eviction policy can be manipulated through specific environment variables.
131131If an issue arises during cache initialization, the execution will proceed with
132132the cache turned off.
133133
134- By default, the cache is turned off, set the environment variable
135- ` AMD_COMGR_CACHE=1 ` to enable it.
134+ By default, the cache is enabled.
136135
137- * ` AMD_COMGR_CACHE ` : When unset or set to 0, the cache is turned off.
136+ * ` AMD_COMGR_CACHE ` : When unset or set to a value different than "0", the cache is enabled.
137+ Disabled when set to "0".
138138* ` AMD_COMGR_CACHE_DIR ` : If assigned a non-empty value, that value is used as
139139 the path for cache storage. If the variable is unset or set to an empty string ` "" ` ,
140140 it is directed to "$XDG_CACHE_HOME/comgr" (which defaults to
Original file line number Diff line number Diff line change @@ -280,10 +280,9 @@ StringRef getCachePolicy() {
280280}
281281
282282StringRef getCacheDirectory () {
283- // By default the cache is deactivated. We hope to remove this variable in the
284- // future.
283+ // By default the cache is enabled
285284 static const char *Enable = std::getenv (" AMD_COMGR_CACHE" );
286- bool CacheDisabled = !Enable || StringRef (Enable) == " 0" ;
285+ bool CacheDisabled = StringRef (Enable) == " 0" ;
287286 if (CacheDisabled)
288287 return " " ;
289288
Original file line number Diff line number Diff line change 33// RUN: unset AMD_COMGR_CACHE
44// RUN: AMD_COMGR_CACHE_DIR=%t.cache compile-minimal-test %S/compile-minimal-test.cl %t.bin
55// RUN: llvm-objdump -d %t.bin | FileCheck %S/compile-minimal-test.cl
6- // RUN: [ ! -d %t.cache ]
6+ // RUN: [ -d %t.cache ]
7+ //
8+ // RUN: rm -fr %t.cache
79//
810// RUN: export AMD_COMGR_CACHE=0
911// RUN: AMD_COMGR_CACHE_DIR=%t.cache compile-minimal-test %S/compile-minimal-test.cl %t.bin
You can’t perform that action at this time.
0 commit comments