mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 13:33:02 +08:00
fix: Add getDefaultDeviceHierarchy call to GfxCoreHelper
Added getDefaultDeviceHierarchy call that describes default device hierarchy for a gfx core. Refactored L0 and OCL paths to use this value by default and override this value when user sets ZE_FLAT_DEVICE_HIERARCHY environment variable or ReturnSubDevicesAsApiDevices debug key. Updated ReturnSubDevicesAsApiDevices to force COMPOSITE device hierarchy when set to 0. Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
238286d076
commit
08e92d154f
@@ -48,6 +48,10 @@ class GfxCoreHelper;
|
||||
using EngineInstancesContainer = StackVec<EngineTypeUsage, 32>;
|
||||
using GfxCoreHelperCreateFunctionType = std::unique_ptr<GfxCoreHelper> (*)();
|
||||
|
||||
extern const char *deviceHierarchyComposite;
|
||||
extern const char *deviceHierarchyFlat;
|
||||
extern const char *deviceHierarchyUnk;
|
||||
|
||||
class GfxCoreHelper {
|
||||
public:
|
||||
static std::unique_ptr<GfxCoreHelper> create(const GFXCORE_FAMILY gfxCoreFamily);
|
||||
@@ -168,6 +172,7 @@ class GfxCoreHelper {
|
||||
virtual bool isRelaxedOrderingSupported() const = 0;
|
||||
virtual uint32_t calculateNumThreadsPerThreadGroup(uint32_t simd, uint32_t totalWorkItems, uint32_t grfSize, bool isHwLocalIdGeneration) const = 0;
|
||||
virtual uint32_t overrideMaxWorkGroupSize(uint32_t maxWG) const = 0;
|
||||
virtual char const *getDefaultDeviceHierarchy() const = 0;
|
||||
static bool isWorkaroundRequired(uint32_t lowestSteppingWithBug, uint32_t steppingWithFix, const HardwareInfo &hwInfo, const ProductHelper &productHelper);
|
||||
virtual ~GfxCoreHelper() = default;
|
||||
|
||||
@@ -380,6 +385,7 @@ class GfxCoreHelperHw : public GfxCoreHelper {
|
||||
bool isRelaxedOrderingSupported() const override;
|
||||
uint32_t calculateNumThreadsPerThreadGroup(uint32_t simd, uint32_t totalWorkItems, uint32_t grfSize, bool isHwLocalIdGeneration) const override;
|
||||
uint32_t overrideMaxWorkGroupSize(uint32_t maxWG) const override;
|
||||
char const *getDefaultDeviceHierarchy() const override;
|
||||
~GfxCoreHelperHw() override = default;
|
||||
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user