@@ -84,28 +84,28 @@ TEST_F(KernelHelperMaxWorkGroupsTests, GivenVariousValuesWhenCalculatingMaxWorkG
8484using KernelHelperTest = Test<DeviceFixture>;
8585
8686TEST_F (KernelHelperTest, GivenStatelessPrivateSizeGreaterThanGlobalSizeWhenCheckingIfThereIsEnaughSpaceThenOutOfMemReturned) {
87- auto globalSize = pDevice->getRootDevice ()-> getGlobalMemorySize ( static_cast < uint32_t >(pDevice-> getDeviceBitfield (). to_ulong ())) ;
87+ auto globalSize = pDevice->getDeviceInfo (). globalMemSize ;
8888 KernelDescriptor::KernelAttributes attributes = {};
8989 attributes.perHwThreadPrivateMemorySize = (static_cast <uint32_t >((globalSize + pDevice->getDeviceInfo ().computeUnitsUsedForScratch ) / pDevice->getDeviceInfo ().computeUnitsUsedForScratch )) + 100 ;
9090 EXPECT_EQ (KernelHelper::checkIfThereIsSpaceForScratchOrPrivate (attributes, pDevice), KernelHelper::ErrorCode::OUT_OF_DEVICE_MEMORY);
9191}
9292
9393TEST_F (KernelHelperTest, GivenScratchSizeGreaterThanGlobalSizeWhenCheckingIfThereIsEnaughSpaceThenOutOfMemReturned) {
94- auto globalSize = pDevice->getRootDevice ()-> getGlobalMemorySize ( static_cast < uint32_t >(pDevice-> getDeviceBitfield (). to_ulong ())) ;
94+ auto globalSize = pDevice->getDeviceInfo (). globalMemSize ;
9595 KernelDescriptor::KernelAttributes attributes = {};
9696 attributes.perThreadScratchSize [0 ] = (static_cast <uint32_t >((globalSize + pDevice->getDeviceInfo ().computeUnitsUsedForScratch ) / pDevice->getDeviceInfo ().computeUnitsUsedForScratch )) + 100 ;
9797 EXPECT_EQ (KernelHelper::checkIfThereIsSpaceForScratchOrPrivate (attributes, pDevice), KernelHelper::ErrorCode::OUT_OF_DEVICE_MEMORY);
9898}
9999
100100TEST_F (KernelHelperTest, GivenScratchPrivateSizeGreaterThanGlobalSizeWhenCheckingIfThereIsEnaughSpaceThenOutOfMemReturned) {
101- auto globalSize = pDevice->getRootDevice ()-> getGlobalMemorySize ( static_cast < uint32_t >(pDevice-> getDeviceBitfield (). to_ulong ())) ;
101+ auto globalSize = pDevice->getDeviceInfo (). globalMemSize ;
102102 KernelDescriptor::KernelAttributes attributes = {};
103103 attributes.perThreadScratchSize [1 ] = (static_cast <uint32_t >((globalSize + pDevice->getDeviceInfo ().computeUnitsUsedForScratch ) / pDevice->getDeviceInfo ().computeUnitsUsedForScratch )) + 100 ;
104104 EXPECT_EQ (KernelHelper::checkIfThereIsSpaceForScratchOrPrivate (attributes, pDevice), KernelHelper::ErrorCode::OUT_OF_DEVICE_MEMORY);
105105}
106106
107107TEST_F (KernelHelperTest, GivenScratchAndPrivateSizeLessThanGlobalSizeWhenCheckingIfThereIsEnaughSpaceThenSuccessReturned) {
108- auto globalSize = pDevice->getRootDevice ()-> getGlobalMemorySize ( static_cast < uint32_t >(pDevice-> getDeviceBitfield (). to_ulong ())) ;
108+ auto globalSize = pDevice->getDeviceInfo (). globalMemSize ;
109109 KernelDescriptor::KernelAttributes attributes = {};
110110 auto size = (static_cast <uint32_t >((globalSize + pDevice->getDeviceInfo ().computeUnitsUsedForScratch ) / pDevice->getDeviceInfo ().computeUnitsUsedForScratch )) - 100 ;
111111 attributes.perHwThreadPrivateMemorySize = size;
0 commit comments