Revert "feature: enable cl_cache by default on Windows"
This reverts commit e16220dc9f
.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
parent
b3464a2621
commit
65337482ff
|
@ -119,7 +119,7 @@ reuse previously cached kernel binaries instead of compiling kernels from source
|
||||||
##### Environment flags
|
##### Environment flags
|
||||||
|
|
||||||
NEO_CACHE_PERSISTENT - integer value to enable (1)/disable (0) on-disk binary cache. When enabled
|
NEO_CACHE_PERSISTENT - integer value to enable (1)/disable (0) on-disk binary cache. When enabled
|
||||||
Neo will try to cache and reuse compiled binaries. Default is on.
|
Neo will try to cache and reuse compiled binaries. Default is off.
|
||||||
|
|
||||||
NEO_CACHE_DIR - path to persistent cache directory. Default values are %LocalAppData%\NEO\neo_compiler_cache
|
NEO_CACHE_DIR - path to persistent cache directory. Default values are %LocalAppData%\NEO\neo_compiler_cache
|
||||||
if %LocalAppData% is found. If none of environment
|
if %LocalAppData% is found. If none of environment
|
||||||
|
|
|
@ -267,23 +267,4 @@ TEST_F(CompilerCacheTest, GivenCacheMaxSizeSetTo0WhenGetDefaultConfigThenCacheSi
|
||||||
EXPECT_EQ(cacheConfig.cacheDir, "ult\\directory\\");
|
EXPECT_EQ(cacheConfig.cacheDir, "ult\\directory\\");
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(CompilerCacheTest, GivenCachePathExistsAndNoEnvVarsSetWhenGetDefaultCompilerCacheConfigThenCacheIsEnabled) {
|
|
||||||
bool pathExistsMock = true;
|
|
||||||
VariableBackup<bool> pathExistsMockBackup(&NEO::SysCalls::pathExistsMock, pathExistsMock);
|
|
||||||
|
|
||||||
SysCalls::shGetKnownFolderPathResult = S_OK;
|
|
||||||
|
|
||||||
const wchar_t *localAppDataPath = L"C:\\Users\\user1\\AppData\\Local";
|
|
||||||
wcscpy(SysCalls::shGetKnownFolderSetPath, localAppDataPath);
|
|
||||||
|
|
||||||
auto cacheConfig = NEO::getDefaultCompilerCacheConfig();
|
|
||||||
|
|
||||||
const std::string expectedCacheDirPath = "C:\\Users\\user1\\AppData\\Local\\NEO\\neo_compiler_cache";
|
|
||||||
|
|
||||||
EXPECT_TRUE(cacheConfig.enabled);
|
|
||||||
EXPECT_EQ(cacheConfig.cacheFileExtension, ".cl_cache");
|
|
||||||
EXPECT_EQ(cacheConfig.cacheSize, static_cast<size_t>(MemoryConstants::gigaByte));
|
|
||||||
EXPECT_EQ(cacheConfig.cacheDir, expectedCacheDirPath);
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace NEO
|
} // namespace NEO
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
namespace NEO {
|
namespace NEO {
|
||||||
int64_t defaultCacheEnabled() {
|
int64_t defaultCacheEnabled() {
|
||||||
return 1l;
|
return 0l;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string getKnownFolderPath(REFKNOWNFOLDERID rfid) {
|
std::string getKnownFolderPath(REFKNOWNFOLDERID rfid) {
|
||||||
|
|
|
@ -807,10 +807,6 @@ TEST_F(CompilerCacheWindowsTest, givenCacheBinaryWhenRenameTempFileBinaryToPrope
|
||||||
EXPECT_EQ(0u, SysCalls::writeFileCalled);
|
EXPECT_EQ(0u, SysCalls::writeFileCalled);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(CompilerCacheHelperWindowsTest, whenDefaultCacheEnabledIsCalledThenReturnCorrectValue) {
|
|
||||||
EXPECT_EQ(1l, NEO::defaultCacheEnabled());
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST(CompilerCacheHelperWindowsTest, givenFindFirstFileASuccessWhenGetFileModificationTimeThenFindCloseIsCalled) {
|
TEST(CompilerCacheHelperWindowsTest, givenFindFirstFileASuccessWhenGetFileModificationTimeThenFindCloseIsCalled) {
|
||||||
VariableBackup<HANDLE> findFirstFileAResultBackup(&SysCalls::findFirstFileAResult, reinterpret_cast<HANDLE>(0x1234));
|
VariableBackup<HANDLE> findFirstFileAResultBackup(&SysCalls::findFirstFileAResult, reinterpret_cast<HANDLE>(0x1234));
|
||||||
VariableBackup<size_t> findCloseCalledBackup(&SysCalls::findCloseCalled, 0u);
|
VariableBackup<size_t> findCloseCalledBackup(&SysCalls::findCloseCalled, 0u);
|
||||||
|
|
Loading…
Reference in New Issue