mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
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:
committed by
Compute-Runtime-Automation
parent
e470104d42
commit
4a0064033a
@@ -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 {}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user