refactor: Remove globaly enabled cl_cache

Current behaviour will be detecd path existence

Related-To: NEO-4262

Signed-off-by: Diedrich, Kamil <kamil.diedrich@intel.com>
This commit is contained in:
Diedrich, Kamil
2023-04-27 08:42:36 +00:00
committed by Compute-Runtime-Automation
parent ef10c98497
commit 5149d74141
46 changed files with 204 additions and 165 deletions

View File

@@ -10,6 +10,7 @@
#include "shared/source/compiler_interface/default_cache_config.h"
#include "shared/source/helpers/constants.h"
#include "shared/source/os_interface/sys_calls_common.h"
#include "shared/source/utilities/debug_settings_reader.h"
#include "level_zero/core/source/compiler_interface/l0_reg_path.h"
@@ -25,8 +26,15 @@ CompilerCacheConfig getDefaultCompilerCacheConfig() {
std::unique_ptr<NEO::SettingsReader> settingsReader(NEO::SettingsReader::createOsReader(false, keyName));
ret.cacheDir = settingsReader->getSetting(settingsReader->appSpecificLocation(keyName), static_cast<std::string>(L0_CACHE_LOCATION));
ret.cacheSize = MemoryConstants::gigaByte;
ret.cacheFileExtension = ".l0_cache";
if (NEO::SysCalls::pathExists(ret.cacheDir)) {
ret.enabled = true;
ret.cacheSize = MemoryConstants::gigaByte;
ret.cacheFileExtension = ".l0_cache";
} else {
ret.enabled = false;
ret.cacheSize = 0u;
ret.cacheFileExtension = ".l0_cache";
}
return ret;
}

View File

@@ -278,7 +278,6 @@ ze_result_t ModuleTranslationUnit::buildFromSpirV(const char *input, uint32_t in
inputArgs.src = ArrayRef<const char>(input, inputSize);
inputArgs.apiOptions = ArrayRef<const char>(this->options.c_str(), this->options.length());
inputArgs.internalOptions = ArrayRef<const char>(internalOptions.c_str(), internalOptions.length());
inputArgs.allowCaching = true;
return this->compileGenBinary(inputArgs, false);
}