2020-10-01 19:31:19 +08:00
|
|
|
/*
|
2021-05-17 02:51:16 +08:00
|
|
|
* Copyright (C) 2021 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"
|
|
|
|
|
|
|
|
namespace NEO {
|
2021-12-04 01:48:12 +08:00
|
|
|
ApiSpecificConfig::ApiType apiTypeForUlts = ApiSpecificConfig::OCL;
|
2021-08-03 16:24:06 +08:00
|
|
|
bool ApiSpecificConfig::isStatelessCompressionSupported() {
|
2021-08-07 00:06:13 +08:00
|
|
|
return ApiSpecificConfig::ApiType::OCL == ApiSpecificConfig::getApiType();
|
2021-08-03 16:24:06 +08:00
|
|
|
}
|
2020-10-01 19:31:19 +08:00
|
|
|
bool ApiSpecificConfig::getHeapConfiguration() {
|
|
|
|
return DebugManager.flags.UseExternalAllocatorForSshAndDsh.get();
|
|
|
|
}
|
2020-10-07 19:53:56 +08:00
|
|
|
bool ApiSpecificConfig::getBindlessConfiguration() {
|
|
|
|
if (DebugManager.flags.UseBindlessMode.get() != -1) {
|
|
|
|
return DebugManager.flags.UseBindlessMode.get();
|
2020-10-01 19:31:19 +08:00
|
|
|
} else {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
2021-12-04 01:48:12 +08:00
|
|
|
|
2021-05-14 01:46:01 +08:00
|
|
|
ApiSpecificConfig::ApiType ApiSpecificConfig::getApiType() {
|
2021-12-04 01:48:12 +08:00
|
|
|
return apiTypeForUlts;
|
2021-05-14 01:46:01 +08:00
|
|
|
}
|
2021-08-11 02:52:02 +08:00
|
|
|
|
|
|
|
uint64_t ApiSpecificConfig::getReducedMaxAllocSize(uint64_t maxAllocSize) {
|
|
|
|
return maxAllocSize / 2;
|
|
|
|
}
|
|
|
|
|
2021-09-16 20:31:00 +08:00
|
|
|
std::string ApiSpecificConfig::getName() {
|
|
|
|
return "shared";
|
|
|
|
}
|
2021-09-23 06:03:07 +08:00
|
|
|
const char *ApiSpecificConfig::getRegistryPath() {
|
|
|
|
return "";
|
|
|
|
}
|
2021-08-11 02:52:02 +08:00
|
|
|
} // namespace NEO
|