2019-10-21 15:47:04 +02:00
|
|
|
/*
|
2020-02-05 08:30:17 +01:00
|
|
|
* Copyright (C) 2019-2020 Intel Corporation
|
2019-10-21 15:47:04 +02:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "default_cl_cache_config.h"
|
|
|
|
|
|
2020-02-23 22:44:01 +01:00
|
|
|
#include "shared/source/utilities/debug_settings_reader.h"
|
2020-02-22 22:50:57 +01:00
|
|
|
#include "opencl/source/os_interface/ocl_reg_path.h"
|
2019-10-21 15:47:04 +02:00
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
#include "os_inc.h"
|
|
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
|
|
namespace NEO {
|
|
|
|
|
|
|
|
|
|
CompilerCacheConfig getDefaultClCompilerCacheConfig() {
|
|
|
|
|
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));
|
|
|
|
|
|
|
|
|
|
ret.cacheFileExtension = ".cl_cache";
|
|
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
|
}
|
|
|
|
|
} // namespace NEO
|