mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 15:53:45 +08:00
refactor: don't use global ProductHelper getter 16
Related-To: NEO-6853 Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
e970af3657
commit
5e059d4b30
@@ -62,7 +62,7 @@ class GfxCoreHelper {
|
||||
virtual bool isFenceAllocationRequired(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual const AubMemDump::LrcaHelper &getCsTraits(aub_stream::EngineType engineType) const = 0;
|
||||
virtual bool hvAlign4Required() const = 0;
|
||||
virtual bool preferSmallWorkgroupSizeForKernel(const size_t size, const HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool preferSmallWorkgroupSizeForKernel(const size_t size, const RootDeviceEnvironment &rootDeviceEnvironment) const = 0;
|
||||
virtual bool isBufferSizeSuitableForCompression(const size_t size) const = 0;
|
||||
virtual bool checkResourceCompatibility(GraphicsAllocation &graphicsAllocation) const = 0;
|
||||
static bool compressedBuffersSupported(const HardwareInfo &hwInfo);
|
||||
@@ -348,7 +348,7 @@ class GfxCoreHelperHw : public GfxCoreHelper {
|
||||
|
||||
void applyAdditionalCompressionSettings(Gmm &gmm, bool isNotCompressed) const override;
|
||||
|
||||
bool preferSmallWorkgroupSizeForKernel(const size_t size, const HardwareInfo &hwInfo) const override;
|
||||
bool preferSmallWorkgroupSizeForKernel(const size_t size, const RootDeviceEnvironment &rootDeviceEnvironment) const override;
|
||||
|
||||
void applyRenderCompressionFlag(Gmm &gmm, uint32_t isCompressed) const override;
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ uint64_t GfxCoreHelperHw<GfxFamily>::getGpuTimeStampInNS(uint64_t timeStamp, dou
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
inline bool GfxCoreHelperHw<GfxFamily>::preferSmallWorkgroupSizeForKernel(const size_t size, const HardwareInfo &hwInfo) const {
|
||||
inline bool GfxCoreHelperHw<GfxFamily>::preferSmallWorkgroupSizeForKernel(const size_t size, const RootDeviceEnvironment &rootDeviceEnvironment) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -184,8 +184,10 @@ bool MemorySynchronizationCommands<GfxFamily>::isBarrierWaRequired(const RootDev
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
inline bool GfxCoreHelperHw<GfxFamily>::preferSmallWorkgroupSizeForKernel(const size_t size, const HardwareInfo &hwInfo) const {
|
||||
if (ProductHelper::get(hwInfo.platform.eProductFamily)->getSteppingFromHwRevId(hwInfo) >= REVISION_B) {
|
||||
inline bool GfxCoreHelperHw<GfxFamily>::preferSmallWorkgroupSizeForKernel(const size_t size, const RootDeviceEnvironment &rootDeviceEnvironment) const {
|
||||
auto &productHelper = rootDeviceEnvironment.getHelper<ProductHelper>();
|
||||
auto &hwInfo = *rootDeviceEnvironment.getHardwareInfo();
|
||||
if (productHelper.getSteppingFromHwRevId(hwInfo) >= REVISION_B) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ struct PreambleHelper {
|
||||
static void programKernelDebugging(LinearStream *pCommandStream);
|
||||
static void programSemaphoreDelay(LinearStream *pCommandStream);
|
||||
static uint32_t getL3Config(const HardwareInfo &hwInfo, bool useSLM);
|
||||
static bool isSystolicModeConfigurable(const HardwareInfo &hwInfo);
|
||||
static bool isSystolicModeConfigurable(const RootDeviceEnvironment &rootDeviceEnvironment);
|
||||
static size_t getAdditionalCommandsSize(const Device &device);
|
||||
static std::vector<int32_t> getSupportedThreadArbitrationPolicies();
|
||||
static size_t getVFECommandsSize();
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "shared/source/command_stream/linear_stream.h"
|
||||
#include "shared/source/command_stream/preemption.h"
|
||||
#include "shared/source/device/device.h"
|
||||
#include "shared/source/execution_environment/root_device_environment.h"
|
||||
#include "shared/source/helpers/aligned_memory.h"
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/source/helpers/preamble.h"
|
||||
@@ -115,8 +116,9 @@ uint32_t PreambleHelper<GfxFamily>::getScratchSizeValueToProgramMediaVfeState(ui
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
bool PreambleHelper<GfxFamily>::isSystolicModeConfigurable(const HardwareInfo &hwInfo) {
|
||||
const auto &productHelper = *NEO::ProductHelper::get(hwInfo.platform.eProductFamily);
|
||||
bool PreambleHelper<GfxFamily>::isSystolicModeConfigurable(const RootDeviceEnvironment &rootDeviceEnvironment) {
|
||||
const auto &productHelper = rootDeviceEnvironment.getHelper<ProductHelper>();
|
||||
auto &hwInfo = *rootDeviceEnvironment.getHardwareInfo();
|
||||
return productHelper.isSystolicModeConfigurable(hwInfo);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user