mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 09:14:47 +08:00
fix: adjust tests to enabled global allocator 8/n
Related-To: NEO-7063 Signed-off-by: Fabian Zwoliński <fabian.zwolinski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
c42d0fbe49
commit
652cff7a86
@@ -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<NEO::GfxCoreHelper>();
|
||||
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<NEO::AubMemoryOperationsHandler>(aubCenter->getAubManager());
|
||||
|
||||
if (debuggingEnabled) {
|
||||
executionEnvironment->setDebuggingMode(NEO::DebuggingMode::online);
|
||||
}
|
||||
|
||||
@@ -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::HwDeviceId>(NEO::DriverModelType::wddm), rootDeviceIndex);
|
||||
executionEnvironment->memoryManager.reset(new MockWddmMemoryManager(*executionEnvironment));
|
||||
|
||||
neoDevice = NEO::MockDevice::createWithExecutionEnvironment<NEO::MockDevice>(NEO::defaultHwInfo.get(), executionEnvironment.get(), rootDeviceIndex);
|
||||
NEO::DeviceVector devices;
|
||||
devices.push_back(std::unique_ptr<NEO::Device>(neoDevice));
|
||||
|
||||
@@ -100,7 +100,6 @@ struct RootDeviceEnvironment : NonCopyableClass {
|
||||
std::unique_ptr<OSInterface> osInterface;
|
||||
std::unique_ptr<MemoryOperationsHandler> memoryOperationsInterface;
|
||||
std::unique_ptr<AubCenter> aubCenter;
|
||||
std::unique_ptr<BindlessHeapsHelper> bindlessHeapsHelper;
|
||||
std::unique_ptr<OSTime> osTime;
|
||||
|
||||
std::unique_ptr<CompilerInterface> compilerInterface;
|
||||
@@ -113,6 +112,7 @@ struct RootDeviceEnvironment : NonCopyableClass {
|
||||
std::unique_ptr<CompilerProductHelper> compilerProductHelper;
|
||||
std::unique_ptr<ReleaseHelper> releaseHelper;
|
||||
std::unique_ptr<AILConfiguration> ailConfiguration;
|
||||
std::unique_ptr<BindlessHeapsHelper> bindlessHeapsHelper;
|
||||
|
||||
std::unique_ptr<AssertHandler> assertHandler;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user