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:
parent
8007aed109
commit
eff5a281ed
|
@ -342,8 +342,8 @@ struct CompressionMemoryTest : public MemoryTest {
|
||||||
HWTEST2_F(CompressionMemoryTest, givenDeviceUsmWhenAllocatingThenEnableCompressionIfPossible, IsAtLeastSkl) {
|
HWTEST2_F(CompressionMemoryTest, givenDeviceUsmWhenAllocatingThenEnableCompressionIfPossible, IsAtLeastSkl) {
|
||||||
device->getNEODevice()->getRootDeviceEnvironment().getMutableHardwareInfo()->capabilityTable.ftrRenderCompressedBuffers = true;
|
device->getNEODevice()->getRootDeviceEnvironment().getMutableHardwareInfo()->capabilityTable.ftrRenderCompressedBuffers = true;
|
||||||
auto &hwInfo = device->getHwInfo();
|
auto &hwInfo = device->getHwInfo();
|
||||||
auto &l0GfxCoreHelper = device->getNEODevice()->getRootDeviceEnvironment().getHelper<L0GfxCoreHelper>();
|
auto &l0GfxCoreHelper = device->getL0GfxCoreHelper();
|
||||||
auto &gfxCoreHelper = NEO::GfxCoreHelperHw<FamilyType>::get();
|
auto &gfxCoreHelper = device->getNEODevice()->getGfxCoreHelper();
|
||||||
|
|
||||||
// Default path
|
// Default path
|
||||||
{
|
{
|
||||||
|
|
|
@ -758,7 +758,9 @@ HWTEST_F(EnqueueKernelTests, whenEnqueueingKernelThenCsrCorrectlySetsRequiredThr
|
||||||
nullptr,
|
nullptr,
|
||||||
nullptr);
|
nullptr);
|
||||||
pCommandQueue->flush();
|
pCommandQueue->flush();
|
||||||
EXPECT_EQ(GfxCoreHelperHw<FamilyType>::get().getDefaultThreadArbitrationPolicy(),
|
|
||||||
|
auto &gfxCoreHelper = clDeviceFactory.rootDevices[0]->getGfxCoreHelper();
|
||||||
|
EXPECT_EQ(gfxCoreHelper.getDefaultThreadArbitrationPolicy(),
|
||||||
csr.streamProperties.stateComputeMode.threadArbitrationPolicy.value);
|
csr.streamProperties.stateComputeMode.threadArbitrationPolicy.value);
|
||||||
|
|
||||||
pCommandQueue->enqueueKernel(
|
pCommandQueue->enqueueKernel(
|
||||||
|
@ -784,7 +786,8 @@ HWTEST_F(EnqueueKernelTests, whenEnqueueingKernelThenCsrCorrectlySetsRequiredThr
|
||||||
nullptr,
|
nullptr,
|
||||||
nullptr);
|
nullptr);
|
||||||
pCommandQueue->flush();
|
pCommandQueue->flush();
|
||||||
EXPECT_EQ(GfxCoreHelperHw<FamilyType>::get().getDefaultThreadArbitrationPolicy(),
|
|
||||||
|
EXPECT_EQ(gfxCoreHelper.getDefaultThreadArbitrationPolicy(),
|
||||||
csr.streamProperties.stateComputeMode.threadArbitrationPolicy.value);
|
csr.streamProperties.stateComputeMode.threadArbitrationPolicy.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -441,7 +441,9 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenDefaultCommandStreamReceiverT
|
||||||
EXPECT_EQ(ThreadArbitrationPolicy::NotPresent, pCommandStreamReceiver->peekThreadArbitrationPolicy());
|
EXPECT_EQ(ThreadArbitrationPolicy::NotPresent, pCommandStreamReceiver->peekThreadArbitrationPolicy());
|
||||||
|
|
||||||
flushTask(*pCommandStreamReceiver);
|
flushTask(*pCommandStreamReceiver);
|
||||||
EXPECT_EQ(GfxCoreHelperHw<FamilyType>::get().getDefaultThreadArbitrationPolicy(), pCommandStreamReceiver->peekThreadArbitrationPolicy());
|
|
||||||
|
auto &gfxCoreHelper = pDevice->getGfxCoreHelper();
|
||||||
|
EXPECT_EQ(gfxCoreHelper.getDefaultThreadArbitrationPolicy(), pCommandStreamReceiver->peekThreadArbitrationPolicy());
|
||||||
}
|
}
|
||||||
|
|
||||||
HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenKernelWithSlmWhenPreviousSLML3WasSentThenDontProgramL3) {
|
HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenKernelWithSlmWhenPreviousSLML3WasSentThenDontProgramL3) {
|
||||||
|
|
|
@ -773,8 +773,8 @@ HWTEST_F(PerformanceHintTest, givenCompressedImageWhenItsCreatedThenProperPerfor
|
||||||
auto graphicsAllocation = mockBuffer->getGraphicsAllocation(device->getRootDeviceIndex());
|
auto graphicsAllocation = mockBuffer->getGraphicsAllocation(device->getRootDeviceIndex());
|
||||||
|
|
||||||
graphicsAllocation->setDefaultGmm(gmm);
|
graphicsAllocation->setDefaultGmm(gmm);
|
||||||
|
auto &gfxCoreHelper = device->getGfxCoreHelper();
|
||||||
if (!GfxCoreHelperHw<FamilyType>::get().checkResourceCompatibility(*graphicsAllocation)) {
|
if (!gfxCoreHelper.checkResourceCompatibility(*graphicsAllocation)) {
|
||||||
GTEST_SKIP();
|
GTEST_SKIP();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -439,7 +439,8 @@ HWTEST_F(DeviceGetCapsTest, givenGlobalMemSizeAndSharedSystemAllocationsNotSuppo
|
||||||
const auto &caps = device->getSharedDeviceInfo();
|
const auto &caps = device->getSharedDeviceInfo();
|
||||||
|
|
||||||
uint64_t expectedSize = std::max((caps.globalMemSize / 2), static_cast<uint64_t>(128ULL * MemoryConstants::megaByte));
|
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);
|
EXPECT_EQ(caps.maxMemAllocSize, expectedSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1058,7 +1059,8 @@ HWTEST_F(DeviceGetCapsTest, givenDisabledFtrPooledEuWhenCalculatingMaxEuPerSSThe
|
||||||
auto device = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&myHwInfo));
|
auto device = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&myHwInfo));
|
||||||
auto &deviceInfo = device->deviceInfo;
|
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 productHelper = ProductHelper::get(myHwInfo.platform.eProductFamily);
|
||||||
auto expectedMaxWGS = productHelper->getMaxThreadsForWorkgroupInDSSOrSS(myHwInfo, static_cast<uint32_t>(deviceInfo.maxNumEUsPerSubSlice),
|
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));
|
MockProgram program(pContext, false, toClDeviceVector(*pClDevice));
|
||||||
auto internalOptions = program.getInternalOptions();
|
auto internalOptions = program.getInternalOptions();
|
||||||
|
|
||||||
if (GfxCoreHelperHw<FamilyType>::get().isStatelessToStatefulWithOffsetSupported()) {
|
auto &gfxCoreHelper = pClDevice->getGfxCoreHelper();
|
||||||
|
if (gfxCoreHelper.isStatelessToStatefulWithOffsetSupported()) {
|
||||||
EXPECT_TRUE(CompilerOptions::contains(internalOptions, CompilerOptions::hasBufferOffsetArg));
|
EXPECT_TRUE(CompilerOptions::contains(internalOptions, CompilerOptions::hasBufferOffsetArg));
|
||||||
} else {
|
} else {
|
||||||
EXPECT_FALSE(CompilerOptions::contains(internalOptions, CompilerOptions::hasBufferOffsetArg));
|
EXPECT_FALSE(CompilerOptions::contains(internalOptions, CompilerOptions::hasBufferOffsetArg));
|
||||||
|
|
|
@ -134,7 +134,8 @@ HWTEST_F(DirectSubmissionTest, givenDirectSubmissionWithoutCompletionFenceAlloca
|
||||||
EXPECT_EQ(nullptr, directSubmission.completionFenceAllocation);
|
EXPECT_EQ(nullptr, directSubmission.completionFenceAllocation);
|
||||||
|
|
||||||
size_t expectedAllocationsCnt = 3;
|
size_t expectedAllocationsCnt = 3;
|
||||||
if (GfxCoreHelperHw<FamilyType>::get().isRelaxedOrderingSupported()) {
|
auto &gfxCoreHelper = pDevice->getGfxCoreHelper();
|
||||||
|
if (gfxCoreHelper.isRelaxedOrderingSupported()) {
|
||||||
expectedAllocationsCnt += 2;
|
expectedAllocationsCnt += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,7 +166,8 @@ HWTEST_F(DirectSubmissionTest, givenDirectSubmissionWithCompletionFenceAllocatio
|
||||||
EXPECT_EQ(&completionFenceAllocation, directSubmission.completionFenceAllocation);
|
EXPECT_EQ(&completionFenceAllocation, directSubmission.completionFenceAllocation);
|
||||||
|
|
||||||
size_t expectedAllocationsCnt = 4;
|
size_t expectedAllocationsCnt = 4;
|
||||||
if (GfxCoreHelperHw<FamilyType>::get().isRelaxedOrderingSupported()) {
|
auto &gfxCoreHelper = pDevice->getGfxCoreHelper();
|
||||||
|
if (gfxCoreHelper.isRelaxedOrderingSupported()) {
|
||||||
expectedAllocationsCnt += 2;
|
expectedAllocationsCnt += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2132,7 +2132,7 @@ HWTEST2_F(DirectSubmissionRelaxedOrderingTests, WhenStoppingRingWithoutSubmissio
|
||||||
HWTEST_F(DirectSubmissionRelaxedOrderingTests, givenDebugFlagSetWhenAskingForRelaxedOrderingSupportThenEnable) {
|
HWTEST_F(DirectSubmissionRelaxedOrderingTests, givenDebugFlagSetWhenAskingForRelaxedOrderingSupportThenEnable) {
|
||||||
auto ultCsr = static_cast<UltCommandStreamReceiver<FamilyType> *>(pDevice->getDefaultEngine().commandStreamReceiver);
|
auto ultCsr = static_cast<UltCommandStreamReceiver<FamilyType> *>(pDevice->getDefaultEngine().commandStreamReceiver);
|
||||||
|
|
||||||
auto &gfxCoreHelper = GfxCoreHelperHw<FamilyType>::get();
|
auto &gfxCoreHelper = pDevice->getGfxCoreHelper();
|
||||||
|
|
||||||
{
|
{
|
||||||
DebugManager.flags.DirectSubmissionRelaxedOrdering.set(-1);
|
DebugManager.flags.DirectSubmissionRelaxedOrdering.set(-1);
|
||||||
|
|
Loading…
Reference in New Issue