Files
compute-runtime/shared/test/common/helpers/api_specific_config_shared_tests.cpp
Dominik Dabek 16798467ac Add api specific config for allocation cache
Currently disabled for both opencl and level zero

Related-To: NEO-6893

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2022-09-05 21:15:18 +02:00

49 lines
1.2 KiB
C++

/*
* Copyright (C) 2021-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/debug_settings/debug_settings_manager.h"
#include "shared/source/helpers/api_specific_config.h"
namespace NEO {
ApiSpecificConfig::ApiType apiTypeForUlts = ApiSpecificConfig::OCL;
bool ApiSpecificConfig::isStatelessCompressionSupported() {
return ApiSpecificConfig::ApiType::OCL == ApiSpecificConfig::getApiType();
}
bool ApiSpecificConfig::isBcsSplitWaSupported() {
return false;
}
bool ApiSpecificConfig::getHeapConfiguration() {
return DebugManager.flags.UseExternalAllocatorForSshAndDsh.get();
}
bool ApiSpecificConfig::getBindlessConfiguration() {
if (DebugManager.flags.UseBindlessMode.get() != -1) {
return DebugManager.flags.UseBindlessMode.get();
} else {
return false;
}
}
bool ApiSpecificConfig::isDeviceAllocationCacheEnabled() {
return false;
}
ApiSpecificConfig::ApiType ApiSpecificConfig::getApiType() {
return apiTypeForUlts;
}
uint64_t ApiSpecificConfig::getReducedMaxAllocSize(uint64_t maxAllocSize) {
return maxAllocSize / 2;
}
std::string ApiSpecificConfig::getName() {
return "shared";
}
const char *ApiSpecificConfig::getRegistryPath() {
return "";
}
} // namespace NEO