feature: Adding support for extending ExecutionEnvironment

Related-To: NEO-12747

Signed-off-by: Chodor, Jaroslaw <jaroslaw.chodor@intel.com>
This commit is contained in:
Chodor, Jaroslaw
2025-01-24 19:32:19 +00:00
committed by Compute-Runtime-Automation
parent 254e7c5c6a
commit 9e4513914f
2 changed files with 24 additions and 2 deletions

View File

@@ -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;

View File

@@ -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