mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 09:14:47 +08:00
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:
committed by
Compute-Runtime-Automation
parent
a262bffeb4
commit
0b2faaa957
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user