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:
parent
83ebbb01d3
commit
1c8ee97c24
|
@ -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)) {}
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue