diff --git a/level_zero/core/test/aub_tests/fixtures/aub_fixture.cpp b/level_zero/core/test/aub_tests/fixtures/aub_fixture.cpp index e857cb32a2..43b87c5ff0 100644 --- a/level_zero/core/test/aub_tests/fixtures/aub_fixture.cpp +++ b/level_zero/core/test/aub_tests/fixtures/aub_fixture.cpp @@ -7,12 +7,14 @@ #include "level_zero/core/test/aub_tests/fixtures/aub_fixture.h" +#include "shared/source/aub/aub_center.h" #include "shared/source/command_stream/aub_command_stream_receiver.h" #include "shared/source/command_stream/tbx_command_stream_receiver_hw.h" #include "shared/source/helpers/api_specific_config.h" #include "shared/source/helpers/file_io.h" #include "shared/source/helpers/gfx_core_helper.h" #include "shared/source/helpers/hw_info.h" +#include "shared/source/os_interface/aub_memory_operations_handler.h" #include "shared/test/common/helpers/test_files.h" #include "shared/test/common/mocks/mock_device.h" #include "shared/test/common/tests_configuration.h" @@ -44,6 +46,16 @@ void AUBFixtureL0::setUp(const NEO::HardwareInfo *hardwareInfo, bool debuggingEn executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(&hwInfo); executionEnvironment->rootDeviceEnvironments[0]->initGmm(); + if (auto &rootDeviceEnvironment = *executionEnvironment->rootDeviceEnvironments[0]; !rootDeviceEnvironment.aubCenter) { + auto &gfxCoreHelper = rootDeviceEnvironment.getHelper(); + auto hardwareInfo = rootDeviceEnvironment.getMutableHardwareInfo(); + auto localMemoryEnabled = gfxCoreHelper.getEnableLocalMemory(*hardwareInfo); + rootDeviceEnvironment.initAubCenter(localMemoryEnabled, "", NEO::CommandStreamReceiverType::aub); + } + + const auto aubCenter = executionEnvironment->rootDeviceEnvironments[0]->aubCenter.get(); + executionEnvironment->rootDeviceEnvironments[0]->memoryOperationsInterface = std::make_unique(aubCenter->getAubManager()); + if (debuggingEnabled) { executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online); } diff --git a/level_zero/core/test/unit_tests/sources/device/device_drm_or_wddm/test_device_exensions.cpp b/level_zero/core/test/unit_tests/sources/device/device_drm_or_wddm/test_device_exensions.cpp index 16ac47a810..71b6f59830 100644 --- a/level_zero/core/test/unit_tests/sources/device/device_drm_or_wddm/test_device_exensions.cpp +++ b/level_zero/core/test/unit_tests/sources/device/device_drm_or_wddm/test_device_exensions.cpp @@ -12,6 +12,7 @@ #include "shared/test/common/mocks/mock_device.h" #include "shared/test/common/mocks/mock_execution_environment.h" #include "shared/test/common/os_interface/linux/drm_mock_extended.h" +#include "shared/test/common/os_interface/windows/mock_wddm_memory_manager.h" #include "level_zero/core/source/cache/cache_reservation.h" #include "level_zero/core/test/unit_tests/fixtures/device_fixture.h" @@ -28,6 +29,8 @@ struct DeviceWddmExtensionTest : public ::testing::Test { executionEnvironment->rootDeviceEnvironments[0]->initGmm(); executionEnvironment->incRefInternal(); executionEnvironment->rootDeviceEnvironments[0]->initOsInterface(std::make_unique(NEO::DriverModelType::wddm), rootDeviceIndex); + executionEnvironment->memoryManager.reset(new MockWddmMemoryManager(*executionEnvironment)); + neoDevice = NEO::MockDevice::createWithExecutionEnvironment(NEO::defaultHwInfo.get(), executionEnvironment.get(), rootDeviceIndex); NEO::DeviceVector devices; devices.push_back(std::unique_ptr(neoDevice)); diff --git a/shared/source/execution_environment/root_device_environment.h b/shared/source/execution_environment/root_device_environment.h index 28df8eca79..e9ce5a51a0 100644 --- a/shared/source/execution_environment/root_device_environment.h +++ b/shared/source/execution_environment/root_device_environment.h @@ -100,7 +100,6 @@ struct RootDeviceEnvironment : NonCopyableClass { std::unique_ptr osInterface; std::unique_ptr memoryOperationsInterface; std::unique_ptr aubCenter; - std::unique_ptr bindlessHeapsHelper; std::unique_ptr osTime; std::unique_ptr compilerInterface; @@ -113,6 +112,7 @@ struct RootDeviceEnvironment : NonCopyableClass { std::unique_ptr compilerProductHelper; std::unique_ptr releaseHelper; std::unique_ptr ailConfiguration; + std::unique_ptr bindlessHeapsHelper; std::unique_ptr assertHandler;