Files
compute-runtime/opencl/source/helpers/api_specific_config_ocl.cpp
Weronika Kapusta d6c16c1640 fix: remove compiler cache legacy implementation
Related-To: NEO-10679

Signed-off-by: Weronika Kapusta <weronika.kapusta@intel.com>
2024-05-06 18:28:35 +02:00

80 lines
1.9 KiB
C++

/*
* Copyright (C) 2020-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/debug_settings/debug_settings_manager.h"
#include "shared/source/helpers/api_specific_config.h"
#include "opencl/source/os_interface/ocl_reg_path.h"
#include <string>
#include <vector>
namespace NEO {
StackVec<const char *, 4> validClPrefixes;
StackVec<NEO::DebugVarPrefix, 4> validClPrefixTypes;
bool ApiSpecificConfig::isStatelessCompressionSupported() {
return true;
}
bool ApiSpecificConfig::getGlobalBindlessHeapConfiguration(const ReleaseHelper *releaseHelper) {
return false;
}
bool ApiSpecificConfig::getBindlessMode(const ReleaseHelper *releaseHelper) {
if (debugManager.flags.UseBindlessMode.get() != -1) {
return debugManager.flags.UseBindlessMode.get();
} else {
return false;
}
}
bool ApiSpecificConfig::isDeviceAllocationCacheEnabled() {
return false;
}
bool ApiSpecificConfig::isHostAllocationCacheEnabled() {
return false;
}
ApiSpecificConfig::ApiType ApiSpecificConfig::getApiType() {
return ApiSpecificConfig::OCL;
}
std::string ApiSpecificConfig::getName() {
return "ocl";
}
uint64_t ApiSpecificConfig::getReducedMaxAllocSize(uint64_t maxAllocSize) {
return maxAllocSize / 2;
}
const char *ApiSpecificConfig::getRegistryPath() {
return oclRegPath;
}
void ApiSpecificConfig::initPrefixes() {
validClPrefixes = {"NEO_OCL_", "NEO_", ""};
validClPrefixTypes = {DebugVarPrefix::neoOcl, DebugVarPrefix::neo, DebugVarPrefix::none};
}
const StackVec<const char *, 4> &ApiSpecificConfig::getPrefixStrings() {
return validClPrefixes;
}
const StackVec<DebugVarPrefix, 4> &ApiSpecificConfig::getPrefixTypes() {
return validClPrefixTypes;
}
std::string ApiSpecificConfig::compilerCacheFileExtension() {
return ".cl_cache";
}
int64_t ApiSpecificConfig::compilerCacheDefaultEnabled() {
return 1l;
}
} // namespace NEO