fix: correctly destroy builtin kernels

- fix ContextGroup test - do not keep neoDevice as unique_ptr

Related-To: NEO-12800

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe 2024-12-24 09:29:14 +00:00 committed by Compute-Runtime-Automation
parent 83ebbb01d3
commit 1c8ee97c24
2 changed files with 5 additions and 3 deletions

View File

@ -17,7 +17,8 @@
namespace L0 {
BuiltinFunctionsLibImpl::BuiltinData::~BuiltinData() {
func.reset();
func->destroy();
func.release();
}
BuiltinFunctionsLibImpl::BuiltinData::BuiltinData() = default;
BuiltinFunctionsLibImpl::BuiltinData::BuiltinData(Module *module, std::unique_ptr<L0::Kernel> &&ker) : module(module), func(std::move(ker)) {}

View File

@ -3007,9 +3007,9 @@ HWTEST2_F(ContextGroupStateBaseAddressGlobalStatelessTest,
hwInfo.capabilityTable.defaultEngineType = aub_stream::ENGINE_CCS;
hwInfo.gtSystemInfo.CCSInfo.NumberOfCCSEnabled = 1;
auto neoDevice = std::unique_ptr<NEO::MockDevice>(NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo));
auto neoDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo);
MockDeviceImp l0Device(neoDevice.get(), neoDevice->getExecutionEnvironment());
MockDeviceImp l0Device(neoDevice, neoDevice->getExecutionEnvironment());
l0Device.setDriverHandle(device->getDriverHandle());
auto defaultCsr = neoDevice->getDefaultEngine().commandStreamReceiver;
@ -3046,6 +3046,7 @@ HWTEST2_F(ContextGroupStateBaseAddressGlobalStatelessTest,
EXPECT_NE(nullptr, primaryCsr->getScratchSpaceController()->getScratchSpaceSlot0Allocation());
EXPECT_NE(primaryCsr, commandListImmediate->getCsr(false));
commandListImmediate.reset();
}
HWTEST2_F(CommandListStateBaseAddressGlobalStatelessTest, givenGlobalStatelessAndHeaplessModeWhenExecutingCommandListThenMakeAllocationResident, IsAtLeastXeHpCore) {