fix: remove defaultProfilingTimerResolution from RuntimeCapabilityTable

Related-To: NEO-12275
Signed-off-by: Marcel Skierkowski <marcel.skierkowski@intel.com>
This commit is contained in:
Marcel Skierkowski
2024-11-04 10:14:17 +00:00
committed by Compute-Runtime-Automation
parent f8f1557ec7
commit 49d999abe6
40 changed files with 101 additions and 140 deletions

View File

@@ -26,7 +26,7 @@ bool DeviceTimeDrm::getGpuCpuTimeImpl(TimeStampData *pGpuCpuTime, OSTime *osTime
return pDrm->getIoctlHelper()->setGpuCpuTimes(pGpuCpuTime, osTime);
}
double DeviceTimeDrm::getDynamicDeviceTimerResolution(HardwareInfo const &hwInfo) const {
double DeviceTimeDrm::getDynamicDeviceTimerResolution() const {
if (pDrm) {
int frequency = 0;
@@ -35,10 +35,10 @@ double DeviceTimeDrm::getDynamicDeviceTimerResolution(HardwareInfo const &hwInfo
return nanosecondsPerSecond / frequency;
}
}
return OSTime::getDeviceTimerResolution(hwInfo);
return OSTime::getDeviceTimerResolution();
}
uint64_t DeviceTimeDrm::getDynamicDeviceTimerClock(HardwareInfo const &hwInfo) const {
uint64_t DeviceTimeDrm::getDynamicDeviceTimerClock() const {
if (pDrm) {
int frequency = 0;
@@ -48,7 +48,7 @@ uint64_t DeviceTimeDrm::getDynamicDeviceTimerClock(HardwareInfo const &hwInfo) c
return static_cast<uint64_t>(frequency);
}
}
return static_cast<uint64_t>(nanosecondsPerSecond / OSTime::getDeviceTimerResolution(hwInfo));
return static_cast<uint64_t>(nanosecondsPerSecond / OSTime::getDeviceTimerResolution());
}
bool DeviceTimeDrm::isTimestampsRefreshEnabled() const {

View File

@@ -15,8 +15,8 @@ class DeviceTimeDrm : public DeviceTime {
public:
DeviceTimeDrm(OSInterface &osInterface);
bool getGpuCpuTimeImpl(TimeStampData *pGpuCpuTime, OSTime *osTime) override;
double getDynamicDeviceTimerResolution(HardwareInfo const &hwInfo) const override;
uint64_t getDynamicDeviceTimerClock(HardwareInfo const &hwInfo) const override;
double getDynamicDeviceTimerResolution() const override;
uint64_t getDynamicDeviceTimerClock() const override;
bool isTimestampsRefreshEnabled() const override;
protected:

View File

@@ -8,6 +8,7 @@
#include "shared/source/os_interface/os_time.h"
#include "shared/source/debug_settings/debug_settings_manager.h"
#include "shared/source/helpers/constants.h"
#include "shared/source/helpers/debug_helpers.h"
#include "shared/source/helpers/hw_info.h"
@@ -15,8 +16,8 @@
namespace NEO {
double OSTime::getDeviceTimerResolution(HardwareInfo const &hwInfo) {
return hwInfo.capabilityTable.defaultProfilingTimerResolution;
double OSTime::getDeviceTimerResolution() {
return CommonConstants::defaultProfilingTimerResolution;
};
bool DeviceTime::getGpuCpuTimeImpl(TimeStampData *pGpuCpuTime, OSTime *osTime) {
@@ -25,16 +26,16 @@ bool DeviceTime::getGpuCpuTimeImpl(TimeStampData *pGpuCpuTime, OSTime *osTime) {
return true;
}
double DeviceTime::getDynamicDeviceTimerResolution(HardwareInfo const &hwInfo) const {
return OSTime::getDeviceTimerResolution(hwInfo);
double DeviceTime::getDynamicDeviceTimerResolution() const {
return OSTime::getDeviceTimerResolution();
}
uint64_t DeviceTime::getDynamicDeviceTimerClock(HardwareInfo const &hwInfo) const {
return static_cast<uint64_t>(1000000000.0 / OSTime::getDeviceTimerResolution(hwInfo));
uint64_t DeviceTime::getDynamicDeviceTimerClock() const {
return static_cast<uint64_t>(1000000000.0 / OSTime::getDeviceTimerResolution());
}
void DeviceTime::setDeviceTimerResolution(HardwareInfo const &hwInfo) {
deviceTimerResolution = getDynamicDeviceTimerResolution(hwInfo);
void DeviceTime::setDeviceTimerResolution() {
deviceTimerResolution = getDynamicDeviceTimerResolution();
if (debugManager.flags.OverrideProfilingTimerResolution.get() != -1) {
deviceTimerResolution = static_cast<double>(debugManager.flags.OverrideProfilingTimerResolution.get());
}

View File

@@ -28,11 +28,11 @@ class DeviceTime {
virtual ~DeviceTime() = default;
bool getGpuCpuTime(TimeStampData *pGpuCpuTime, OSTime *osTime, bool forceKmdCall);
virtual bool getGpuCpuTimeImpl(TimeStampData *pGpuCpuTime, OSTime *osTime);
virtual double getDynamicDeviceTimerResolution(HardwareInfo const &hwInfo) const;
virtual uint64_t getDynamicDeviceTimerClock(HardwareInfo const &hwInfo) const;
virtual double getDynamicDeviceTimerResolution() const;
virtual uint64_t getDynamicDeviceTimerClock() const;
virtual bool isTimestampsRefreshEnabled() const;
bool getGpuCpuTimestamps(TimeStampData *timeStamp, OSTime *osTime, bool forceKmdCall);
void setDeviceTimerResolution(HardwareInfo const &hwInfo);
void setDeviceTimerResolution();
void setRefreshTimestampsFlag() {
refreshTimestamps = true;
}
@@ -62,7 +62,7 @@ class OSTime {
virtual double getHostTimerResolution() const;
virtual uint64_t getCpuRawTimestamp();
static double getDeviceTimerResolution(HardwareInfo const &hwInfo);
static double getDeviceTimerResolution();
bool getGpuCpuTime(TimeStampData *gpuCpuTime, bool forceKmdCall) {
return deviceTime->getGpuCpuTime(gpuCpuTime, this, forceKmdCall);
@@ -72,18 +72,18 @@ class OSTime {
return deviceTime->getGpuCpuTime(gpuCpuTime, this, false);
}
double getDynamicDeviceTimerResolution(HardwareInfo const &hwInfo) const {
return deviceTime->getDynamicDeviceTimerResolution(hwInfo);
double getDynamicDeviceTimerResolution() const {
return deviceTime->getDynamicDeviceTimerResolution();
}
uint64_t getDynamicDeviceTimerClock(HardwareInfo const &hwInfo) const {
return deviceTime->getDynamicDeviceTimerClock(hwInfo);
uint64_t getDynamicDeviceTimerClock() const {
return deviceTime->getDynamicDeviceTimerClock();
}
uint64_t getMaxGpuTimeStamp() const { return maxGpuTimeStamp; }
void setDeviceTimerResolution(HardwareInfo const &hwInfo) const {
deviceTime->setDeviceTimerResolution(hwInfo);
void setDeviceTimerResolution() const {
deviceTime->setDeviceTimerResolution();
}
void setDeviceTimestampWidth(uint32_t timestampWidth) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2023 Intel Corporation
* Copyright (C) 2018-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -53,7 +53,7 @@ DeviceTimeWddm::DeviceTimeWddm(Wddm *wddm) {
this->wddm = wddm;
}
double DeviceTimeWddm::getDynamicDeviceTimerResolution(HardwareInfo const &hwInfo) const {
double DeviceTimeWddm::getDynamicDeviceTimerResolution() const {
double retVal = 0u;
if (wddm) {
retVal = 1000000000.0 / static_cast<double>(wddm->getTimestampFrequency());
@@ -62,7 +62,7 @@ double DeviceTimeWddm::getDynamicDeviceTimerResolution(HardwareInfo const &hwInf
return retVal;
}
uint64_t DeviceTimeWddm::getDynamicDeviceTimerClock(HardwareInfo const &hwInfo) const {
uint64_t DeviceTimeWddm::getDynamicDeviceTimerClock() const {
uint64_t retVal = 0u;
if (wddm) {
retVal = static_cast<uint64_t>(wddm->getTimestampFrequency());

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2023 Intel Corporation
* Copyright (C) 2018-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -20,8 +20,8 @@ class DeviceTimeWddm : public DeviceTime {
public:
DeviceTimeWddm(Wddm *wddm);
bool getGpuCpuTimeImpl(TimeStampData *pGpuCpuTime, OSTime *osTime) override;
double getDynamicDeviceTimerResolution(HardwareInfo const &hwInfo) const override;
uint64_t getDynamicDeviceTimerClock(HardwareInfo const &hwInfo) const override;
double getDynamicDeviceTimerResolution() const override;
uint64_t getDynamicDeviceTimerClock() const override;
protected:
MOCKABLE_VIRTUAL bool runEscape(Wddm *wddm, TimeStampDataHeader &escapeInfo);