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

@@ -829,7 +829,7 @@ TEST_F(InternalsEventTest, givenDeviceTimestampBaseNotEnabledWhenCalculateStartT
event.getEventProfilingInfo(CL_PROFILING_COMMAND_START, sizeof(cl_ulong), &start, nullptr);
auto resolution = pClDevice->getDevice().getDeviceInfo().profilingTimerResolution;
auto &gfxCoreHelper = GfxCoreHelper::get(pClDevice->getHardwareInfo().platform.eRenderCoreFamily);
auto &gfxCoreHelper = pClDevice->getGfxCoreHelper();
auto c0 = event.queueTimeStamp.CPUTimeinNS - gfxCoreHelper.getGpuTimeStampInNS(event.queueTimeStamp.GPUTimeStamp, resolution);
EXPECT_EQ(start, static_cast<uint64_t>(timestamp.GlobalStartTS * resolution) + c0);
@@ -888,7 +888,7 @@ TEST_F(InternalsEventTest, givenDeviceTimestampBaseEnabledAndGlobalStartTSSmalle
uint64_t start = 0u;
event.getEventProfilingInfo(CL_PROFILING_COMMAND_START, sizeof(cl_ulong), &start, nullptr);
auto &gfxCoreHelper = GfxCoreHelper::get(pClDevice->getHardwareInfo().platform.eRenderCoreFamily);
auto &gfxCoreHelper = pClDevice->getGfxCoreHelper();
auto resolution = pClDevice->getDevice().getDeviceInfo().profilingTimerResolution;
auto refStartTime = static_cast<uint64_t>(timestamp.GlobalStartTS * resolution + (1ULL << gfxCoreHelper.getGlobalTimeStampBits()) * resolution);
EXPECT_EQ(start, refStartTime);