Refactor: don't use global ProductHelper getter in ocl files 1/n

Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
Kamil Kopryk
2022-12-27 02:57:51 +00:00
committed by Compute-Runtime-Automation
parent 929e03ad8a
commit 14d524fe26
5 changed files with 6 additions and 6 deletions

View File

@@ -50,7 +50,7 @@ void EventsRequest::fillCsrDependenciesForTimestampPacketContainer(CsrDependenci
csrDeps.timestampPacketContainer.push_back(timestampPacketContainer);
if (!sameCsr) {
const auto &productHelper = *NEO::ProductHelper::get(event->getCommandQueue()->getDevice().getHardwareInfo().platform.eProductFamily);
const auto &productHelper = event->getCommandQueue()->getDevice().getProductHelper();
if (productHelper.isDcFlushAllowed()) {
if (!dependentCsr.isLatestTaskCountFlushed()) {
flushDependentCsr(dependentCsr, csrDeps);

View File

@@ -45,7 +45,7 @@ void setupAUB(const NEO::Device *pDevice, aub_stream::EngineType engineType) {
// Header
auto &hwInfo = pDevice->getHardwareInfo();
auto deviceId = hwInfo.capabilityTable.aubDeviceId;
const auto &productHelper = *NEO::ProductHelper::get(hwInfo.platform.eProductFamily);
const auto &productHelper = pDevice->getProductHelper();
aubFile.init(productHelper.getAubStreamSteppingFromHwRevId(hwInfo), deviceId);
aubFile.writeMMIO(mmioBase + 0x229c, 0xffff8280);

View File

@@ -30,7 +30,7 @@ void setupAUBWithBatchBuffer(const NEO::Device *pDevice, aub_stream::EngineType
// Header
auto &hwInfo = pDevice->getHardwareInfo();
const auto &productHelper = *NEO::ProductHelper::get(hwInfo.platform.eProductFamily);
const auto &productHelper = pDevice->getProductHelper();
aubFile.init(productHelper.getAubStreamSteppingFromHwRevId(hwInfo), AUB::Traits::device);
aubFile.writeMMIO(AubMemDump::computeRegisterOffset(mmioBase, 0x229c), 0xffff8280);
@@ -152,7 +152,7 @@ void setupAUBWithBatchBuffer(const NEO::Device *pDevice, aub_stream::EngineType
// Poll until HW complete
using AubMemDump::CmdServicesMemTraceRegisterPoll;
aubFile.registerPoll(
AubMemDump::computeRegisterOffset(mmioBase, 0x2234), //EXECLIST_STATUS
AubMemDump::computeRegisterOffset(mmioBase, 0x2234), // EXECLIST_STATUS
0x00008000,
0x00008000,
false,

View File

@@ -72,7 +72,7 @@ class SyncBufferHandlerTest : public SyncBufferEnqueueHandlerTest {
kernel->executionType = KernelExecutionType::Concurrent;
commandQueue = reinterpret_cast<MockCommandQueue *>(new MockCommandQueueHw<FamilyType>(context, pClDevice, 0));
auto &hwInfo = pClDevice->getHardwareInfo();
auto &productHelper = *NEO::ProductHelper::get(hwInfo.platform.eProductFamily);
auto &productHelper = pClDevice->getProductHelper();
if (productHelper.isCooperativeEngineSupported(hwInfo)) {
commandQueue->gpgpuEngine = &pClDevice->getEngine(aub_stream::EngineType::ENGINE_CCS, EngineUsage::Cooperative);
}

View File

@@ -123,7 +123,7 @@ HWTEST_F(TimestampPacketTests, givenCrossCsrDependenciesWhenFillCsrDepsThenFlush
eventsRequest.fillCsrDependenciesForTimestampPacketContainer(csrDeps, mockCmdQ->getGpgpuCommandStreamReceiver(), CsrDependencies::DependenciesType::All);
const auto &productHelper = *NEO::ProductHelper::get(device->getHardwareInfo().platform.eProductFamily);
const auto &productHelper = device->getProductHelper();
if (productHelper.isDcFlushAllowed()) {
EXPECT_TRUE(mockCmdQ2->getUltCommandStreamReceiver().flushBatchedSubmissionsCalled);
} else {