2020-10-01 19:31:19 +08:00
|
|
|
/*
|
2023-05-30 16:26:29 +08:00
|
|
|
* Copyright (C) 2020-2023 Intel Corporation
|
2020-10-01 19:31:19 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "shared/source/debug_settings/debug_settings_manager.h"
|
|
|
|
#include "shared/source/helpers/api_specific_config.h"
|
|
|
|
|
2021-09-23 06:03:07 +08:00
|
|
|
#include "opencl/source/os_interface/ocl_reg_path.h"
|
|
|
|
|
2023-08-20 12:31:48 +08:00
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
2020-10-01 19:31:19 +08:00
|
|
|
namespace NEO {
|
2023-09-21 22:02:00 +08:00
|
|
|
StackVec<const char *, 4> validClPrefixes;
|
|
|
|
StackVec<NEO::DebugVarPrefix, 4> validClPrefixTypes;
|
2021-08-03 16:24:06 +08:00
|
|
|
bool ApiSpecificConfig::isStatelessCompressionSupported() {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2023-05-30 16:26:29 +08:00
|
|
|
bool ApiSpecificConfig::getGlobalBindlessHeapConfiguration() {
|
2020-10-01 19:31:19 +08:00
|
|
|
return false;
|
|
|
|
}
|
2021-08-03 16:24:06 +08:00
|
|
|
|
2023-05-30 16:26:29 +08:00
|
|
|
bool ApiSpecificConfig::getBindlessMode() {
|
2020-10-07 19:53:56 +08:00
|
|
|
if (DebugManager.flags.UseBindlessMode.get() != -1) {
|
|
|
|
return DebugManager.flags.UseBindlessMode.get();
|
2020-10-01 19:31:19 +08:00
|
|
|
} else {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
2021-08-03 16:24:06 +08:00
|
|
|
|
2022-09-05 21:17:18 +08:00
|
|
|
bool ApiSpecificConfig::isDeviceAllocationCacheEnabled() {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2023-06-07 23:06:16 +08:00
|
|
|
bool ApiSpecificConfig::isDynamicPostSyncAllocLayoutEnabled() {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2021-05-14 01:46:01 +08:00
|
|
|
ApiSpecificConfig::ApiType ApiSpecificConfig::getApiType() {
|
|
|
|
return ApiSpecificConfig::OCL;
|
|
|
|
}
|
2021-07-05 20:10:31 +08:00
|
|
|
|
2021-09-16 20:31:00 +08:00
|
|
|
std::string ApiSpecificConfig::getName() {
|
|
|
|
return "ocl";
|
2021-07-05 20:10:31 +08:00
|
|
|
}
|
2021-08-11 02:52:02 +08:00
|
|
|
|
|
|
|
uint64_t ApiSpecificConfig::getReducedMaxAllocSize(uint64_t maxAllocSize) {
|
|
|
|
return maxAllocSize / 2;
|
|
|
|
}
|
|
|
|
|
2021-09-23 06:03:07 +08:00
|
|
|
const char *ApiSpecificConfig::getRegistryPath() {
|
|
|
|
return oclRegPath;
|
|
|
|
}
|
2023-08-20 12:31:48 +08:00
|
|
|
|
|
|
|
void ApiSpecificConfig::initPrefixes() {
|
|
|
|
validClPrefixes = {"NEO_OCL_", "NEO_", ""};
|
|
|
|
validClPrefixTypes = {DebugVarPrefix::Neo_Ocl, DebugVarPrefix::Neo, DebugVarPrefix::None};
|
|
|
|
}
|
|
|
|
|
2023-09-21 22:02:00 +08:00
|
|
|
const StackVec<const char *, 4> &ApiSpecificConfig::getPrefixStrings() {
|
2023-08-20 12:31:48 +08:00
|
|
|
return validClPrefixes;
|
|
|
|
}
|
|
|
|
|
2023-09-21 22:02:00 +08:00
|
|
|
const StackVec<DebugVarPrefix, 4> &ApiSpecificConfig::getPrefixTypes() {
|
2023-08-20 12:31:48 +08:00
|
|
|
return validClPrefixTypes;
|
|
|
|
}
|
2021-08-11 02:52:02 +08:00
|
|
|
} // namespace NEO
|