mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-09 06:23:01 +08:00
Don't use global ProductHelper getter in L0 1/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
772dec81e4
commit
0e6cc86821
@@ -91,7 +91,7 @@ size_t CommandQueueHw<gfxCoreFamily>::estimateStateBaseAddressCmdSize() {
|
||||
|
||||
NEO::Device *neoDevice = device->getNEODevice();
|
||||
auto &hwInfo = neoDevice->getHardwareInfo();
|
||||
auto &productHelper = *NEO::ProductHelper::get(hwInfo.platform.eProductFamily);
|
||||
auto &productHelper = neoDevice->getProductHelper();
|
||||
size_t size = 0;
|
||||
|
||||
if (NEO::ApiSpecificConfig::getBindlessConfiguration()) {
|
||||
|
||||
@@ -94,6 +94,7 @@ struct Device : _ze_device_handle_t {
|
||||
virtual uint32_t getMaxNumHwThreads() const = 0;
|
||||
|
||||
virtual const NEO::GfxCoreHelper &getGfxCoreHelper() = 0;
|
||||
virtual const NEO::ProductHelper &getProductHelper() = 0;
|
||||
bool isImplicitScalingCapable() const {
|
||||
return implicitScalingCapable;
|
||||
}
|
||||
|
||||
@@ -552,7 +552,7 @@ ze_result_t DeviceImp::getMemoryProperties(uint32_t *pCount, ze_device_memory_pr
|
||||
|
||||
const auto &deviceInfo = this->neoDevice->getDeviceInfo();
|
||||
auto &hwInfo = this->getHwInfo();
|
||||
auto &productHelper = *NEO::ProductHelper::get(hwInfo.platform.eProductFamily);
|
||||
auto &productHelper = this->getProductHelper();
|
||||
strcpy_s(pMemProperties->name, ZE_MAX_DEVICE_NAME, productHelper.getDeviceMemoryName().c_str());
|
||||
auto osInterface = neoDevice->getRootDeviceEnvironment().osInterface.get();
|
||||
pMemProperties->maxClockRate = productHelper.getDeviceMemoryMaxClkRate(hwInfo, osInterface, 0);
|
||||
@@ -1053,6 +1053,10 @@ const NEO::GfxCoreHelper &DeviceImp::getGfxCoreHelper() {
|
||||
return this->neoDevice->getGfxCoreHelper();
|
||||
}
|
||||
|
||||
const NEO::ProductHelper &DeviceImp::getProductHelper() {
|
||||
return this->neoDevice->getProductHelper();
|
||||
}
|
||||
|
||||
NEO::OSInterface &DeviceImp::getOsInterface() { return *neoDevice->getRootDeviceEnvironment().osInterface; }
|
||||
|
||||
uint32_t DeviceImp::getPlatformInfo() const {
|
||||
|
||||
@@ -73,6 +73,7 @@ struct DeviceImp : public Device {
|
||||
BuiltinFunctionsLib *getBuiltinFunctionsLib() override;
|
||||
uint32_t getMOCS(bool l3enabled, bool l1enabled) override;
|
||||
const NEO::GfxCoreHelper &getGfxCoreHelper() override;
|
||||
const NEO::ProductHelper &getProductHelper() override;
|
||||
const NEO::HardwareInfo &getHwInfo() const override;
|
||||
NEO::OSInterface &getOsInterface() override;
|
||||
uint32_t getPlatformInfo() const override;
|
||||
|
||||
@@ -58,6 +58,7 @@ struct Mock<Device> : public Device {
|
||||
// Runtime internal methods
|
||||
ADDMETHOD_NOBASE(getExecEnvironment, void *, nullptr, ());
|
||||
ADDMETHOD_NOBASE_REFRETURN(getGfxCoreHelper, NEO::GfxCoreHelper &, ());
|
||||
ADDMETHOD_NOBASE_REFRETURN(getProductHelper, NEO::ProductHelper &, ());
|
||||
ADDMETHOD_NOBASE(getBuiltinFunctionsLib, BuiltinFunctionsLib *, nullptr, ());
|
||||
ADDMETHOD_CONST_NOBASE(getMaxNumHwThreads, uint32_t, 16u, ());
|
||||
ADDMETHOD_NOBASE(activateMetricGroupsDeferred, ze_result_t, ZE_RESULT_SUCCESS, (uint32_t count, zet_metric_group_handle_t *phMetricGroups));
|
||||
|
||||
Reference in New Issue
Block a user