mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 17:39:51 +08:00
refactor: add ail context sync flag
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
dae8c34f81
commit
0b7e6d90a3
@@ -10,6 +10,7 @@
|
||||
#include "igfxfmid.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <set>
|
||||
#include <string>
|
||||
|
||||
/*
|
||||
@@ -56,6 +57,8 @@ class AILConfiguration {
|
||||
|
||||
virtual bool isFallbackToPatchtokensRequired(const std::string &kernelSources) = 0;
|
||||
|
||||
virtual bool isContextSyncFlagRequired() = 0;
|
||||
|
||||
protected:
|
||||
virtual void applyExt(RuntimeCapabilityTable &runtimeCapabilityTable) = 0;
|
||||
std::string processName;
|
||||
@@ -66,6 +69,8 @@ class AILConfiguration {
|
||||
|
||||
extern AILConfiguration *ailConfigurationTable[IGFX_MAX_PRODUCT];
|
||||
|
||||
extern const std::set<std::string_view> applicationsContextSyncFlag;
|
||||
|
||||
template <PRODUCT_FAMILY Product>
|
||||
class AILConfigurationHw : public AILConfiguration {
|
||||
public:
|
||||
@@ -78,6 +83,7 @@ class AILConfigurationHw : public AILConfiguration {
|
||||
|
||||
void modifyKernelIfRequired(std::string &kernel) override;
|
||||
bool isFallbackToPatchtokensRequired(const std::string &kernelSources) override;
|
||||
bool isContextSyncFlagRequired() override;
|
||||
};
|
||||
|
||||
template <PRODUCT_FAMILY product>
|
||||
|
||||
@@ -40,4 +40,9 @@ template <PRODUCT_FAMILY Product>
|
||||
inline void AILConfigurationHw<Product>::applyExt(RuntimeCapabilityTable &runtimeCapabilityTable) {
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY Product>
|
||||
inline bool AILConfigurationHw<Product>::isContextSyncFlagRequired() {
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -24,6 +24,8 @@ std::map<std::string_view, std::vector<AILEnumeration>> applicationMap = {{"blen
|
||||
// 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}}};
|
||||
|
||||
const std::set<std::string_view> applicationsContextSyncFlag = {};
|
||||
|
||||
AILConfiguration *ailConfigurationTable[IGFX_MAX_PRODUCT] = {};
|
||||
|
||||
AILConfiguration *AILConfiguration::get(PRODUCT_FAMILY productFamily) {
|
||||
|
||||
15
shared/source/ail/gen8/bdw/ail_configuration_bdw.cpp
Normal file
15
shared/source/ail/gen8/bdw/ail_configuration_bdw.cpp
Normal file
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/ail/ail_configuration_base.inl"
|
||||
|
||||
namespace NEO {
|
||||
static EnableAIL<IGFX_BROADWELL> enableAILBDW;
|
||||
|
||||
template class AILConfigurationHw<IGFX_BROADWELL>;
|
||||
|
||||
} // namespace NEO
|
||||
@@ -33,6 +33,12 @@ void AILConfigurationHw<IGFX_METEORLAKE>::applyExt(RuntimeCapabilityTable &runti
|
||||
}
|
||||
}
|
||||
|
||||
template <>
|
||||
bool AILConfigurationHw<IGFX_METEORLAKE>::isContextSyncFlagRequired() {
|
||||
auto iterator = applicationsContextSyncFlag.find(processName);
|
||||
return iterator != applicationsContextSyncFlag.end();
|
||||
}
|
||||
|
||||
template class AILConfigurationHw<IGFX_METEORLAKE>;
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
Reference in New Issue
Block a user