2022-06-15 19:49:38 +08:00
|
|
|
/*
|
2023-09-12 05:29:01 +08:00
|
|
|
* Copyright (C) 2021-2023 Intel Corporation
|
2022-06-15 19:49:38 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "shared/source/ail/ail_configuration.h"
|
|
|
|
#include "shared/source/helpers/hash.h"
|
2022-11-07 21:04:52 +08:00
|
|
|
#include "shared/source/helpers/hw_info.h"
|
2022-06-15 19:49:38 +08:00
|
|
|
|
|
|
|
#include <map>
|
|
|
|
#include <string_view>
|
|
|
|
|
|
|
|
namespace NEO {
|
|
|
|
/*
|
|
|
|
* fp64 support is unavailable on some Intel GPUs, and the SW emulation in IGC should not be enabled by default.
|
|
|
|
* For Blender, fp64 is not performance-critical - SW emulation is good enough for the application to be usable
|
|
|
|
* (some versions would not function correctly without it).
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2023-09-12 05:29:01 +08:00
|
|
|
std::map<std::string_view, std::vector<AILEnumeration>> applicationMap = {{"blender", {AILEnumeration::ENABLE_FP64}},
|
2023-09-15 04:04:46 +08:00
|
|
|
// Modify reported platform name to ensure older versions of Adobe Premiere Pro are able to recognize the GPU device
|
|
|
|
{"Adobe Premiere Pro", {AILEnumeration::ENABLE_LEGACY_PLATFORM_NAME}}};
|
2022-06-15 19:49:38 +08:00
|
|
|
|
2023-10-14 19:32:40 +08:00
|
|
|
const std::set<std::string_view> applicationsContextSyncFlag = {};
|
|
|
|
|
2022-06-15 19:49:38 +08:00
|
|
|
AILConfiguration *ailConfigurationTable[IGFX_MAX_PRODUCT] = {};
|
|
|
|
|
|
|
|
AILConfiguration *AILConfiguration::get(PRODUCT_FAMILY productFamily) {
|
|
|
|
return ailConfigurationTable[productFamily];
|
|
|
|
}
|
|
|
|
|
|
|
|
void AILConfiguration::apply(RuntimeCapabilityTable &runtimeCapabilityTable) {
|
|
|
|
auto search = applicationMap.find(processName);
|
|
|
|
|
|
|
|
if (search != applicationMap.end()) {
|
|
|
|
for (size_t i = 0; i < search->second.size(); ++i) {
|
|
|
|
switch (search->second[i]) {
|
|
|
|
case AILEnumeration::ENABLE_FP64:
|
|
|
|
runtimeCapabilityTable.ftrSupportsFP64 = true;
|
|
|
|
break;
|
2023-09-12 05:29:01 +08:00
|
|
|
case AILEnumeration::ENABLE_LEGACY_PLATFORM_NAME:
|
|
|
|
runtimeCapabilityTable.preferredPlatformName = legacyPlatformName;
|
|
|
|
break;
|
2022-06-15 19:49:38 +08:00
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
applyExt(runtimeCapabilityTable);
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace NEO
|