mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-31 12:11:31 +08:00
Add initial AIL implementation
Related-To: NEO-6390 Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
91dfa5c2ac
commit
1c8a503ca4
@@ -11,7 +11,14 @@
|
||||
#include <string_view>
|
||||
|
||||
namespace NEO {
|
||||
std::map<std::string_view, std::vector<AILEnumeration>> applicationMap = {};
|
||||
/*
|
||||
* 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).
|
||||
*
|
||||
*/
|
||||
|
||||
std::map<std::string_view, std::vector<AILEnumeration>> applicationMap = {{"blender", {AILEnumeration::ENABLE_FP64}}};
|
||||
|
||||
AILConfiguration *ailConfigurationTable[IGFX_MAX_PRODUCT] = {};
|
||||
|
||||
@@ -20,6 +27,20 @@ AILConfiguration *AILConfiguration::get(PRODUCT_FAMILY 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;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
applyExt(runtimeCapabilityTable);
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
/*
|
||||
* AIL (Application Intelligence Layer) is a set of per-application controls that influence driver behavior.
|
||||
* The primary goal is to improve user experience and/or performance.
|
||||
*
|
||||
* AIL provides application detection mechanism based on running processes in the system.
|
||||
* Mechanism works on Windows and Linux, is flexible and easily extendable to new applications.
|
||||
*
|
||||
* E.g. AIL can detect running Blender application and enable fp64 emulation on hardware
|
||||
* that does not support native fp64.
|
||||
*
|
||||
* Disclaimer: we should never use this for benchmarking or conformance purposes - this would be cheating.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace NEO {
|
||||
|
||||
enum class AILEnumeration : uint32_t {
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
|
||||
#include <string_view>
|
||||
|
||||
// Application detection is performed using the process name of the given application.
|
||||
|
||||
namespace NEO {
|
||||
bool AILConfiguration::initProcessExecutableName() {
|
||||
char path[512] = {0};
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
#include "shared/source/ail/ail_configuration.h"
|
||||
#include "shared/source/os_interface/windows/sys_calls.h"
|
||||
|
||||
// Application detection is performed using the process name of the given application.
|
||||
|
||||
namespace NEO {
|
||||
bool AILConfiguration::initProcessExecutableName() {
|
||||
const DWORD length = MAX_PATH;
|
||||
|
||||
Reference in New Issue
Block a user