Add hardware support for each pipeline property

This change is a baseline for tight control over
when dispatch pipeline state commands and which
pipeline state properties can be changed for a
given hardware platform

Related-To: NEO-5019

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2022-08-22 23:38:32 +00:00
committed by Compute-Runtime-Automation
parent 9974d95dc3
commit 02cf62902b
28 changed files with 754 additions and 0 deletions

View File

@@ -25,6 +25,35 @@ struct Gen11 {
static constexpr bool isUsingGenericMediaStateClear = true;
static constexpr bool isUsingMiMemFence = false;
struct FrontEndStateSupport {
static constexpr bool scratchSize = true;
static constexpr bool privateScratchSize = false;
};
struct StateComputeModeStateSupport {
static constexpr bool threadArbitration = true;
static constexpr bool coherency = true;
static constexpr bool largeGrf = false;
static constexpr bool zPassAsyncCompute = false;
static constexpr bool pixelAsyncCompute = false;
static constexpr bool preemptionMode = false;
};
struct StateBaseAddressStateSupport {
static constexpr bool globalAtomics = false;
static constexpr bool statelessMocs = true;
};
struct PipelineSelectStateSupport {
static constexpr bool commandSupport = true;
};
struct PreemptionDebugSupport {
static constexpr bool preemptionMode = true;
static constexpr bool stateSip = true;
static constexpr bool csrSurface = true;
};
struct DataPortBindlessSurfaceExtendedMessageDescriptor {
union {
struct {

View File

@@ -28,6 +28,35 @@ struct Gen12Lp {
static constexpr uint32_t stateComputeModeForceNonCoherentMask = (0b11u << 3);
static constexpr bool isUsingMiMemFence = false;
struct FrontEndStateSupport {
static constexpr bool scratchSize = true;
static constexpr bool privateScratchSize = false;
};
struct StateComputeModeStateSupport {
static constexpr bool threadArbitration = false;
static constexpr bool coherency = true;
static constexpr bool largeGrf = false;
static constexpr bool zPassAsyncCompute = false;
static constexpr bool pixelAsyncCompute = false;
static constexpr bool preemptionMode = false;
};
struct StateBaseAddressStateSupport {
static constexpr bool globalAtomics = false;
static constexpr bool statelessMocs = true;
};
struct PipelineSelectStateSupport {
static constexpr bool commandSupport = true;
};
struct PreemptionDebugSupport {
static constexpr bool preemptionMode = true;
static constexpr bool stateSip = true;
static constexpr bool csrSurface = true;
};
struct DataPortBindlessSurfaceExtendedMessageDescriptor {
union {
struct {

View File

@@ -27,6 +27,35 @@ struct Gen8 {
static constexpr bool isUsingGenericMediaStateClear = true;
static constexpr bool isUsingMiMemFence = false;
struct FrontEndStateSupport {
static constexpr bool scratchSize = true;
static constexpr bool privateScratchSize = false;
};
struct StateComputeModeStateSupport {
static constexpr bool threadArbitration = false;
static constexpr bool coherency = true;
static constexpr bool largeGrf = false;
static constexpr bool zPassAsyncCompute = false;
static constexpr bool pixelAsyncCompute = false;
static constexpr bool preemptionMode = false;
};
struct StateBaseAddressStateSupport {
static constexpr bool globalAtomics = false;
static constexpr bool statelessMocs = true;
};
struct PipelineSelectStateSupport {
static constexpr bool commandSupport = true;
};
struct PreemptionDebugSupport {
static constexpr bool preemptionMode = true;
static constexpr bool stateSip = true;
static constexpr bool csrSurface = false;
};
struct DataPortBindlessSurfaceExtendedMessageDescriptor {
union {
struct {

View File

@@ -26,6 +26,35 @@ struct Gen9 {
static constexpr bool isUsingGenericMediaStateClear = true;
static constexpr bool isUsingMiMemFence = false;
struct FrontEndStateSupport {
static constexpr bool scratchSize = true;
static constexpr bool privateScratchSize = false;
};
struct StateComputeModeStateSupport {
static constexpr bool threadArbitration = true;
static constexpr bool coherency = false;
static constexpr bool largeGrf = false;
static constexpr bool zPassAsyncCompute = false;
static constexpr bool pixelAsyncCompute = false;
static constexpr bool preemptionMode = false;
};
struct StateBaseAddressStateSupport {
static constexpr bool globalAtomics = false;
static constexpr bool statelessMocs = true;
};
struct PipelineSelectStateSupport {
static constexpr bool commandSupport = true;
};
struct PreemptionDebugSupport {
static constexpr bool preemptionMode = true;
static constexpr bool stateSip = true;
static constexpr bool csrSurface = true;
};
struct DataPortBindlessSurfaceExtendedMessageDescriptor {
union {
struct {

View File

@@ -136,6 +136,23 @@ class HwInfoConfig {
virtual void adjustNumberOfCcs(HardwareInfo &hwInfo) const = 0;
virtual bool isPrefetcherDisablingInDirectSubmissionRequired() const = 0;
virtual bool getFrontEndPropertyScratchSizeSupport() const = 0;
virtual bool getFrontEndPropertyPrivateScratchSizeSupport() const = 0;
virtual bool getScmPropertyThreadArbitrationSupport() const = 0;
virtual bool getScmPropertyCoherencySupport() const = 0;
virtual bool getScmPropertyZPassAsyncSupport() const = 0;
virtual bool getScmPropertyPixelAsyncSupport() const = 0;
virtual bool getScmPropertyLargeGrfSupport() const = 0;
virtual bool getScmPropertyDevicePreemptionSupport() const = 0;
virtual bool getSbaPropertyGlobalAtomicsSupport() const = 0;
virtual bool getSbaPropertyStatelessMocsSupport() const = 0;
virtual bool getPreemptionDbgPropertyPreemptionModeSupport() const = 0;
virtual bool getPreemptionDbgPropertyStateSipSupport() const = 0;
virtual bool getPreemptionDbgPropertyCsrSurfaceSupport() const = 0;
MOCKABLE_VIRTUAL ~HwInfoConfig() = default;
protected:
@@ -241,6 +258,23 @@ class HwInfoConfigHw : public HwInfoConfig {
void adjustNumberOfCcs(HardwareInfo &hwInfo) const override;
bool isPrefetcherDisablingInDirectSubmissionRequired() const override;
bool getFrontEndPropertyScratchSizeSupport() const override;
bool getFrontEndPropertyPrivateScratchSizeSupport() const override;
bool getScmPropertyThreadArbitrationSupport() const override;
bool getScmPropertyCoherencySupport() const override;
bool getScmPropertyZPassAsyncSupport() const override;
bool getScmPropertyPixelAsyncSupport() const override;
bool getScmPropertyLargeGrfSupport() const override;
bool getScmPropertyDevicePreemptionSupport() const override;
bool getSbaPropertyGlobalAtomicsSupport() const override;
bool getSbaPropertyStatelessMocsSupport() const override;
bool getPreemptionDbgPropertyPreemptionModeSupport() const override;
bool getPreemptionDbgPropertyStateSipSupport() const override;
bool getPreemptionDbgPropertyCsrSurfaceSupport() const override;
protected:
HwInfoConfigHw() = default;

View File

@@ -16,6 +16,8 @@
#include "shared/source/os_interface/hw_info_config.h"
#include "shared/source/unified_memory/usm_memory_support.h"
#include "hw_cmds.h"
#include <bitset>
namespace NEO {
@@ -492,4 +494,83 @@ template <PRODUCT_FAMILY gfxProduct>
bool HwInfoConfigHw<gfxProduct>::isPrefetcherDisablingInDirectSubmissionRequired() const {
return true;
}
template <PRODUCT_FAMILY gfxProduct>
bool HwInfoConfigHw<gfxProduct>::getScmPropertyThreadArbitrationSupport() const {
using GfxProduct = typename HwMapper<gfxProduct>::GfxProduct;
return GfxProduct::StateComputeModeStateSupport::threadArbitration;
}
template <PRODUCT_FAMILY gfxProduct>
bool HwInfoConfigHw<gfxProduct>::getScmPropertyCoherencySupport() const {
using GfxProduct = typename HwMapper<gfxProduct>::GfxProduct;
return GfxProduct::StateComputeModeStateSupport::coherency;
}
template <PRODUCT_FAMILY gfxProduct>
bool HwInfoConfigHw<gfxProduct>::getScmPropertyZPassAsyncSupport() const {
using GfxProduct = typename HwMapper<gfxProduct>::GfxProduct;
return GfxProduct::StateComputeModeStateSupport::zPassAsyncCompute;
}
template <PRODUCT_FAMILY gfxProduct>
bool HwInfoConfigHw<gfxProduct>::getScmPropertyPixelAsyncSupport() const {
using GfxProduct = typename HwMapper<gfxProduct>::GfxProduct;
return GfxProduct::StateComputeModeStateSupport::pixelAsyncCompute;
}
template <PRODUCT_FAMILY gfxProduct>
bool HwInfoConfigHw<gfxProduct>::getScmPropertyLargeGrfSupport() const {
using GfxProduct = typename HwMapper<gfxProduct>::GfxProduct;
return GfxProduct::StateComputeModeStateSupport::largeGrf;
}
template <PRODUCT_FAMILY gfxProduct>
bool HwInfoConfigHw<gfxProduct>::getScmPropertyDevicePreemptionSupport() const {
using GfxProduct = typename HwMapper<gfxProduct>::GfxProduct;
return GfxProduct::StateComputeModeStateSupport::preemptionMode;
}
template <PRODUCT_FAMILY gfxProduct>
bool HwInfoConfigHw<gfxProduct>::getSbaPropertyGlobalAtomicsSupport() const {
using GfxProduct = typename HwMapper<gfxProduct>::GfxProduct;
return GfxProduct::StateBaseAddressStateSupport::globalAtomics;
}
template <PRODUCT_FAMILY gfxProduct>
bool HwInfoConfigHw<gfxProduct>::getSbaPropertyStatelessMocsSupport() const {
using GfxProduct = typename HwMapper<gfxProduct>::GfxProduct;
return GfxProduct::StateBaseAddressStateSupport::statelessMocs;
}
template <PRODUCT_FAMILY gfxProduct>
bool HwInfoConfigHw<gfxProduct>::getPreemptionDbgPropertyPreemptionModeSupport() const {
using GfxProduct = typename HwMapper<gfxProduct>::GfxProduct;
return GfxProduct::PreemptionDebugSupport::preemptionMode;
}
template <PRODUCT_FAMILY gfxProduct>
bool HwInfoConfigHw<gfxProduct>::getPreemptionDbgPropertyStateSipSupport() const {
using GfxProduct = typename HwMapper<gfxProduct>::GfxProduct;
return GfxProduct::PreemptionDebugSupport::stateSip;
}
template <PRODUCT_FAMILY gfxProduct>
bool HwInfoConfigHw<gfxProduct>::getPreemptionDbgPropertyCsrSurfaceSupport() const {
using GfxProduct = typename HwMapper<gfxProduct>::GfxProduct;
return GfxProduct::PreemptionDebugSupport::csrSurface;
}
template <PRODUCT_FAMILY gfxProduct>
bool HwInfoConfigHw<gfxProduct>::getFrontEndPropertyScratchSizeSupport() const {
using GfxProduct = typename HwMapper<gfxProduct>::GfxProduct;
return GfxProduct::FrontEndStateSupport::scratchSize;
}
template <PRODUCT_FAMILY gfxProduct>
bool HwInfoConfigHw<gfxProduct>::getFrontEndPropertyPrivateScratchSizeSupport() const {
using GfxProduct = typename HwMapper<gfxProduct>::GfxProduct;
return GfxProduct::FrontEndStateSupport::privateScratchSize;
}
} // namespace NEO

View File

@@ -34,6 +34,35 @@ struct XeHpCore {
static constexpr bool isUsingGenericMediaStateClear = true;
static constexpr bool isUsingMiMemFence = false;
struct FrontEndStateSupport {
static constexpr bool scratchSize = true;
static constexpr bool privateScratchSize = true;
};
struct StateComputeModeStateSupport {
static constexpr bool threadArbitration = false;
static constexpr bool coherency = true;
static constexpr bool largeGrf = true;
static constexpr bool zPassAsyncCompute = false;
static constexpr bool pixelAsyncCompute = false;
static constexpr bool preemptionMode = false;
};
struct StateBaseAddressStateSupport {
static constexpr bool globalAtomics = true;
static constexpr bool statelessMocs = true;
};
struct PipelineSelectStateSupport {
static constexpr bool commandSupport = true;
};
struct PreemptionDebugSupport {
static constexpr bool preemptionMode = true;
static constexpr bool stateSip = true;
static constexpr bool csrSurface = false;
};
struct DataPortBindlessSurfaceExtendedMessageDescriptor {
union {
struct {

View File

@@ -27,6 +27,36 @@ struct PVC : public XeHpcCoreFamily {
static const uint32_t maxSubslicesSupported = 64;
static const uint32_t maxDualSubslicesSupported = 64;
static const RuntimeCapabilityTable capabilityTable;
struct FrontEndStateSupport {
static constexpr bool scratchSize = true;
static constexpr bool privateScratchSize = true;
};
struct StateComputeModeStateSupport {
static constexpr bool threadArbitration = true;
static constexpr bool coherency = true;
static constexpr bool largeGrf = true;
static constexpr bool zPassAsyncCompute = false;
static constexpr bool pixelAsyncCompute = false;
static constexpr bool preemptionMode = false;
};
struct StateBaseAddressStateSupport {
static constexpr bool globalAtomics = false;
static constexpr bool statelessMocs = true;
};
struct PipelineSelectStateSupport {
static constexpr bool commandSupport = true;
};
struct PreemptionDebugSupport {
static constexpr bool preemptionMode = true;
static constexpr bool stateSip = true;
static constexpr bool csrSurface = false;
};
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig);
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);

View File

@@ -34,6 +34,35 @@ struct XeHpgCore {
static constexpr bool isUsingGenericMediaStateClear = true;
static constexpr bool isUsingMiMemFence = false;
struct FrontEndStateSupport {
static constexpr bool scratchSize = true;
static constexpr bool privateScratchSize = true;
};
struct StateComputeModeStateSupport {
static constexpr bool threadArbitration = false;
static constexpr bool coherency = true;
static constexpr bool largeGrf = true;
static constexpr bool zPassAsyncCompute = true;
static constexpr bool pixelAsyncCompute = true;
static constexpr bool preemptionMode = false;
};
struct StateBaseAddressStateSupport {
static constexpr bool globalAtomics = false;
static constexpr bool statelessMocs = true;
};
struct PipelineSelectStateSupport {
static constexpr bool commandSupport = true;
};
struct PreemptionDebugSupport {
static constexpr bool preemptionMode = true;
static constexpr bool stateSip = true;
static constexpr bool csrSurface = false;
};
struct DataPortBindlessSurfaceExtendedMessageDescriptor {
union {
struct {