mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-30 01:35:20 +08:00
feature: Adding support for extending ExecutionEnvironment
Related-To: NEO-12747 Signed-off-by: Chodor, Jaroslaw <jaroslaw.chodor@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
254e7c5c6a
commit
9e4513914f
@@ -394,7 +394,21 @@ inline constexpr ConstStringRef required[] = {
|
||||
Tags::Kernel::ExecutionEnv::grfCount,
|
||||
Tags::Kernel::ExecutionEnv::simdSize};
|
||||
|
||||
struct ExecutionEnvBaseT {
|
||||
struct ExecutionEnvExt;
|
||||
ExecutionEnvExt *allocateExecEnvExt();
|
||||
void freeExecEnvExt(ExecutionEnvExt *);
|
||||
|
||||
struct ExecutionEnvBaseT final {
|
||||
ExecutionEnvBaseT() {
|
||||
execEnvExt = allocateExecEnvExt();
|
||||
}
|
||||
~ExecutionEnvBaseT() {
|
||||
if (execEnvExt) {
|
||||
freeExecEnvExt(execEnvExt);
|
||||
}
|
||||
}
|
||||
ExecutionEnvExt *execEnvExt = nullptr;
|
||||
|
||||
BarrierCountT barrierCount = Defaults::barrierCount;
|
||||
DisableMidThreadPreemptionT disableMidThreadPreemption = Defaults::disableMidThreadPreemption;
|
||||
EuThreadCountT euThreadCount = Defaults::euThreadCount;
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#include "shared/source/device_binary_format/zebin/zeinfo_decoder.h"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
namespace NEO::Zebin::ZeInfo {
|
||||
void readZeInfoValueCheckedExtra(const NEO::Yaml::YamlParser &parser, const NEO::Yaml::Node &execEnvMetadataNd, KernelExecutionEnvBaseT &kernelExecEnv, ConstStringRef context,
|
||||
ConstStringRef key, std::string &outErrReason, std::string &outWarning, bool &validExecEnv, DecodeError &error) {
|
||||
@@ -17,4 +16,13 @@ void readZeInfoValueCheckedExtra(const NEO::Yaml::YamlParser &parser, const NEO:
|
||||
entry << "\"" << key.str() << "\" in context of " << context.str();
|
||||
encounterUnknownZeInfoAttribute(entry.str(), outErrReason, outWarning, error);
|
||||
}
|
||||
|
||||
namespace Types::Kernel::ExecutionEnv {
|
||||
ExecutionEnvExt *allocateExecEnvExt() {
|
||||
return nullptr;
|
||||
}
|
||||
void freeExecEnvExt(ExecutionEnvExt *envExt) {
|
||||
}
|
||||
} // namespace Types::Kernel::ExecutionEnv
|
||||
|
||||
} // namespace NEO::Zebin::ZeInfo
|
||||
|
||||
Reference in New Issue
Block a user