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.
131
131
If an issue arises during cache initialization, the execution will proceed with
132
132
the cache turned off.
133
133
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.
136
135
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".
138
138
* ` AMD_COMGR_CACHE_DIR ` : If assigned a non-empty value, that value is used as
139
139
the path for cache storage. If the variable is unset or set to an empty string ` "" ` ,
140
140
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() {
280
280
}
281
281
282
282
StringRef 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
285
284
static const char *Enable = std::getenv (" AMD_COMGR_CACHE" );
286
- bool CacheDisabled = !Enable || StringRef (Enable) == " 0" ;
285
+ bool CacheDisabled = StringRef (Enable) == " 0" ;
287
286
if (CacheDisabled)
288
287
return " " ;
289
288
Original file line number Diff line number Diff line change 3
3
// RUN: unset AMD_COMGR_CACHE
4
4
// RUN: AMD_COMGR_CACHE_DIR=%t.cache compile-minimal-test %S/compile-minimal-test.cl %t.bin
5
5
// 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
7
9
//
8
10
// RUN: export AMD_COMGR_CACHE=0
9
11
// 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