refactor: remove redundant exec environment pointer from L0::DeviceImp

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2025-06-09 12:04:00 +00:00
committed by Compute-Runtime-Automation
parent 5b67a3d40b
commit c01ef3d9ad
41 changed files with 244 additions and 259 deletions

View File

@@ -95,7 +95,6 @@ struct Device : _ze_device_handle_t {
virtual ~Device() = default;
virtual void *getExecEnvironment() = 0;
virtual BuiltinFunctionsLib *getBuiltinFunctionsLib() = 0;
virtual uint32_t getMOCS(bool l3enabled, bool l1enabled) = 0;
virtual uint32_t getMaxNumHwThreads() const = 0;

View File

@@ -1462,8 +1462,6 @@ ze_result_t DeviceImp::activateMetricGroupsDeferred(uint32_t count,
return status;
}
void *DeviceImp::getExecEnvironment() { return execEnvironment; }
BuiltinFunctionsLib *DeviceImp::getBuiltinFunctionsLib() { return builtins.get(); }
uint32_t DeviceImp::getMOCS(bool l3enabled, bool l1enabled) {
@@ -1542,7 +1540,6 @@ Device *Device::create(DriverHandle *driverHandle, NEO::Device *neoDevice, bool
auto &rootDeviceEnvironment = neoDevice->getRootDeviceEnvironment();
auto &gfxCoreHelper = rootDeviceEnvironment.getHelper<NEO::GfxCoreHelper>();
device->execEnvironment = (void *)neoDevice->getExecutionEnvironment();
device->allocationsForReuse = std::make_unique<NEO::AllocationsList>();
bool platformImplicitScaling = gfxCoreHelper.platformSupportsImplicitScaling(rootDeviceEnvironment);
device->implicitScalingCapable = NEO::ImplicitScalingHelper::isImplicitScalingEnabled(neoDevice->getDeviceBitfield(), platformImplicitScaling);

View File

@@ -76,7 +76,6 @@ struct DeviceImp : public Device, NEO::NonCopyableAndNonMovableClass {
ze_result_t systemBarrier() override;
ze_result_t synchronize() override;
void *getExecEnvironment() override;
BuiltinFunctionsLib *getBuiltinFunctionsLib() override;
uint32_t getMOCS(bool l3enabled, bool l1enabled) override;
const NEO::GfxCoreHelper &getGfxCoreHelper() override;
@@ -129,7 +128,6 @@ struct DeviceImp : public Device, NEO::NonCopyableAndNonMovableClass {
uint32_t getPhysicalSubDeviceId();
bool isSubdevice = false;
void *execEnvironment = nullptr;
std::unique_ptr<BuiltinFunctionsLib> builtins;
std::unique_ptr<MetricDeviceContext> metricContext;
std::unique_ptr<CacheReservation> cacheReservation;

View File

@@ -57,7 +57,7 @@ HWTEST2_F(CommandQueueGroupTest,
hwInfo.featureTable.ftrBcsInfo.set(0, false);
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo,
rootDeviceIndex);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
uint32_t count = 0;
ze_result_t res = deviceImp.getCommandQueueGroupProperties(&count, nullptr);
@@ -74,7 +74,7 @@ HWTEST2_F(CommandQueueGroupTest,
hwInfo.featureTable.ftrBcsInfo.set(0);
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo,
rootDeviceIndex);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
uint32_t count = 0;
ze_result_t res = deviceImp.getCommandQueueGroupProperties(&count, nullptr);
@@ -106,7 +106,7 @@ HWTEST2_F(DeviceCopyQueueGroupGen12LpTest,
hwInfo.featureTable.ftrBcsInfo.set(0);
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo,
rootDeviceIndex);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
uint32_t count = 0;
ze_result_t res = deviceImp.getCommandQueueGroupProperties(&count, nullptr);
@@ -131,7 +131,7 @@ HWTEST2_F(CommandQueueGroupTest,
hwInfo.featureTable.ftrBcsInfo.set(0);
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo,
rootDeviceIndex);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
uint32_t count = 0;
ze_result_t res = deviceImp.getCommandQueueGroupProperties(&count, nullptr);
@@ -175,7 +175,7 @@ HWTEST2_F(CommandQueueGroupTest,
hwInfo.featureTable.ftrBcsInfo.set(0);
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo,
rootDeviceIndex);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
uint32_t count = 0;
ze_result_t res = deviceImp.getCommandQueueGroupProperties(&count, nullptr);
@@ -220,7 +220,7 @@ HWTEST2_F(CommandQueueGroupTest,
hwInfo.featureTable.ftrBcsInfo.set(0);
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo,
rootDeviceIndex);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
uint32_t count = 0;
ze_result_t res = deviceImp.getCommandQueueGroupProperties(&count, nullptr);
@@ -257,7 +257,7 @@ HWTEST2_F(CommandQueueGroupTest,
hwInfo.featureTable.ftrBcsInfo.set(0);
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo,
rootDeviceIndex);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
uint32_t count = 0;
ze_result_t res = deviceImp.getCommandQueueGroupProperties(&count, nullptr);

View File

@@ -53,7 +53,6 @@ struct MockDevice : public Device {
ADDMETHOD_NOBASE(synchronize, ze_result_t, ZE_RESULT_SUCCESS, ());
ADDMETHOD_NOBASE(getRootDevice, ze_result_t, ZE_RESULT_SUCCESS, (ze_device_handle_t * phRootDevice));
// Runtime internal methods
ADDMETHOD_NOBASE(getExecEnvironment, void *, nullptr, ());
ADDMETHOD_NOBASE_REFRETURN(getGfxCoreHelper, NEO::GfxCoreHelper &, ());
ADDMETHOD_NOBASE_REFRETURN(getL0GfxCoreHelper, L0GfxCoreHelper &, ());
ADDMETHOD_NOBASE_REFRETURN(getProductHelper, NEO::ProductHelper &, ());
@@ -114,9 +113,8 @@ struct MockDeviceImp : public L0::DeviceImp {
using Base::subDeviceCopyEngineGroups;
using Base::syncDispatchTokenAllocation;
MockDeviceImp(NEO::Device *device, NEO::ExecutionEnvironment *execEnv) {
MockDeviceImp(NEO::Device *device) {
device->incRefInternal();
Base::execEnvironment = execEnv;
Base::neoDevice = device;
Base::allocationsForReuse = std::make_unique<NEO::AllocationsList>();
}

View File

@@ -21,9 +21,6 @@ ze_result_t MockDeviceForBuiltinTests::MockModuleForBuiltinTests::createKernel(c
return ZE_RESULT_SUCCESS;
}
MockDeviceForBuiltinTests::MockDeviceForBuiltinTests(NEO::Device *device) : MockDeviceImp(device, device->getExecutionEnvironment()) {
}
ze_result_t MockDeviceForBuiltinTests::createModule(const ze_module_desc_t *desc,
ze_module_handle_t *module,
ze_module_build_log_handle_t *buildLog, ModuleType type) {

View File

@@ -15,13 +15,12 @@ namespace ult {
struct MockDeviceForBuiltinTests : public MockDeviceImp {
using MockDeviceImp::MockDeviceImp;
struct MockModuleForBuiltinTests : public ModuleImp {
MockModuleForBuiltinTests(Device *device, ModuleType type);
ze_result_t createKernel(const ze_kernel_desc_t *desc, ze_kernel_handle_t *kernelHandle) override;
};
MockDeviceForBuiltinTests(NEO::Device *device);
ze_result_t createModule(const ze_module_desc_t *desc,
ze_module_handle_t *module,
ze_module_build_log_handle_t *buildLog, ModuleType type) override;

View File

@@ -23,7 +23,7 @@ class MockDeviceForSpv : public MockDeviceImp {
std::unique_ptr<L0::Module> mockModulePtr;
public:
MockDeviceForSpv(NEO::Device *device, NEO::ExecutionEnvironment *ex, L0::DriverHandleImp *driverHandle) : MockDeviceImp(device, ex) {
MockDeviceForSpv(NEO::Device *device, L0::DriverHandleImp *driverHandle) : MockDeviceImp(device) {
this->driverHandle = driverHandle;
wasModuleCreated = false;
}

View File

@@ -105,7 +105,7 @@ HWTEST_F(ExternalSemaphoreMTTest, givenSemaphoreSignalOperationEventWhenExternal
externalSemaphore->neoExternalSemaphore = std::make_unique<MockNEOExternalSemaphore>();
auto mockMemoryManager = std::make_unique<MockMemoryManager>();
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice, neoDevice->getExecutionEnvironment());
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice);
auto driverHandleImp = std::make_unique<MockDriverHandleImp>();
driverHandleImp->setMemoryManager(mockMemoryManager.get());
l0Device->setDriverHandle(driverHandleImp.get());
@@ -134,7 +134,7 @@ HWTEST_F(ExternalSemaphoreMTTest, givenHostSynchronizeFailsWhenExternalSemaphore
externalSemaphore->neoExternalSemaphore = std::make_unique<MockNEOExternalSemaphore>();
auto mockMemoryManager = std::make_unique<MockMemoryManager>();
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice, neoDevice->getExecutionEnvironment());
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice);
auto driverHandleImp = std::make_unique<MockDriverHandleImp>();
driverHandleImp->setMemoryManager(mockMemoryManager.get());
l0Device->setDriverHandle(driverHandleImp.get());
@@ -164,7 +164,7 @@ HWTEST_F(ExternalSemaphoreMTTest, givenHostSynchronizeFailsWhenExternalSemaphore
HWTEST_F(ExternalSemaphoreMTTest, givenNEOExternalSemaphoreWhenAppendWaitExternalSemaphoresExpIsCalledThenExpectedSemaphoreStateIsReturned) {
auto externalSemaphore = std::make_unique<ExternalSemaphoreImp>();
auto mockMemoryManager = std::make_unique<MockMemoryManager>();
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice, neoDevice->getExecutionEnvironment());
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice);
auto driverHandleImp = std::make_unique<MockDriverHandleImp>();
externalSemaphore->neoExternalSemaphore = std::make_unique<MockNEOExternalSemaphore>();

View File

@@ -48,7 +48,7 @@ using WddmExternalSemaphoreMTTest = Test<WddmSemaphoreFixture>;
using MockDriverHandleImp = Mock<L0::DriverHandleImp>;
HWTEST_F(WddmExternalSemaphoreMTTest, givenValidExternalSemaphoreWhenImportExternalSemaphoreExpIsCalledThenSuccessIsReturned) {
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice, neoDevice->getExecutionEnvironment());
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice);
auto driverHandleImp = std::make_unique<MockDriverHandleImp>();
ze_external_semaphore_ext_desc_t desc = {};
ze_external_semaphore_ext_handle_t hSemaphore;
@@ -72,7 +72,7 @@ HWTEST_F(WddmExternalSemaphoreMTTest, givenValidExternalSemaphoreWhenImportExter
}
HWTEST_F(WddmExternalSemaphoreMTTest, givenValidTimelineSemaphoreWhenImportExternalSemaphoreIsCalledThenSuccessIsReturned) {
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice, neoDevice->getExecutionEnvironment());
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice);
auto driverHandleImp = std::make_unique<MockDriverHandleImp>();
ze_external_semaphore_ext_desc_t desc = {};
ze_external_semaphore_ext_handle_t hSemaphore;
@@ -127,7 +127,7 @@ class MockExternalSemaphoreEvent : public MockEvent {
HWTEST_F(WddmExternalSemaphoreMTTest, givenEnqueueSignalFailsWhenExternalSemaphoreControllerIsRunningThenExpectedStateIsReturned) {
auto mockGdi = new MockFailGdi();
auto mockMemoryManager = std::make_unique<MockMemoryManager>();
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice, neoDevice->getExecutionEnvironment());
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice);
auto driverHandleImp = std::make_unique<MockDriverHandleImp>();
driverHandleImp->setMemoryManager(mockMemoryManager.get());
l0Device->setDriverHandle(driverHandleImp.get());
@@ -173,7 +173,7 @@ HWTEST_F(WddmExternalSemaphoreMTTest, givenEnqueueSignalFailsWhenExternalSemapho
HWTEST_F(WddmExternalSemaphoreMTTest, givenSemaphoreSignalOperationEventWhenExternalSemaphoreControllerIsRunningThenExpectedStateIsReturned) {
auto mockMemoryManager = std::make_unique<MockMemoryManager>();
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice, neoDevice->getExecutionEnvironment());
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice);
auto driverHandleImp = std::make_unique<MockDriverHandleImp>();
driverHandleImp->setMemoryManager(mockMemoryManager.get());
l0Device->setDriverHandle(driverHandleImp.get());
@@ -221,7 +221,7 @@ HWTEST_F(WddmExternalSemaphoreMTTest, givenImmediateCommandListWhenAppendWaitExt
HANDLE extSemaphoreHandle = 0;
auto mockMemoryManager = std::make_unique<MockMemoryManager>();
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice, neoDevice->getExecutionEnvironment());
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice);
auto driverHandleImp = std::make_unique<MockDriverHandleImp>();
driverHandleImp->setMemoryManager(mockMemoryManager.get());
l0Device->setDriverHandle(driverHandleImp.get());
@@ -266,7 +266,7 @@ HWTEST_F(WddmExternalSemaphoreMTTest, givenRegularCommandListWhenAppendWaitExter
HANDLE extSemaphoreHandle = 0;
auto mockMemoryManager = std::make_unique<MockMemoryManager>();
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice, neoDevice->getExecutionEnvironment());
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice);
auto driverHandleImp = std::make_unique<MockDriverHandleImp>();
driverHandleImp->setMemoryManager(mockMemoryManager.get());
l0Device->setDriverHandle(driverHandleImp.get());
@@ -328,7 +328,7 @@ HWTEST_F(WddmExternalSemaphoreMTTest, givenInternalProxyEventFailsToAppendWhenAp
HANDLE extSemaphoreHandle = 0;
auto mockMemoryManager = std::make_unique<MockMemoryManager>();
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice, neoDevice->getExecutionEnvironment());
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice);
auto driverHandleImp = std::make_unique<MockDriverHandleImp>();
driverHandleImp->setMemoryManager(mockMemoryManager.get());
l0Device->setDriverHandle(driverHandleImp.get());
@@ -369,7 +369,7 @@ HWTEST_F(WddmExternalSemaphoreMTTest, givenWaitEventFailsToAppendWhenAppendWaitE
HANDLE extSemaphoreHandle = 0;
auto mockMemoryManager = std::make_unique<MockMemoryManager>();
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice, neoDevice->getExecutionEnvironment());
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice);
auto driverHandleImp = std::make_unique<MockDriverHandleImp>();
driverHandleImp->setMemoryManager(mockMemoryManager.get());
l0Device->setDriverHandle(driverHandleImp.get());
@@ -411,7 +411,7 @@ HWTEST_F(WddmExternalSemaphoreMTTest, givenSignalEventFailsWhenAppendWaitExterna
HANDLE extSemaphoreHandle = 0;
auto mockMemoryManager = std::make_unique<MockMemoryManager>();
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice, neoDevice->getExecutionEnvironment());
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice);
auto driverHandleImp = std::make_unique<MockDriverHandleImp>();
driverHandleImp->setMemoryManager(mockMemoryManager.get());
l0Device->setDriverHandle(driverHandleImp.get());

View File

@@ -33,7 +33,7 @@ using CommandListImmediateWithAssert = Test<DeviceFixture>;
TEST(KernelAssert, GivenKernelWithAssertWhenDestroyedThenAssertIsChecked) {
NEO::Device *neoDevice(NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(NEO::defaultHwInfo.get(), 0));
MockDeviceImp l0Device(neoDevice, neoDevice->getExecutionEnvironment());
MockDeviceImp l0Device(neoDevice);
auto assertHandler = new MockAssertHandler(neoDevice);
neoDevice->getRootDeviceEnvironmentRef().assertHandler.reset(assertHandler);
@@ -52,7 +52,7 @@ TEST(KernelAssert, GivenKernelWithAssertWhenDestroyedThenAssertIsChecked) {
TEST(KernelAssert, GivenKernelWithAssertWhenNoModuleAssignedAndKernelDestroyedThenAssertIsNotChecked) {
NEO::Device *neoDevice(NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(NEO::defaultHwInfo.get(), 0));
MockDeviceImp l0Device(neoDevice, neoDevice->getExecutionEnvironment());
MockDeviceImp l0Device(neoDevice);
auto assertHandler = new MockAssertHandler(neoDevice);
neoDevice->getRootDeviceEnvironmentRef().assertHandler.reset(assertHandler);
@@ -68,7 +68,7 @@ TEST(KernelAssert, GivenKernelWithAssertWhenNoModuleAssignedAndKernelDestroyedTh
TEST(KernelAssert, GivenKernelWithAssertWhenNoAssertHandlerOnDestroyThenDestructorDoesNotCrash) {
NEO::Device *neoDevice(NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(NEO::defaultHwInfo.get(), 0));
MockDeviceImp l0Device(neoDevice, neoDevice->getExecutionEnvironment());
MockDeviceImp l0Device(neoDevice);
Mock<Module> module(&l0Device, nullptr, ModuleType::user);
@@ -82,7 +82,7 @@ TEST(KernelAssert, GivenKernelWithAssertWhenNoAssertHandlerOnDestroyThenDestruct
TEST(KernelAssert, GivenKernelWithAssertWhenSettingAssertBufferThenAssertBufferIsAddedToResidencyAndCrossThreadDataPatched) {
NEO::Device *neoDevice(NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(NEO::defaultHwInfo.get(), 0));
MockDeviceImp l0Device(neoDevice, neoDevice->getExecutionEnvironment());
MockDeviceImp l0Device(neoDevice);
auto assertHandler = new MockAssertHandler(neoDevice);
neoDevice->getRootDeviceEnvironmentRef().assertHandler.reset(assertHandler);
@@ -107,7 +107,7 @@ TEST(KernelAssert, GivenKernelWithAssertWhenSettingAssertBufferThenAssertBufferI
TEST(KernelAssert, GivenKernelWithAssertAndImplicitArgsWhenInitializingKernelThenImplicitArgsAssertBufferPtrIsSet) {
NEO::Device *neoDevice(NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(NEO::defaultHwInfo.get(), 0));
MockDeviceImp l0Device(neoDevice, neoDevice->getExecutionEnvironment());
MockDeviceImp l0Device(neoDevice);
auto assertHandler = new MockAssertHandler(neoDevice);
neoDevice->getRootDeviceEnvironmentRef().assertHandler.reset(assertHandler);
@@ -146,7 +146,7 @@ TEST(KernelAssert, GivenKernelWithAssertAndImplicitArgsWhenInitializingKernelThe
TEST(KernelAssert, GivenNoAssertHandlerWhenKernelWithAssertSetsAssertBufferThenAssertHandlerIsCreated) {
NEO::Device *neoDevice(NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(NEO::defaultHwInfo.get(), 0));
MockDeviceImp l0Device(neoDevice, neoDevice->getExecutionEnvironment());
MockDeviceImp l0Device(neoDevice);
Mock<Module> module(&l0Device, nullptr, ModuleType::user);
Mock<KernelImp> kernel;
@@ -164,7 +164,7 @@ TEST(KernelAssert, GivenNoAssertHandlerWhenKernelWithAssertSetsAssertBufferThenA
TEST(CommandListAssertTest, GivenCmdListWhenKernelWithAssertAppendedThenHasKernelWithAssertIsSetTrue) {
NEO::Device *neoDevice(NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(NEO::defaultHwInfo.get(), 0));
MockDeviceImp l0Device(neoDevice, neoDevice->getExecutionEnvironment());
MockDeviceImp l0Device(neoDevice);
ze_result_t returnValue;
Mock<Module> module(&l0Device, nullptr, ModuleType::user);
@@ -185,7 +185,7 @@ TEST(CommandListAssertTest, GivenCmdListWhenKernelWithAssertAppendedThenHasKerne
TEST(CommandListAssertTest, GivenCmdListWithAppendedAssertKernelWhenResetThenKernelWithAssertAppendedIsFalse) {
NEO::Device *neoDevice(NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(NEO::defaultHwInfo.get(), 0));
MockDeviceImp l0Device(neoDevice, neoDevice->getExecutionEnvironment());
MockDeviceImp l0Device(neoDevice);
ze_result_t returnValue;
std::unique_ptr<ult::WhiteBox<L0::CommandListImp>> commandList(ult::CommandList::whiteboxCast(CommandList::create(NEO::defaultHwInfo->platform.eProductFamily,

View File

@@ -50,7 +50,7 @@ class BuiltinFunctionsLibFixture : public DeviceFixture {
void setUp() {
DeviceFixture::setUp();
mockDevicePtr = std::unique_ptr<MockDeviceForSpv<false, false>>(new MockDeviceForSpv<false, false>(device->getNEODevice(), device->getNEODevice()->getExecutionEnvironment(), driverHandle.get()));
mockDevicePtr = std::unique_ptr<MockDeviceForSpv<false, false>>(new MockDeviceForSpv<false, false>(device->getNEODevice(), driverHandle.get()));
mockBuiltinFunctionsLibImpl.reset(new MockBuiltinFunctionsLibImpl(mockDevicePtr.get(), neoDevice->getBuiltIns()));
mockBuiltinFunctionsLibImpl->ensureInitCompletion();
EXPECT_TRUE(mockBuiltinFunctionsLibImpl->initAsyncComplete);

View File

@@ -215,7 +215,7 @@ class DeviceHostPtrFailMock : public MockDeviceImp {
};
HWTEST_F(CommandListCreateTests, givenGetAlignedAllocationCalledWithInvalidPtrThenNullptrReturned) {
auto failDevice = std::make_unique<DeviceHostPtrFailMock>(device->getNEODevice(), execEnv);
auto failDevice = std::make_unique<DeviceHostPtrFailMock>(device->getNEODevice());
failDevice->neoDevice = device->getNEODevice();
auto commandList = std::make_unique<WhiteBox<::L0::CommandListCoreFamily<FamilyType::gfxCoreFamily>>>();
commandList->initialize(failDevice.get(), NEO::EngineGroupType::copy, 0u);
@@ -1499,7 +1499,7 @@ class MyDeviceMock : public MockDeviceImp {
};
HWTEST_F(CommandListCreateTests, givenHostPtrAllocAllocWhenInternalMemCreatedThenNewAllocAddedToDealocationContainer) {
auto myDevice = std::make_unique<MyDeviceMock<NEO::AllocationType::internalHostMemory>>(device->getNEODevice(), execEnv);
auto myDevice = std::make_unique<MyDeviceMock<NEO::AllocationType::internalHostMemory>>(device->getNEODevice());
myDevice->neoDevice = device->getNEODevice();
auto commandList = std::make_unique<WhiteBox<::L0::CommandListCoreFamily<FamilyType::gfxCoreFamily>>>();
commandList->initialize(myDevice.get(), NEO::EngineGroupType::copy, 0u);
@@ -1514,7 +1514,7 @@ HWTEST_F(CommandListCreateTests, givenHostPtrAllocAllocWhenInternalMemCreatedThe
}
HWTEST_F(CommandListCreateTests, givenHostPtrAllocAllocWhenExternalMemCreatedThenNewAllocAddedToHostPtrMap) {
auto myDevice = std::make_unique<MyDeviceMock<NEO::AllocationType::externalHostPtr>>(device->getNEODevice(), execEnv);
auto myDevice = std::make_unique<MyDeviceMock<NEO::AllocationType::externalHostPtr>>(device->getNEODevice());
myDevice->neoDevice = device->getNEODevice();
auto commandList = std::make_unique<WhiteBox<::L0::CommandListCoreFamily<FamilyType::gfxCoreFamily>>>();
commandList->initialize(myDevice.get(), NEO::EngineGroupType::copy, 0u);
@@ -1529,7 +1529,7 @@ HWTEST_F(CommandListCreateTests, givenHostPtrAllocAllocWhenExternalMemCreatedThe
}
HWTEST_F(CommandListCreateWithBcs, givenHostPtrAllocAllocAndImmediateCmdListWhenExternalMemCreatedThenNewAllocAddedToInternalAllocationStorage) {
auto myDevice = std::make_unique<MyDeviceMock<NEO::AllocationType::externalHostPtr>>(device->getNEODevice(), execEnv);
auto myDevice = std::make_unique<MyDeviceMock<NEO::AllocationType::externalHostPtr>>(device->getNEODevice());
myDevice->neoDevice = device->getNEODevice();
CommandStreamReceiver *csr = neoDevice->getInternalCopyEngine() ? neoDevice->getInternalCopyEngine()->commandStreamReceiver : neoDevice->getInternalEngine().commandStreamReceiver;
ze_command_queue_desc_t desc = {};
@@ -1552,7 +1552,7 @@ HWTEST_F(CommandListCreateWithBcs, givenHostPtrAllocAllocAndImmediateCmdListWhen
}
HWTEST_F(CommandListCreateTests, givenGetAlignedAllocationWhenInternalMemWithinDifferentAllocThenReturnNewAlloc) {
auto myDevice = std::make_unique<MyDeviceMock<NEO::AllocationType::internalHostMemory>>(device->getNEODevice(), execEnv);
auto myDevice = std::make_unique<MyDeviceMock<NEO::AllocationType::internalHostMemory>>(device->getNEODevice());
myDevice->neoDevice = device->getNEODevice();
auto commandList = std::make_unique<WhiteBox<::L0::CommandListCoreFamily<FamilyType::gfxCoreFamily>>>();
commandList->initialize(myDevice.get(), NEO::EngineGroupType::copy, 0u);
@@ -1566,7 +1566,7 @@ HWTEST_F(CommandListCreateTests, givenGetAlignedAllocationWhenInternalMemWithinD
commandList->commandContainer.getDeallocationContainer().clear();
}
HWTEST_F(CommandListCreateTests, givenGetAlignedAllocationWhenExternalMemWithinDifferentAllocThenReturnPreviouslyAllocatedMem) {
auto myDevice = std::make_unique<MyDeviceMock<NEO::AllocationType::externalHostPtr>>(device->getNEODevice(), execEnv);
auto myDevice = std::make_unique<MyDeviceMock<NEO::AllocationType::externalHostPtr>>(device->getNEODevice());
myDevice->neoDevice = device->getNEODevice();
auto commandList = std::make_unique<WhiteBox<::L0::CommandListCoreFamily<FamilyType::gfxCoreFamily>>>();
commandList->initialize(myDevice.get(), NEO::EngineGroupType::copy, 0u);

View File

@@ -61,7 +61,7 @@ using AppendQueryKernelTimestamps = CommandListCreate;
HWTEST_F(AppendQueryKernelTimestamps, givenCommandListWhenAppendQueryKernelTimestampsWithoutOffsetsThenProperBuiltinWasAdded) {
USE_REAL_FILE_SYSTEM();
std::unique_ptr<MockDeviceForSpv<false, false>> testDevice = std::unique_ptr<MockDeviceForSpv<false, false>>(new MockDeviceForSpv<false, false>(device->getNEODevice(), device->getNEODevice()->getExecutionEnvironment(), driverHandle.get()));
std::unique_ptr<MockDeviceForSpv<false, false>> testDevice = std::unique_ptr<MockDeviceForSpv<false, false>>(new MockDeviceForSpv<false, false>(device->getNEODevice(), driverHandle.get()));
testDevice->builtins.reset(new MockBuiltinFunctionsLibImplTimestamps(testDevice.get(), testDevice->getNEODevice()->getBuiltIns()));
testDevice->getBuiltinFunctionsLib()->initBuiltinKernel(L0::Builtin::queryKernelTimestamps);
testDevice->getBuiltinFunctionsLib()->initBuiltinKernel(L0::Builtin::queryKernelTimestampsWithOffsets);
@@ -126,7 +126,7 @@ HWTEST_F(AppendQueryKernelTimestamps, givenCommandListWhenAppendQueryKernelTimes
HWTEST_F(AppendQueryKernelTimestamps, givenCommandListWhenAppendQueryKernelTimestampsWithOffsetsThenProperBuiltinWasAdded) {
USE_REAL_FILE_SYSTEM();
std::unique_ptr<MockDeviceForSpv<false, false>> testDevice = std::unique_ptr<MockDeviceForSpv<false, false>>(new MockDeviceForSpv<false, false>(device->getNEODevice(), device->getNEODevice()->getExecutionEnvironment(), driverHandle.get()));
std::unique_ptr<MockDeviceForSpv<false, false>> testDevice = std::unique_ptr<MockDeviceForSpv<false, false>>(new MockDeviceForSpv<false, false>(device->getNEODevice(), driverHandle.get()));
testDevice->builtins.reset(new MockBuiltinFunctionsLibImplTimestamps(testDevice.get(), testDevice->getNEODevice()->getBuiltIns()));
testDevice->getBuiltinFunctionsLib()->initBuiltinKernel(L0::Builtin::queryKernelTimestamps);
testDevice->getBuiltinFunctionsLib()->initBuiltinKernel(L0::Builtin::queryKernelTimestampsWithOffsets);
@@ -193,7 +193,7 @@ HWTEST_F(AppendQueryKernelTimestamps, givenCommandListWhenAppendQueryKernelTimes
HWTEST_F(AppendQueryKernelTimestamps, givenCommandListWhenAppendQueryKernelTimestampsInUsmHostMemoryWithEventsNumberBiggerThanMaxWorkItemSizeThenProperGroupSizeAndGroupCountIsSet) {
USE_REAL_FILE_SYSTEM();
std::unique_ptr<MockDeviceForSpv<false, false>> testDevice = std::unique_ptr<MockDeviceForSpv<false, false>>(new MockDeviceForSpv<false, false>(device->getNEODevice(), device->getNEODevice()->getExecutionEnvironment(), driverHandle.get()));
std::unique_ptr<MockDeviceForSpv<false, false>> testDevice = std::unique_ptr<MockDeviceForSpv<false, false>>(new MockDeviceForSpv<false, false>(device->getNEODevice(), driverHandle.get()));
testDevice->builtins.reset(new MockBuiltinFunctionsLibImplTimestamps(testDevice.get(), testDevice->getNEODevice()->getBuiltIns()));
testDevice->getBuiltinFunctionsLib()->initBuiltinKernel(L0::Builtin::queryKernelTimestamps);
@@ -252,7 +252,7 @@ HWTEST_F(AppendQueryKernelTimestamps, givenCommandListWhenAppendQueryKernelTimes
HWTEST_F(AppendQueryKernelTimestamps, givenCommandListWhenAppendQueryKernelTimestampsInExternalHostMemoryWithEventsNumberBiggerThanMaxWorkItemSizeThenProperGroupSizeAndGroupCountIsSet) {
USE_REAL_FILE_SYSTEM();
std::unique_ptr<MockDeviceForSpv<false, false>> testDevice = std::unique_ptr<MockDeviceForSpv<false, false>>(new MockDeviceForSpv<false, false>(device->getNEODevice(), device->getNEODevice()->getExecutionEnvironment(), driverHandle.get()));
std::unique_ptr<MockDeviceForSpv<false, false>> testDevice = std::unique_ptr<MockDeviceForSpv<false, false>>(new MockDeviceForSpv<false, false>(device->getNEODevice(), driverHandle.get()));
testDevice->builtins.reset(new MockBuiltinFunctionsLibImplTimestamps(testDevice.get(), testDevice->getNEODevice()->getBuiltIns()));
testDevice->getBuiltinFunctionsLib()->initBuiltinKernel(L0::Builtin::queryKernelTimestamps);
@@ -348,7 +348,6 @@ HWTEST_F(AppendQueryKernelTimestamps, givenCommandListWhenAppendQueryKernelTimes
void initialize(L0::Device *device) {
neoDevice = device->getNEODevice();
neoDevice->incRefInternal();
execEnvironment = device->getExecEnvironment();
driverHandle = device->getDriverHandle();
tmpMockBultinLib = new MockBuiltinFunctionsForQueryKernelTimestamps{this, device->getNEODevice()->getBuiltIns()};
}
@@ -437,7 +436,6 @@ HWTEST_F(AppendQueryKernelTimestamps, givenCommandListWhenAppendQueryKernelTimes
void initialize(L0::Device *device) {
neoDevice = device->getNEODevice();
neoDevice->incRefInternal();
execEnvironment = device->getExecEnvironment();
driverHandle = device->getDriverHandle();
tmpMockBultinLib = new MockBuiltinFunctionsForQueryKernelTimestamps{this, device->getNEODevice()->getBuiltIns()};
}
@@ -532,7 +530,6 @@ HWTEST_F(AppendQueryKernelTimestamps, givenEventWhenAppendQueryIsCalledThenSetAl
void initialize(L0::Device *device) {
neoDevice = device->getNEODevice();
neoDevice->incRefInternal();
execEnvironment = device->getExecEnvironment();
driverHandle = device->getDriverHandle();
tmpMockBultinLib = std::make_unique<MockBuiltinFunctionsForQueryKernelTimestamps>(this, device->getNEODevice()->getBuiltIns());
}
@@ -3397,7 +3394,7 @@ HWTEST2_F(CommandListStateBaseAddressPrivateHeapTest,
DebugManagerStateRestore restorer;
debugManager.flags.ContextGroupSize.set(0);
NEO::MockDevice *mockNeoDevice(NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(NEO::defaultHwInfo.get(), 0));
MockDeviceImp l0Device(mockNeoDevice, mockNeoDevice->getExecutionEnvironment());
MockDeviceImp l0Device(mockNeoDevice);
auto &csr = mockNeoDevice->getUltCommandStreamReceiver<FamilyType>();
auto &csrStream = csr.commandStream;

View File

@@ -2962,7 +2962,7 @@ HWTEST2_F(ContextGroupStateBaseAddressGlobalStatelessTest,
auto neoDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo);
MockDeviceImp l0Device(neoDevice, neoDevice->getExecutionEnvironment());
MockDeviceImp l0Device(neoDevice);
l0Device.setDriverHandle(device->getDriverHandle());
auto defaultCsr = neoDevice->getDefaultEngine().commandStreamReceiver;

View File

@@ -241,7 +241,7 @@ TEST_F(CommandListCreate, givenRootDeviceAndImplicitScalingDisabledWhenCreatingC
subDevice0.getRegularEngineGroups().back().engines.resize(1);
subDevice0.getRegularEngineGroups().back().engines[0].commandStreamReceiver = &rootDevice.getGpgpuCommandStreamReceiver();
auto ordinal = static_cast<uint32_t>(subDevice0.getRegularEngineGroups().size() - 1);
MockDeviceImp l0RootDevice(&rootDevice, rootDevice.getExecutionEnvironment());
MockDeviceImp l0RootDevice(&rootDevice);
ze_command_list_handle_t commandList = nullptr;
ze_command_list_desc_t cmdDesc = {ZE_STRUCTURE_TYPE_COMMAND_LIST_DESC};

View File

@@ -93,7 +93,7 @@ HWTEST_F(ContextCreateCommandQueueTest, givenRootDeviceAndImplicitScalingDisable
subDevice0.getRegularEngineGroups().back().engines.resize(1);
subDevice0.getRegularEngineGroups().back().engines[0].commandStreamReceiver = &rootDevice.getGpgpuCommandStreamReceiver();
auto ordinal = static_cast<uint32_t>(subDevice0.getRegularEngineGroups().size() - 1);
MockDeviceImp l0RootDevice(&rootDevice, rootDevice.getExecutionEnvironment());
MockDeviceImp l0RootDevice(&rootDevice);
l0RootDevice.driverHandle = driverHandle.get();
@@ -870,7 +870,7 @@ HWTEST2_F(CommandQueueScratchTests, givenCommandQueueWhenHandleScratchSpaceThenP
csr.initializeTagAllocation();
csr.setupContext(*neoDevice->getDefaultEngine().osContext);
NEO::ExecutionEnvironment *execEnv = static_cast<NEO::ExecutionEnvironment *>(device->getExecEnvironment());
NEO::ExecutionEnvironment *execEnv = neoDevice->getExecutionEnvironment();
std::unique_ptr<ScratchSpaceController> scratchController = std::make_unique<MockScratchSpaceControllerXeHPAndLater>(device->getRootDeviceIndex(),
*execEnv,
*csr.getInternalAllocationStorage());
@@ -927,7 +927,7 @@ HWTEST2_F(CommandQueueScratchTests, givenCommandQueueWhenHandleScratchSpaceAndHe
csr.initializeTagAllocation();
csr.setupContext(*neoDevice->getDefaultEngine().osContext);
NEO::ExecutionEnvironment *execEnv = static_cast<NEO::ExecutionEnvironment *>(device->getExecEnvironment());
NEO::ExecutionEnvironment *execEnv = neoDevice->getExecutionEnvironment();
std::unique_ptr<ScratchSpaceController> scratchController = std::make_unique<MockScratchSpaceControllerXeHPAndLater>(device->getRootDeviceIndex(),
*execEnv,
*csr.getInternalAllocationStorage());

View File

@@ -549,7 +549,7 @@ HWTEST2_F(CommandQueueExecuteCommandListsImplicitScalingDisabled, givenCommandLi
MockCsr *pMockCsr = new MockCsr{*pNeoDevice->getExecutionEnvironment(), pNeoDevice->getRootDeviceIndex(), pNeoDevice->getDeviceBitfield()};
pNeoDevice->resetCommandStreamReceiver(pMockCsr);
MockDeviceImp device{pNeoDevice, pNeoDevice->getExecutionEnvironment()};
MockDeviceImp device{pNeoDevice};
auto pCommandQueue = new MockCommandQueueHw<FamilyType::gfxCoreFamily>{&device, pMockCsr, &desc};
pCommandQueue->initialize(false, false, false);

View File

@@ -906,7 +906,7 @@ TEST_F(DeviceTest, whenCreatingDeviceThenCreateInOrderCounterAllocatorOnDemandAn
auto hostAllocator = new MockHostTagAllocator(0, neoMockDevice->getMemoryManager(), destructorId);
auto tsAllocator = new MockTsAllocator(0, neoMockDevice->getMemoryManager(), destructorId);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
deviceImp.deviceInOrderCounterAllocator.reset(deviceAllocator);
deviceImp.hostInOrderCounterAllocator.reset(hostAllocator);
deviceImp.inOrderTimestampAllocator.reset(tsAllocator);
@@ -926,7 +926,7 @@ HWTEST_F(DeviceTest, givenTsAllocatorWhenGettingNewTagThenDoInitialize) {
auto *neoMockDevice = new NEO::MockDevice(executionEnvironment, rootDeviceIndex);
neoMockDevice->createDeviceImpl();
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
auto allocator = deviceImp.getInOrderTimestampAllocator();
@@ -1058,7 +1058,7 @@ HWTEST2_F(DeviceTest, givenAllThreadArbitrationPoliciesWhenPassingSchedulingHint
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo,
rootDeviceIndex);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
NEO::RAIIProductHelperFactory<MockProductHelperHw<productFamily>> raii(*neoMockDevice->getExecutionEnvironment()->rootDeviceEnvironments[0]);
raii.mockProductHelper->threadArbPolicies = {ThreadArbitrationPolicy::AgeBased,
@@ -1089,7 +1089,7 @@ HWTEST2_F(DeviceTest, givenIncorrectThreadArbitrationPolicyWhenPassingScheduling
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo,
rootDeviceIndex);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
NEO::RAIIProductHelperFactory<MockProductHelperHw<productFamily>> raii(*neoMockDevice->getExecutionEnvironment()->rootDeviceEnvironments[0]);
raii.mockProductHelper->threadArbPolicies = {ThreadArbitrationPolicy::NotPresent};
@@ -3734,7 +3734,7 @@ TEST_F(MultipleDevicesDisabledImplicitScalingTest, givenQueryPeerStatsCalledThen
TEST_F(MultipleDevicesTest, givenDeviceFailsAppendMemoryCopyThenCanAccessPeerReturnsFalse) {
struct MockDeviceFail : public MockDeviceImp {
MockDeviceFail(L0::Device *device) : MockDeviceImp(device->getNEODevice(), static_cast<NEO::ExecutionEnvironment *>(device->getExecEnvironment())) {
MockDeviceFail(L0::Device *device) : MockDeviceImp(device->getNEODevice()) {
this->driverHandle = device->getDriverHandle();
this->commandList.appendMemoryCopyResult = ZE_RESULT_ERROR_UNKNOWN;
}
@@ -3796,7 +3796,7 @@ TEST_F(MultipleDevicesTest, givenDeviceFailsExecuteCommandListThenCanAccessPeerR
override { return ZE_RESULT_ERROR_UNKNOWN; }
};
MockDeviceFail(L0::Device *device) : MockDeviceImp(device->getNEODevice(), static_cast<NEO::ExecutionEnvironment *>(device->getExecEnvironment())) {
MockDeviceFail(L0::Device *device) : MockDeviceImp(device->getNEODevice()) {
this->driverHandle = device->getDriverHandle();
}
@@ -3856,7 +3856,7 @@ TEST_F(MultipleDevicesTest, givenQueryPeerStatsReturningBandwidthZeroAndDeviceFa
override { return ZE_RESULT_ERROR_UNKNOWN; }
};
MockDeviceFail(L0::Device *device) : MockDeviceImp(device->getNEODevice(), static_cast<NEO::ExecutionEnvironment *>(device->getExecEnvironment())) {
MockDeviceFail(L0::Device *device) : MockDeviceImp(device->getNEODevice()) {
this->driverHandle = device->getDriverHandle();
}
@@ -3918,7 +3918,7 @@ TEST_F(MultipleDevicesTest, givenQueryPeerStatsReturningBandwidthNonZeroAndDevic
}
};
MockDeviceFail(L0::Device *device) : MockDeviceImp(device->getNEODevice(), static_cast<NEO::ExecutionEnvironment *>(device->getExecEnvironment())) {
MockDeviceFail(L0::Device *device) : MockDeviceImp(device->getNEODevice()) {
this->driverHandle = device->getDriverHandle();
}
@@ -4726,7 +4726,7 @@ HWTEST_F(DeviceTest, givenCooperativeDispatchSupportedWhenQueryingPropertiesFlag
hwInfo.capabilityTable.defaultEngineType = aub_stream::ENGINE_CCS;
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo,
rootDeviceIndex);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
MockExecutionEnvironment mockExecutionEnvironment{&hwInfo};
RAIIGfxCoreHelperFactory<MockGfxCoreHelper> raii(*neoMockDevice->executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]);
@@ -4803,7 +4803,7 @@ HWTEST_F(DeviceTest, givenContextGroupSupportedWhenGettingLowPriorityCsrThenCorr
{
MockExecutionEnvironment *executionEnvironment = new MockExecutionEnvironment{&hwInfo};
auto *neoMockDevice = NEO::MockDevice::createWithExecutionEnvironment<NEO::MockDevice>(&hwInfo, executionEnvironment, rootDeviceIndex);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
NEO::CommandStreamReceiver *lowPriorityCsr = nullptr;
auto result = deviceImp.getCsrForLowPriority(&lowPriorityCsr, false);
@@ -4887,7 +4887,7 @@ HWTEST_F(DeviceTest, givenContextGroupSupportedWhenGettingHighPriorityCsrThenCor
{
MockExecutionEnvironment *executionEnvironment = new MockExecutionEnvironment{&hwInfo};
auto *neoMockDevice = NEO::MockDevice::createWithExecutionEnvironment<NEO::MockDevice>(&hwInfo, executionEnvironment, rootDeviceIndex);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
NEO::CommandStreamReceiver *highPriorityCsr = nullptr;
NEO::CommandStreamReceiver *highPriorityCsr2 = nullptr;
@@ -5043,7 +5043,7 @@ HWTEST2_F(DeviceTest, givenHpCopyEngineWhenGettingHighPriorityCsrThenCorrectCsrA
{
MockExecutionEnvironment *executionEnvironment = new MockExecutionEnvironment{&hwInfo};
auto *neoMockDevice = NEO::MockDevice::createWithExecutionEnvironment<NEO::MockDevice>(&hwInfo, executionEnvironment, rootDeviceIndex);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
NEO::CommandStreamReceiver *highPriorityCsr = nullptr;
@@ -6701,7 +6701,7 @@ class Mock2DTransposeDevice : public MockDeviceImp {
TEST(ExtensionLookupTest, given2DBlockLoadFalseAnd2DBlockStoreFalseThenFlagsIndicateSupportsNeither) {
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(defaultHwInfo.get(), 0);
Mock2DTransposeDevice<false, false> deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
Mock2DTransposeDevice<false, false> deviceImp(neoMockDevice);
ze_device_properties_t deviceProps = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES};
ze_intel_device_block_array_exp_properties_t blockArrayProps = {ZE_INTEL_DEVICE_BLOCK_ARRAY_EXP_PROPERTIES};
@@ -6716,7 +6716,7 @@ TEST(ExtensionLookupTest, given2DBlockLoadFalseAnd2DBlockStoreFalseThenFlagsIndi
TEST(ExtensionLookupTest, given2DBlockLoadTrueAnd2DBlockStoreFalseThenFlagsIndicateSupportLoad) {
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(defaultHwInfo.get(), 0);
Mock2DTransposeDevice<true, false> deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
Mock2DTransposeDevice<true, false> deviceImp(neoMockDevice);
ze_device_properties_t deviceProps = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES};
ze_intel_device_block_array_exp_properties_t blockArrayProps = {ZE_INTEL_DEVICE_BLOCK_ARRAY_EXP_PROPERTIES};
@@ -6731,7 +6731,7 @@ TEST(ExtensionLookupTest, given2DBlockLoadTrueAnd2DBlockStoreFalseThenFlagsIndic
TEST(ExtensionLookupTest, given2DBlockLoadFalseAnd2DBlockStoreTrueThenFlagsIndicateSupportStore) {
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(defaultHwInfo.get(), 0);
Mock2DTransposeDevice<false, true> deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
Mock2DTransposeDevice<false, true> deviceImp(neoMockDevice);
ze_device_properties_t deviceProps = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES};
ze_intel_device_block_array_exp_properties_t blockArrayProps = {ZE_INTEL_DEVICE_BLOCK_ARRAY_EXP_PROPERTIES};
@@ -6746,7 +6746,7 @@ TEST(ExtensionLookupTest, given2DBlockLoadFalseAnd2DBlockStoreTrueThenFlagsIndic
TEST(ExtensionLookupTest, given2DBlockLoadTrueAnd2DBlockStoreTrueThenFlagsIndicateSupportBoth) {
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(defaultHwInfo.get(), 0);
Mock2DTransposeDevice<true, true> deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
Mock2DTransposeDevice<true, true> deviceImp(neoMockDevice);
ze_device_properties_t deviceProps = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES};
ze_intel_device_block_array_exp_properties_t blockArrayProps = {ZE_INTEL_DEVICE_BLOCK_ARRAY_EXP_PROPERTIES};

View File

@@ -3845,7 +3845,7 @@ HWTEST_F(PrintfHandlerTests, givenKernelWithPrintfWhenPrintingOutputWithBlitterU
auto device = std::unique_ptr<NEO::MockDevice>(NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo, 0));
{
device->incRefInternal();
MockDeviceImp deviceImp(device.get(), device->getExecutionEnvironment());
MockDeviceImp deviceImp(device.get());
auto kernelInfo = std::make_unique<KernelInfo>();
kernelInfo->heapInfo.kernelHeapSize = 1;
@@ -3905,7 +3905,7 @@ HWTEST_F(PrintfHandlerTests, givenPrintDebugMessagesAndKernelWithPrintfWhenBlitt
GTEST_SKIP();
}
device->incRefInternal();
MockDeviceImp deviceImp(device.get(), device->getExecutionEnvironment());
MockDeviceImp deviceImp(device.get());
auto bcsCsr = static_cast<UltCommandStreamReceiver<FamilyType> *>(bcsEngine->commandStreamReceiver);
bcsCsr->callBaseFlushBcsTask = false;
@@ -4343,7 +4343,7 @@ TEST(KernelImmutableDataTest, givenBindlessKernelWhenInitializingImmDataThenSshT
auto device = std::unique_ptr<NEO::MockDevice>(NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo, 0));
{
device->incRefInternal();
MockDeviceImp deviceImp(device.get(), device->getExecutionEnvironment());
MockDeviceImp deviceImp(device.get());
auto kernelInfo = std::make_unique<KernelInfo>();
kernelInfo->heapInfo.kernelHeapSize = 1;

View File

@@ -592,7 +592,7 @@ HWTEST2_F(KernelImmutableDataBindlessTest, givenGlobalConstBufferAndBindlessExpl
{
device->incRefInternal();
MockDeviceImp deviceImp(device.get(), device->getExecutionEnvironment());
MockDeviceImp deviceImp(device.get());
uint64_t gpuAddress = 0x1200;
void *buffer = reinterpret_cast<void *>(gpuAddress);
@@ -662,7 +662,7 @@ HWTEST2_F(KernelImmutableDataBindlessTest, givenGlobalVarBufferAndBindlessExplic
{
device->incRefInternal();
MockDeviceImp deviceImp(device.get(), device->getExecutionEnvironment());
MockDeviceImp deviceImp(device.get());
uint64_t gpuAddress = 0x1200;
void *buffer = reinterpret_cast<void *>(gpuAddress);
@@ -736,7 +736,7 @@ HWTEST2_F(KernelImmutableDataBindlessTest, givenGlobalConstBufferAndBindlessExpl
{
device->incRefInternal();
MockDeviceImp deviceImp(device.get(), device->getExecutionEnvironment());
MockDeviceImp deviceImp(device.get());
uint64_t gpuAddress = 0x1200;
void *buffer = reinterpret_cast<void *>(gpuAddress);
@@ -821,7 +821,7 @@ HWTEST2_F(KernelImmutableDataBindlessTest, givenGlobalVarBufferAndBindlessExplic
{
device->incRefInternal();
MockDeviceImp deviceImp(device.get(), device->getExecutionEnvironment());
MockDeviceImp deviceImp(device.get());
uint64_t gpuAddress = 0x1200;
void *buffer = reinterpret_cast<void *>(gpuAddress);

View File

@@ -266,7 +266,7 @@ HWTEST_F(ModuleTest, givenBlitterAvailableWhenCopyingPatchedSegmentsThenIsaIsTra
&NEO::BlitHelperFunctions::blitMemoryToAllocation, mockBlitMemoryToAllocation);
auto *neoMockDevice = NEO::MockDevice::createWithExecutionEnvironment<NEO::MockDevice>(&hwInfo, executionEnvironment, 0);
MockDeviceImp device(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp device(neoMockDevice);
device.driverHandle = driverHandle.get();
auto zebinData = std::make_unique<ZebinTestData::ZebinWithL0TestCommonModule>(device.getHwInfo());

View File

@@ -88,7 +88,7 @@ TEST(ModuleDestroyTest, givenIsaAllocationWhenIsModuleDestroyedThenRequireInstru
auto mockCommandStreamReceiver = static_cast<MockCommandStreamReceiver *>(&neoMockDevice->getGpgpuCommandStreamReceiver());
mockCommandStreamReceiver->makeResidentParentCall = true;
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
auto module = new MockModule{&deviceImp, nullptr, ModuleType::user};
module->translationUnit.reset(new MockModuleTranslationUnit{&deviceImp});
@@ -118,7 +118,7 @@ TEST(ModuleDestroyTest, givenKernelImmutableDataWithNullIsaAllocationWhenIsModul
auto mockCommandStreamReceiver = static_cast<MockCommandStreamReceiver *>(&neoMockDevice->getGpgpuCommandStreamReceiver());
mockCommandStreamReceiver->makeResidentParentCall = true;
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
auto module = new MockModule{&deviceImp, nullptr, ModuleType::user};
module->translationUnit.reset(new MockModuleTranslationUnit{&deviceImp});

View File

@@ -16,7 +16,7 @@ namespace ult {
TEST(PrintfHandler, whenPrintfBufferIscreatedThenCorrectAllocationTypeIsUsed) {
NEO::Device *neoDevice(NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(NEO::defaultHwInfo.get(), 0));
MockDeviceImp l0Device(neoDevice, neoDevice->getExecutionEnvironment());
MockDeviceImp l0Device(neoDevice);
auto allocation = PrintfHandler::createPrintfBuffer(&l0Device);
EXPECT_EQ(NEO::AllocationType::printfSurface, allocation->getAllocationType());

View File

@@ -46,7 +46,7 @@ class DrmSemaphoreFixture : public DeviceFixture {
using DrmExternalSemaphoreTest = Test<DrmSemaphoreFixture>;
HWTEST_F(DrmExternalSemaphoreTest, givenDriverModelDrmWhenImportExternalSemaphoreExpIsCalledThenUnsupportedFeatureIsReturned) {
MockDeviceImp l0Device(neoDevice, neoDevice->getExecutionEnvironment());
MockDeviceImp l0Device(neoDevice);
ze_external_semaphore_ext_desc_t desc = {};
ze_external_semaphore_ext_handle_t hSemaphore;
int fd = 0;

View File

@@ -125,7 +125,7 @@ using MockDriverHandleImp = Mock<L0::DriverHandleImp>;
HWTEST_F(ExternalSemaphoreTest, givenImmediateCommandListWhenAppendSignalExternalSemaphoresExpIsCalledThenSuccessIsReturned) {
auto externalSemaphore = std::make_unique<ExternalSemaphoreImp>();
auto mockMemoryManager = std::make_unique<MockMemoryManager>();
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice, neoDevice->getExecutionEnvironment());
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice);
auto driverHandleImp = std::make_unique<MockDriverHandleImp>();
driverHandleImp->setMemoryManager(mockMemoryManager.get());
@@ -155,7 +155,7 @@ HWTEST_F(ExternalSemaphoreTest, givenImmediateCommandListWhenAppendSignalExterna
HWTEST_F(ExternalSemaphoreTest, givenAppendWaitOnEventFailsWhenAppendSignalExternalSemaphoresExpIsCalledThenErrorIsReturned) {
auto externalSemaphore = std::make_unique<ExternalSemaphoreImp>();
auto mockMemoryManager = std::make_unique<MockMemoryManager>();
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice, neoDevice->getExecutionEnvironment());
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice);
auto driverHandleImp = std::make_unique<MockDriverHandleImp>();
driverHandleImp->setMemoryManager(mockMemoryManager.get());
@@ -187,7 +187,7 @@ HWTEST_F(ExternalSemaphoreTest, givenAppendWaitOnEventFailsWhenAppendSignalExter
HWTEST_F(ExternalSemaphoreTest, givenAppendSignalInternalProxyEventFailsWhenAppendSignalExternalSemaphoresExpIsCalledThenErrorIsReturned) {
auto externalSemaphore = std::make_unique<ExternalSemaphoreImp>();
auto mockMemoryManager = std::make_unique<MockMemoryManager>();
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice, neoDevice->getExecutionEnvironment());
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice);
auto driverHandleImp = std::make_unique<MockDriverHandleImp>();
driverHandleImp->setMemoryManager(mockMemoryManager.get());
@@ -218,7 +218,7 @@ HWTEST_F(ExternalSemaphoreTest, givenAppendSignalInternalProxyEventFailsWhenAppe
HWTEST_F(ExternalSemaphoreTest, givenAppendSignalEventFailsWhenAppendSignalExternalSemaphoresExpIsCalledThenErrorIsReturned) {
auto externalSemaphore = std::make_unique<ExternalSemaphoreImp>();
auto mockMemoryManager = std::make_unique<MockMemoryManager>();
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice, neoDevice->getExecutionEnvironment());
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice);
auto driverHandleImp = std::make_unique<MockDriverHandleImp>();
driverHandleImp->setMemoryManager(mockMemoryManager.get());
@@ -254,7 +254,7 @@ HWTEST_F(ExternalSemaphoreTest, givenFailingMemoryManagerWhenAppendSignalExterna
auto externalSemaphore = std::make_unique<ExternalSemaphoreImp>();
auto failMemoryManager = std::make_unique<FailMemoryManager>();
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice, neoDevice->getExecutionEnvironment());
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice);
auto driverHandleImp = std::make_unique<MockDriverHandleImp>();
driverHandleImp->setMemoryManager(failMemoryManager.get());
@@ -284,7 +284,7 @@ HWTEST_F(ExternalSemaphoreTest, givenFailingMemoryManagerWhenAppendSignalExterna
HWTEST_F(ExternalSemaphoreTest, givenImmediateCommandListWhenAppendWaitExternalSemaphoresExpIsCalledThenSuccessIsReturned) {
auto externalSemaphore = std::make_unique<ExternalSemaphoreImp>();
auto mockMemoryManager = std::make_unique<MockMemoryManager>();
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice, neoDevice->getExecutionEnvironment());
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice);
auto driverHandleImp = std::make_unique<MockDriverHandleImp>();
driverHandleImp->setMemoryManager(mockMemoryManager.get());
@@ -313,7 +313,7 @@ HWTEST_F(ExternalSemaphoreTest, givenImmediateCommandListWhenAppendWaitExternalS
HWTEST_F(ExternalSemaphoreTest, givenAppendWaitOnEventFailsWhenAppendWaitExternalSemaphoresExpIsCalledThenErrorIsReturned) {
auto externalSemaphore = std::make_unique<ExternalSemaphoreImp>();
auto mockMemoryManager = std::make_unique<MockMemoryManager>();
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice, neoDevice->getExecutionEnvironment());
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice);
auto driverHandleImp = std::make_unique<MockDriverHandleImp>();
driverHandleImp->setMemoryManager(mockMemoryManager.get());
@@ -343,7 +343,7 @@ HWTEST_F(ExternalSemaphoreTest, givenAppendWaitOnEventFailsWhenAppendWaitExterna
HWTEST_F(ExternalSemaphoreTest, givenAppendWaitOnInternalProxyEventFailsWhenAppendWaitExternalSemaphoresExpIsCalledThenErrorIsReturned) {
auto externalSemaphore = std::make_unique<ExternalSemaphoreImp>();
auto mockMemoryManager = std::make_unique<MockMemoryManager>();
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice, neoDevice->getExecutionEnvironment());
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice);
auto driverHandleImp = std::make_unique<MockDriverHandleImp>();
driverHandleImp->setMemoryManager(mockMemoryManager.get());
@@ -373,7 +373,7 @@ HWTEST_F(ExternalSemaphoreTest, givenAppendWaitOnInternalProxyEventFailsWhenAppe
HWTEST_F(ExternalSemaphoreTest, givenAppendSignalEventFailsWhenAppendWaitExternalSemaphoresExpIsCalledThenErrorIsReturned) {
auto externalSemaphore = std::make_unique<ExternalSemaphoreImp>();
auto mockMemoryManager = std::make_unique<MockMemoryManager>();
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice, neoDevice->getExecutionEnvironment());
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice);
auto driverHandleImp = std::make_unique<MockDriverHandleImp>();
driverHandleImp->setMemoryManager(mockMemoryManager.get());
@@ -408,7 +408,7 @@ HWTEST_F(ExternalSemaphoreTest, givenFailingMemoryManagerWhenAppendWaitExternalS
auto externalSemaphore = std::make_unique<ExternalSemaphoreImp>();
auto failMemoryManager = std::make_unique<FailMemoryManager>();
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice, neoDevice->getExecutionEnvironment());
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice);
auto driverHandleImp = std::make_unique<MockDriverHandleImp>();
driverHandleImp->setMemoryManager(failMemoryManager.get());
@@ -440,7 +440,7 @@ HWTEST_F(ExternalSemaphoreTest, givenExternalSemaphoreControllerWhenAllocateProx
auto externalSemaphore2 = std::make_unique<ExternalSemaphoreImp>();
auto mockMemoryManager = std::make_unique<MockMemoryManager>();
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice, neoDevice->getExecutionEnvironment());
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice);
auto driverHandleImp = std::make_unique<MockDriverHandleImp>();
driverHandleImp->setMemoryManager(mockMemoryManager.get());
l0Device->setDriverHandle(driverHandleImp.get());
@@ -465,7 +465,7 @@ HWTEST_F(ExternalSemaphoreTest, givenMaxEventsInPoolCreatedWhenAllocateProxyEven
auto externalSemaphore1 = std::make_unique<ExternalSemaphoreImp>();
auto externalSemaphore2 = std::make_unique<ExternalSemaphoreImp>();
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice, neoDevice->getExecutionEnvironment());
auto l0Device = std::make_unique<MockDeviceImp>(neoDevice);
auto mockMemoryManager = std::make_unique<MockMemoryManager>();
auto driverHandleImp = std::make_unique<MockDriverHandleImp>();
driverHandleImp->setMemoryManager(mockMemoryManager.get());

View File

@@ -55,7 +55,7 @@ HWTEST2_F(CommandQueueGroupTest, givenNoBlitterSupportAndNoCCSThenOneQueueGroupI
hwInfo.featureTable.flags.ftrCCSNode = false;
hwInfo.capabilityTable.blitterOperationsSupported = false;
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo, rootDeviceIndex);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
uint32_t count = 0;
ze_result_t res = deviceImp.getCommandQueueGroupProperties(&count, nullptr);
@@ -69,7 +69,7 @@ HWTEST2_F(CommandQueueGroupTest, givenNoBlitterSupportAndCCSThenTwoQueueGroupsAr
hwInfo.featureTable.flags.ftrCCSNode = true;
hwInfo.capabilityTable.blitterOperationsSupported = false;
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo, rootDeviceIndex);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
uint32_t count = 0;
ze_result_t res = deviceImp.getCommandQueueGroupProperties(&count, nullptr);
@@ -84,7 +84,7 @@ HWTEST2_F(CommandQueueGroupTest, givenBlitterSupportAndCCSThenFourQueueGroupsAre
hwInfo.capabilityTable.blitterOperationsSupported = true;
hwInfo.featureTable.ftrBcsInfo.set();
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo, rootDeviceIndex);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
uint32_t count = 0;
ze_result_t res = deviceImp.getCommandQueueGroupProperties(&count, nullptr);
@@ -130,7 +130,7 @@ HWTEST2_F(CommandQueueGroupTest, givenBlitterSupportCCSAndLinkedBcsDisabledThenT
hwInfo.capabilityTable.blitterOperationsSupported = true;
hwInfo.featureTable.ftrBcsInfo.set(0);
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo, rootDeviceIndex);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
uint32_t count = 0;
ze_result_t res = deviceImp.getCommandQueueGroupProperties(&count, nullptr);
@@ -173,7 +173,7 @@ HWTEST2_F(CommandQueueGroupTest, givenBlitterDisabledAndAllBcsSetThenTwoQueueGro
hwInfo.featureTable.flags.ftrCCSNode = true;
hwInfo.featureTable.ftrBcsInfo.set();
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo, rootDeviceIndex);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
uint32_t count = 0;
ze_result_t res = deviceImp.getCommandQueueGroupProperties(&count, nullptr);
@@ -205,7 +205,7 @@ HWTEST2_F(DeviceCopyQueueGroupXe2HpgCoreTest,
hwInfo.featureTable.ftrBcsInfo.set(0);
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo,
rootDeviceIndex);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
uint32_t count = 0;
ze_result_t res = deviceImp.getCommandQueueGroupProperties(&count, nullptr);
@@ -239,7 +239,7 @@ HWTEST2_P(CommandQueueGroupTestXe2HpgCore, givenVaryingBlitterSupportAndCCSThenB
hwInfo.featureTable.ftrBcsInfo = maxNBitValue(2);
hwInfo.featureTable.ftrBcsInfo.set(GetParam());
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo, rootDeviceIndex);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
uint32_t count = 0;
ze_result_t res = deviceImp.getCommandQueueGroupProperties(&count, nullptr);

View File

@@ -60,7 +60,7 @@ XE2_HPG_CORETEST_F(Xe2KernelSetupTests, givenParamsWhenSetupGroupSizeThenNumThre
{
NEO::Device *mockNeoDevice(NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(NEO::defaultHwInfo.get(), 0));
MockDeviceImp l0Device(mockNeoDevice, mockNeoDevice->getExecutionEnvironment());
MockDeviceImp l0Device(mockNeoDevice);
Mock<KernelImp> kernel;
kernel.descriptor.kernelAttributes.numGrfRequired = GrfConfig::defaultGrfNumber;
@@ -83,7 +83,7 @@ XE2_HPG_CORETEST_F(Xe2KernelSetupTests, givenParamsWhenSetupGroupSizeThenNumThre
}
{
NEO::Device *mockNeoDevice(NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(NEO::defaultHwInfo.get(), 0));
MockDeviceImp l0Device(mockNeoDevice, mockNeoDevice->getExecutionEnvironment());
MockDeviceImp l0Device(mockNeoDevice);
Mock<KernelImp> kernel;
kernel.descriptor.kernelAttributes.numGrfRequired = GrfConfig::largeGrfNumber;

View File

@@ -40,7 +40,7 @@ HWTEST2_F(CommandQueueGroupTest, givenNoBlitterSupportAndNoCCSThenOneQueueGroupI
hwInfo.featureTable.flags.ftrCCSNode = false;
hwInfo.capabilityTable.blitterOperationsSupported = false;
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo, rootDeviceIndex);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
uint32_t count = 0;
ze_result_t res = deviceImp.getCommandQueueGroupProperties(&count, nullptr);
@@ -54,7 +54,7 @@ HWTEST2_F(CommandQueueGroupTest, givenNoBlitterSupportAndCCSThenTwoQueueGroupsAr
hwInfo.featureTable.flags.ftrCCSNode = true;
hwInfo.capabilityTable.blitterOperationsSupported = false;
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo, rootDeviceIndex);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
uint32_t count = 0;
ze_result_t res = deviceImp.getCommandQueueGroupProperties(&count, nullptr);
@@ -69,7 +69,7 @@ HWTEST2_F(CommandQueueGroupTest, givenBlitterSupportAndCCSThenFourQueueGroupsAre
hwInfo.capabilityTable.blitterOperationsSupported = true;
hwInfo.featureTable.ftrBcsInfo.set();
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo, rootDeviceIndex);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
uint32_t count = 0;
ze_result_t res = deviceImp.getCommandQueueGroupProperties(&count, nullptr);
@@ -115,7 +115,7 @@ HWTEST2_F(CommandQueueGroupTest, givenBlitterSupportCCSAndLinkedBcsDisabledThenT
hwInfo.capabilityTable.blitterOperationsSupported = true;
hwInfo.featureTable.ftrBcsInfo.set(0);
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo, rootDeviceIndex);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
uint32_t count = 0;
ze_result_t res = deviceImp.getCommandQueueGroupProperties(&count, nullptr);
@@ -158,7 +158,7 @@ HWTEST2_F(CommandQueueGroupTest, givenBlitterDisabledAndAllBcsSetThenTwoQueueGro
hwInfo.featureTable.flags.ftrCCSNode = true;
hwInfo.featureTable.ftrBcsInfo.set();
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo, rootDeviceIndex);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
uint32_t count = 0;
ze_result_t res = deviceImp.getCommandQueueGroupProperties(&count, nullptr);
@@ -190,7 +190,7 @@ HWTEST2_F(DeviceCopyQueueGroupXe3CoreTest,
hwInfo.featureTable.ftrBcsInfo.set(0);
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo,
rootDeviceIndex);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
uint32_t count = 0;
ze_result_t res = deviceImp.getCommandQueueGroupProperties(&count, nullptr);
@@ -224,7 +224,7 @@ HWTEST2_P(CommandQueueGroupTestXe3Core, givenVaryingBlitterSupportAndCCSThenBCSG
hwInfo.featureTable.ftrBcsInfo = maxNBitValue(2);
hwInfo.featureTable.ftrBcsInfo.set(GetParam());
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo, rootDeviceIndex);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
uint32_t count = 0;
ze_result_t res = deviceImp.getCommandQueueGroupProperties(&count, nullptr);

View File

@@ -61,7 +61,7 @@ XE3_CORETEST_F(Xe3KernelSetupTests, givenParamsWhenSetupGroupSizeThenNumThreadsP
{
NEO::Device *mockNeoDevice(NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(NEO::defaultHwInfo.get(), 0));
MockDeviceImp l0Device(mockNeoDevice, mockNeoDevice->getExecutionEnvironment());
MockDeviceImp l0Device(mockNeoDevice);
Mock<KernelImp> kernel;
kernel.descriptor.kernelAttributes.numGrfRequired = 128u;
@@ -85,7 +85,7 @@ XE3_CORETEST_F(Xe3KernelSetupTests, givenParamsWhenSetupGroupSizeThenNumThreadsP
}
{
NEO::Device *mockNeoDevice(NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(NEO::defaultHwInfo.get(), 0));
MockDeviceImp l0Device(mockNeoDevice, mockNeoDevice->getExecutionEnvironment());
MockDeviceImp l0Device(mockNeoDevice);
Mock<KernelImp> kernel;
kernel.descriptor.kernelAttributes.numGrfRequired = 160u;
@@ -108,7 +108,7 @@ XE3_CORETEST_F(Xe3KernelSetupTests, givenParamsWhenSetupGroupSizeThenNumThreadsP
}
{
NEO::Device *mockNeoDevice(NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(NEO::defaultHwInfo.get(), 0));
MockDeviceImp l0Device(mockNeoDevice, mockNeoDevice->getExecutionEnvironment());
MockDeviceImp l0Device(mockNeoDevice);
Mock<KernelImp> kernel;
kernel.descriptor.kernelAttributes.numGrfRequired = 192u;
@@ -131,7 +131,7 @@ XE3_CORETEST_F(Xe3KernelSetupTests, givenParamsWhenSetupGroupSizeThenNumThreadsP
}
{
NEO::Device *mockNeoDevice(NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(NEO::defaultHwInfo.get(), 0));
MockDeviceImp l0Device(mockNeoDevice, mockNeoDevice->getExecutionEnvironment());
MockDeviceImp l0Device(mockNeoDevice);
Mock<KernelImp> kernel;
kernel.descriptor.kernelAttributes.numGrfRequired = 256u;
@@ -154,7 +154,7 @@ XE3_CORETEST_F(Xe3KernelSetupTests, givenParamsWhenSetupGroupSizeThenNumThreadsP
}
{
NEO::Device *mockNeoDevice(NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(NEO::defaultHwInfo.get(), 0));
MockDeviceImp l0Device(mockNeoDevice, mockNeoDevice->getExecutionEnvironment());
MockDeviceImp l0Device(mockNeoDevice);
Mock<KernelImp> kernel;
kernel.descriptor.kernelAttributes.numGrfRequired = 512u;

View File

@@ -445,7 +445,7 @@ HWTEST2_F(CommandQueueGroupTest, givenNoBlitterSupportAndNoCCSThenOneQueueGroupI
hwInfo.featureTable.flags.ftrCCSNode = false;
hwInfo.capabilityTable.blitterOperationsSupported = false;
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo, rootDeviceIndex);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
uint32_t count = 0;
ze_result_t res = deviceImp.getCommandQueueGroupProperties(&count, nullptr);
@@ -459,7 +459,7 @@ HWTEST2_F(CommandQueueGroupTest, givenNoBlitterSupportAndCCSThenTwoQueueGroupsAr
hwInfo.featureTable.flags.ftrCCSNode = true;
hwInfo.capabilityTable.blitterOperationsSupported = false;
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo, rootDeviceIndex);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
uint32_t count = 0;
ze_result_t res = deviceImp.getCommandQueueGroupProperties(&count, nullptr);
@@ -475,7 +475,7 @@ HWTEST2_F(CommandQueueGroupTest, givenBlitterDisabledAndAllBcsSetThenTwoQueueGro
hwInfo.featureTable.flags.ftrCCSNode = true;
hwInfo.featureTable.ftrBcsInfo.set();
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo, rootDeviceIndex);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
uint32_t count = 0;
ze_result_t res = deviceImp.getCommandQueueGroupProperties(&count, nullptr);
@@ -505,7 +505,7 @@ HWTEST2_F(DeviceCopyQueueGroupXeHpcTest,
hwInfo.featureTable.ftrBcsInfo.set(0);
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo,
rootDeviceIndex);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
uint32_t count = 0;
ze_result_t res = deviceImp.getCommandQueueGroupProperties(&count, nullptr);
@@ -541,7 +541,7 @@ HWTEST2_F(CommandQueueGroupTest, givenBlitterSupportWithBcsVirtualEnginesEnabled
hwInfo.capabilityTable.blitterOperationsSupported = true;
hwInfo.featureTable.ftrBcsInfo.set();
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo, rootDeviceIndex);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
uint32_t count = 0;
ze_result_t res = deviceImp.getCommandQueueGroupProperties(&count, nullptr);
@@ -571,7 +571,7 @@ HWTEST2_F(CommandQueueGroupTest, givenBlitterSupportWithBcsVirtualEnginesDisable
hwInfo.capabilityTable.blitterOperationsSupported = true;
hwInfo.featureTable.ftrBcsInfo.set();
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo, rootDeviceIndex);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
uint32_t count = 0;
ze_result_t res = deviceImp.getCommandQueueGroupProperties(&count, nullptr);
@@ -599,7 +599,7 @@ HWTEST2_F(CommandQueueGroupTest, givenBlitterSupportAndCCSThenFourQueueGroupsAre
hwInfo.capabilityTable.blitterOperationsSupported = true;
hwInfo.featureTable.ftrBcsInfo.set();
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo, rootDeviceIndex);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
uint32_t count = 0;
ze_result_t res = deviceImp.getCommandQueueGroupProperties(&count, nullptr);
@@ -645,7 +645,7 @@ HWTEST2_F(CommandQueueGroupTest, givenBlitterSupportCCSAndLinkedBcsDisabledThenT
hwInfo.capabilityTable.blitterOperationsSupported = true;
hwInfo.featureTable.ftrBcsInfo.set(0);
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo, rootDeviceIndex);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
uint32_t count = 0;
ze_result_t res = deviceImp.getCommandQueueGroupProperties(&count, nullptr);
@@ -699,7 +699,7 @@ HWTEST2_P(CommandQueueGroupTestXeHpc, givenVaryingBlitterSupportAndCCSThenBCSGro
hwInfo.featureTable.ftrBcsInfo = maxNBitValue(2);
hwInfo.featureTable.ftrBcsInfo.set(GetParam());
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo, rootDeviceIndex);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
uint32_t count = 0;
ze_result_t res = deviceImp.getCommandQueueGroupProperties(&count, nullptr);

View File

@@ -22,7 +22,7 @@ HWTEST2_F(CommandQueueGroupTest, givenNoBlitterSupportAndNoCCSThenOneQueueGroupI
hwInfo.featureTable.flags.ftrCCSNode = false;
hwInfo.capabilityTable.blitterOperationsSupported = false;
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo, rootDeviceIndex);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
uint32_t count = 0;
ze_result_t res = deviceImp.getCommandQueueGroupProperties(&count, nullptr);
@@ -36,7 +36,7 @@ HWTEST2_F(CommandQueueGroupTest, givenNoBlitterSupportAndCCSThenTwoQueueGroupsAr
hwInfo.featureTable.flags.ftrCCSNode = true;
hwInfo.capabilityTable.blitterOperationsSupported = false;
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo, rootDeviceIndex);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
uint32_t count = 0;
ze_result_t res = deviceImp.getCommandQueueGroupProperties(&count, nullptr);
@@ -51,7 +51,7 @@ HWTEST2_F(CommandQueueGroupTest, givenBlitterSupportAndCCSThenThreeQueueGroupsAr
hwInfo.capabilityTable.blitterOperationsSupported = true;
hwInfo.featureTable.ftrBcsInfo.set(0);
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo, rootDeviceIndex);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
uint32_t count = 0;
ze_result_t res = deviceImp.getCommandQueueGroupProperties(&count, nullptr);
@@ -110,7 +110,7 @@ HWTEST2_F(DeviceCopyQueueGroupXeHpgCoreTest,
hwInfo.featureTable.ftrBcsInfo.set(0);
auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo,
rootDeviceIndex);
MockDeviceImp deviceImp(neoMockDevice, neoMockDevice->getExecutionEnvironment());
MockDeviceImp deviceImp(neoMockDevice);
uint32_t count = 0;
ze_result_t res = deviceImp.getCommandQueueGroupProperties(&count, nullptr);