Refactor: dont use global gfxCoreHelper getter in ocl files 4/n

Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
Kamil Kopryk
2022-12-28 19:24:36 +00:00
committed by Compute-Runtime-Automation
parent a262bffeb4
commit 0b2faaa957
14 changed files with 52 additions and 40 deletions

View File

@@ -258,7 +258,7 @@ TEST_F(DeviceGetCapsTest, WhenCreatingDeviceThenCapsArePopulatedCorrectly) {
HWTEST_F(DeviceGetCapsTest, givenDeviceWhenAskingForSubGroupSizesThenReturnCorrectValues) {
auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(defaultHwInfo.get()));
auto &gfxCoreHelper = GfxCoreHelper::get(device->getHardwareInfo().platform.eRenderCoreFamily);
auto &gfxCoreHelper = device->getGfxCoreHelper();
auto deviceSubgroups = gfxCoreHelper.getDeviceSubGroupSizes();
@@ -1109,14 +1109,15 @@ TEST(DeviceGetCaps, givenDebugFlagToUseMaxSimdSizeForWkgCalculationWhenDeviceCap
HWTEST_F(DeviceGetCapsTest, givenDeviceThatHasHighNumberOfExecutionUnitsWhenMaxWorkgroupSizeIsComputedThenItIsLimitedTo1024) {
REQUIRE_OCL_21_OR_SKIP(defaultHwInfo);
HardwareInfo myHwInfo = *defaultHwInfo;
GT_SYSTEM_INFO &mySysInfo = myHwInfo.gtSystemInfo;
auto &gfxCoreHelper = GfxCoreHelper::get(myHwInfo.platform.eRenderCoreFamily);
MockExecutionEnvironment mockExecutionEnvironment{};
auto &gfxCoreHelper = mockExecutionEnvironment.rootDeviceEnvironments[0]->getHelper<GfxCoreHelper>();
GT_SYSTEM_INFO &mySysInfo = myHwInfo.gtSystemInfo;
mySysInfo.EUCount = 32;
mySysInfo.SubSliceCount = 2;
mySysInfo.ThreadCount = 32 * gfxCoreHelper.getMinimalSIMDSize(); // 128 threads per subslice, in simd 8 gives 1024
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&myHwInfo));
EXPECT_EQ(1024u, device->getSharedDeviceInfo().maxWorkGroupSize);
@@ -1513,7 +1514,7 @@ HWTEST2_F(DeviceGetCapsTest, givenSysInfoWhenDeviceCreatedThenMaxWorkGroupSizeIs
mySysInfo.ThreadCount = 16 * 8;
myPlatform.usRevId = 0x4;
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&myHwInfo));
auto &gfxCoreHelper = GfxCoreHelper::get(myHwInfo.platform.eRenderCoreFamily);
auto &gfxCoreHelper = device->getGfxCoreHelper();
auto minSimd = gfxCoreHelper.getMinimalSIMDSize();
size_t expectedWGSize = (mySysInfo.ThreadCount / mySysInfo.SubSliceCount) * minSimd;
@@ -1533,7 +1534,7 @@ HWTEST2_F(DeviceGetCapsTest, givenSysInfoWhenDeviceCreatedThenMaxWorkGroupSizeIs
mySysInfo.ThreadCount = 16 * 8;
myPlatform.usRevId = 0x4;
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&myHwInfo));
auto &gfxCoreHelper = GfxCoreHelper::get(myHwInfo.platform.eRenderCoreFamily);
auto &gfxCoreHelper = device->getGfxCoreHelper();
auto minSimd = gfxCoreHelper.getMinimalSIMDSize();
size_t expectedWGSize = (mySysInfo.ThreadCount / mySysInfo.DualSubSliceCount) * minSimd;