mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 18:06:32 +08:00
refactor: don't use global gfxCoreHelper getter 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
8007aed109
commit
eff5a281ed
@@ -758,7 +758,9 @@ HWTEST_F(EnqueueKernelTests, whenEnqueueingKernelThenCsrCorrectlySetsRequiredThr
|
||||
nullptr,
|
||||
nullptr);
|
||||
pCommandQueue->flush();
|
||||
EXPECT_EQ(GfxCoreHelperHw<FamilyType>::get().getDefaultThreadArbitrationPolicy(),
|
||||
|
||||
auto &gfxCoreHelper = clDeviceFactory.rootDevices[0]->getGfxCoreHelper();
|
||||
EXPECT_EQ(gfxCoreHelper.getDefaultThreadArbitrationPolicy(),
|
||||
csr.streamProperties.stateComputeMode.threadArbitrationPolicy.value);
|
||||
|
||||
pCommandQueue->enqueueKernel(
|
||||
@@ -784,7 +786,8 @@ HWTEST_F(EnqueueKernelTests, whenEnqueueingKernelThenCsrCorrectlySetsRequiredThr
|
||||
nullptr,
|
||||
nullptr);
|
||||
pCommandQueue->flush();
|
||||
EXPECT_EQ(GfxCoreHelperHw<FamilyType>::get().getDefaultThreadArbitrationPolicy(),
|
||||
|
||||
EXPECT_EQ(gfxCoreHelper.getDefaultThreadArbitrationPolicy(),
|
||||
csr.streamProperties.stateComputeMode.threadArbitrationPolicy.value);
|
||||
}
|
||||
|
||||
|
||||
@@ -441,7 +441,9 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenDefaultCommandStreamReceiverT
|
||||
EXPECT_EQ(ThreadArbitrationPolicy::NotPresent, pCommandStreamReceiver->peekThreadArbitrationPolicy());
|
||||
|
||||
flushTask(*pCommandStreamReceiver);
|
||||
EXPECT_EQ(GfxCoreHelperHw<FamilyType>::get().getDefaultThreadArbitrationPolicy(), pCommandStreamReceiver->peekThreadArbitrationPolicy());
|
||||
|
||||
auto &gfxCoreHelper = pDevice->getGfxCoreHelper();
|
||||
EXPECT_EQ(gfxCoreHelper.getDefaultThreadArbitrationPolicy(), pCommandStreamReceiver->peekThreadArbitrationPolicy());
|
||||
}
|
||||
|
||||
HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenKernelWithSlmWhenPreviousSLML3WasSentThenDontProgramL3) {
|
||||
|
||||
@@ -773,8 +773,8 @@ HWTEST_F(PerformanceHintTest, givenCompressedImageWhenItsCreatedThenProperPerfor
|
||||
auto graphicsAllocation = mockBuffer->getGraphicsAllocation(device->getRootDeviceIndex());
|
||||
|
||||
graphicsAllocation->setDefaultGmm(gmm);
|
||||
|
||||
if (!GfxCoreHelperHw<FamilyType>::get().checkResourceCompatibility(*graphicsAllocation)) {
|
||||
auto &gfxCoreHelper = device->getGfxCoreHelper();
|
||||
if (!gfxCoreHelper.checkResourceCompatibility(*graphicsAllocation)) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
|
||||
|
||||
@@ -439,7 +439,8 @@ HWTEST_F(DeviceGetCapsTest, givenGlobalMemSizeAndSharedSystemAllocationsNotSuppo
|
||||
const auto &caps = device->getSharedDeviceInfo();
|
||||
|
||||
uint64_t expectedSize = std::max((caps.globalMemSize / 2), static_cast<uint64_t>(128ULL * MemoryConstants::megaByte));
|
||||
expectedSize = std::min(expectedSize, GfxCoreHelperHw<FamilyType>::get().getMaxMemAllocSize());
|
||||
auto &gfxCoreHelper = device->getGfxCoreHelper();
|
||||
expectedSize = std::min(expectedSize, gfxCoreHelper.getMaxMemAllocSize());
|
||||
EXPECT_EQ(caps.maxMemAllocSize, expectedSize);
|
||||
}
|
||||
|
||||
@@ -1058,7 +1059,8 @@ HWTEST_F(DeviceGetCapsTest, givenDisabledFtrPooledEuWhenCalculatingMaxEuPerSSThe
|
||||
auto device = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&myHwInfo));
|
||||
auto &deviceInfo = device->deviceInfo;
|
||||
|
||||
auto simdSizeUsed = GfxCoreHelperHw<FamilyType>::get().getMinimalSIMDSize();
|
||||
auto &gfxCoreHelper = device->getGfxCoreHelper();
|
||||
auto simdSizeUsed = gfxCoreHelper.getMinimalSIMDSize();
|
||||
|
||||
auto productHelper = ProductHelper::get(myHwInfo.platform.eProductFamily);
|
||||
auto expectedMaxWGS = productHelper->getMaxThreadsForWorkgroupInDSSOrSS(myHwInfo, static_cast<uint32_t>(deviceInfo.maxNumEUsPerSubSlice),
|
||||
|
||||
@@ -2101,7 +2101,8 @@ HWTEST_F(ProgramTests, givenNewProgramThenStatelessToStatefulBufferOffsetOptimiz
|
||||
MockProgram program(pContext, false, toClDeviceVector(*pClDevice));
|
||||
auto internalOptions = program.getInternalOptions();
|
||||
|
||||
if (GfxCoreHelperHw<FamilyType>::get().isStatelessToStatefulWithOffsetSupported()) {
|
||||
auto &gfxCoreHelper = pClDevice->getGfxCoreHelper();
|
||||
if (gfxCoreHelper.isStatelessToStatefulWithOffsetSupported()) {
|
||||
EXPECT_TRUE(CompilerOptions::contains(internalOptions, CompilerOptions::hasBufferOffsetArg));
|
||||
} else {
|
||||
EXPECT_FALSE(CompilerOptions::contains(internalOptions, CompilerOptions::hasBufferOffsetArg));
|
||||
|
||||
Reference in New Issue
Block a user