fix: Correct AIL initialization in runtime

- Initialize AIL helper in runtime (linux/windows/AUB path).
- Return false if AIL configuration initialization is called with empty
AIL helper (is nullptr).
- Skip mentioned condition if AIL is disabled via EnableAIL debug key.
Related-To: NEO-9240
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
This commit is contained in:
Kacper Nowak
2023-11-28 15:15:25 +00:00
committed by Compute-Runtime-Automation
parent e470104d42
commit 4a0064033a
14 changed files with 154 additions and 117 deletions

View File

@@ -12,8 +12,9 @@
namespace NEO {
class MockAILConfiguration : public AILConfiguration {
public:
bool initProcessExecutableNameResult = true;
bool initProcessExecutableName() override {
return true;
return initProcessExecutableNameResult;
}
void modifyKernelIfRequired(std::string &kernel) override {}

View File

@@ -37,6 +37,12 @@ bool MockRootDeviceEnvironment::initOsInterface(std::unique_ptr<HwDeviceId> &&hw
}
return RootDeviceEnvironment::initOsInterface(std::move(hwDeviceId), rootDeviceIndex);
}
bool MockRootDeviceEnvironment::initAilConfiguration() {
if (ailInitializationResult.has_value()) {
return *ailInitializationResult;
} else
return RootDeviceEnvironment::initAilConfiguration();
}
MockRootDeviceEnvironment::~MockRootDeviceEnvironment() {
if (initOsInterfaceExpectedCallCount) {

View File

@@ -24,6 +24,7 @@ struct MockRootDeviceEnvironment : public RootDeviceEnvironment {
void initAubCenter(bool localMemoryEnabled, const std::string &aubFileName, CommandStreamReceiverType csrType) override;
bool initOsInterface(std::unique_ptr<HwDeviceId> &&hwDeviceId, uint32_t rootDeviceIndex) override;
bool initAilConfiguration() override;
std::vector<bool> initOsInterfaceResults;
uint32_t initOsInterfaceCalled = 0u;
@@ -32,6 +33,7 @@ struct MockRootDeviceEnvironment : public RootDeviceEnvironment {
bool localMemoryEnabledReceived = false;
std::string aubFileNameReceived = "";
bool useMockAubCenter = true;
std::optional<bool> ailInitializationResult{true};
};
struct MockExecutionEnvironment : ExecutionEnvironment {