2020-02-05 08:30:17 +01:00
|
|
|
/*
|
2023-03-08 23:15:36 +01:00
|
|
|
* Copyright (C) 2020-2023 Intel Corporation
|
2020-02-05 08:30:17 +01:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
2020-02-23 22:44:01 +01:00
|
|
|
#include "shared/source/compiler_interface/default_cache_config.h"
|
2020-02-05 08:30:17 +01:00
|
|
|
|
2023-03-08 23:15:36 +01:00
|
|
|
#include "shared/source/helpers/constants.h"
|
2022-09-28 14:33:16 +00:00
|
|
|
#include "shared/source/utilities/debug_settings_reader.h"
|
|
|
|
|
|
|
|
|
|
#include "opencl/source/os_interface/ocl_reg_path.h"
|
|
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
#include "os_inc.h"
|
|
|
|
|
|
|
|
|
|
#include <string>
|
2020-02-05 08:30:17 +01:00
|
|
|
|
|
|
|
|
namespace NEO {
|
|
|
|
|
CompilerCacheConfig getDefaultCompilerCacheConfig() {
|
2022-09-28 14:33:16 +00:00
|
|
|
CompilerCacheConfig ret;
|
|
|
|
|
|
|
|
|
|
std::string keyName = oclRegPath;
|
|
|
|
|
keyName += "cl_cache_dir";
|
|
|
|
|
std::unique_ptr<SettingsReader> settingsReader(SettingsReader::createOsReader(false, keyName));
|
|
|
|
|
ret.cacheDir = settingsReader->getSetting(settingsReader->appSpecificLocation(keyName), static_cast<std::string>(CL_CACHE_LOCATION));
|
|
|
|
|
|
2023-03-08 23:15:36 +01:00
|
|
|
ret.cacheSize = MemoryConstants::gigaByte;
|
2022-09-28 14:33:16 +00:00
|
|
|
ret.cacheFileExtension = ".cl_cache";
|
|
|
|
|
|
|
|
|
|
return ret;
|
2020-02-05 08:30:17 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace NEO
|