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 @@ -120,10 +120,10 @@ and eviction policy can be manipulated through specific environment variables.
120
120
If an issue arises during cache initialization, the execution will proceed with
121
121
the cache turned off.
122
122
123
- By default, the cache is turned off, set the environment variable
124
- ` AMD_COMGR_CACHE=1 ` to enable it.
123
+ By default, the cache is enabled.
125
124
126
- * ` AMD_COMGR_CACHE ` : When unset or set to 0, the cache is turned off.
125
+ * ` AMD_COMGR_CACHE ` : When unset or set to a value different than "0", the cache is enabled.
126
+ Disabled when set to "0".
127
127
* ` AMD_COMGR_CACHE_DIR ` : If assigned a non-empty value, that value is used as
128
128
the path for cache storage. If the variable is unset or set to an empty string ` "" ` ,
129
129
it is directed to "$XDG_CACHE_HOME/comgr" (which defaults to
Original file line number Diff line number Diff line change @@ -81,10 +81,9 @@ StringRef getCachePolicy() {
81
81
}
82
82
83
83
StringRef getCacheDirectory () {
84
- // By default the cache is deactivated. We hope to remove this variable in the
85
- // future.
84
+ // By default the cache is enabled
86
85
static const char *Enable = std::getenv (" AMD_COMGR_CACHE" );
87
- bool CacheDisabled = !Enable || StringRef (Enable) == " 0" ;
86
+ bool CacheDisabled = StringRef (Enable) == " 0" ;
88
87
if (CacheDisabled)
89
88
return " " ;
90
89
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