mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
Add debug flag to control programming of thread arbitration policy with SCM
Related-To: NEO-6801 Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
ec6d580a27
commit
35d1f2e341
@@ -39,9 +39,6 @@ template <typename Family>
|
||||
void EncodeDispatchKernel<Family>::setGrfInfo(INTERFACE_DESCRIPTOR_DATA *pInterfaceDescriptor, uint32_t numGrf,
|
||||
const size_t &sizeCrossThreadData, const size_t &sizePerThreadData,
|
||||
const HardwareInfo &hwInfo) {
|
||||
|
||||
auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||
hwInfoConfig.updateIddCommand(pInterfaceDescriptor, numGrf);
|
||||
}
|
||||
|
||||
template <typename Family>
|
||||
@@ -79,6 +76,10 @@ void EncodeDispatchKernel<Family>::encode(CommandContainer &container,
|
||||
|
||||
EncodeDispatchKernel<Family>::setGrfInfo(&idd, kernelDescriptor.kernelAttributes.numGrfRequired, sizeCrossThreadData,
|
||||
sizePerThreadData, hwInfo);
|
||||
auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||
hwInfoConfig.updateIddCommand(&idd, kernelDescriptor.kernelAttributes.numGrfRequired,
|
||||
args.dispatchInterface->getSchedulingHintExp());
|
||||
|
||||
bool localIdsGenerationByRuntime = args.dispatchInterface->requiresGenerationOfLocalIdsByRuntime();
|
||||
auto requiredWorkgroupOrder = args.dispatchInterface->getRequiredWorkgroupOrder();
|
||||
bool inlineDataProgramming = EncodeDispatchKernel<Family>::inlineDataProgrammingRequired(kernelDescriptor);
|
||||
|
||||
@@ -24,7 +24,7 @@ struct StateComputeModeProperties {
|
||||
void clearIsDirty();
|
||||
|
||||
bool isDirtyExtra() const;
|
||||
void setPropertiesExtra(bool reportNumGrf);
|
||||
void setPropertiesExtra(bool reportNumGrf, bool reportThreadArbitrationPolicy);
|
||||
void setPropertiesExtra(const StateComputeModeProperties &properties);
|
||||
void clearIsDirtyExtra();
|
||||
};
|
||||
|
||||
@@ -51,9 +51,12 @@ void StateComputeModeProperties::setProperties(bool requiresCoherency, uint32_t
|
||||
if (DebugManager.flags.OverrideThreadArbitrationPolicy.get() != -1) {
|
||||
threadArbitrationPolicy = DebugManager.flags.OverrideThreadArbitrationPolicy.get();
|
||||
}
|
||||
this->threadArbitrationPolicy.set(threadArbitrationPolicy);
|
||||
bool reportThreadArbitrationPolicy = hwInfoConfig.isThreadArbitrationPolicyReportedWithScm();
|
||||
if (reportThreadArbitrationPolicy) {
|
||||
this->threadArbitrationPolicy.set(threadArbitrationPolicy);
|
||||
}
|
||||
|
||||
setPropertiesExtra(reportNumGrf);
|
||||
setPropertiesExtra(reportNumGrf, reportThreadArbitrationPolicy);
|
||||
}
|
||||
|
||||
void StateComputeModeProperties::setProperties(const StateComputeModeProperties &properties) {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
void StateComputeModeProperties::setPropertiesExtra(bool reportNumGrf) {
|
||||
void StateComputeModeProperties::setPropertiesExtra(bool reportNumGrf, bool reportThreadArbitrationPolicy) {
|
||||
}
|
||||
void StateComputeModeProperties::setPropertiesExtra(const StateComputeModeProperties &properties) {
|
||||
}
|
||||
|
||||
@@ -161,6 +161,7 @@ DECLARE_DEBUG_VARIABLE(int32_t, OverrideL1CacheControlInSurfaceState, -1, "-1: f
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, OverrideL1CacheControlInSurfaceStateForScratchSpace, -1, "-1: feature inactive, >=0 : following L1 cache control value will be programmed in render surface state for scratch space")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, OverridePreferredSlmAllocationSizePerDss, -1, "-1: default, >=0: program value for preferred SLM allocation size per dss")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, ForceGrfNumProgrammingWithScm, -1, "-1: default, 0: do not program grf num with SCM, 1: program grf num with SCM")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, ForceThreadArbitrationPolicyProgrammingWithScm, -1, "-1: default, 0: do not program thread arbitration policy with SCM, 1: program thread arbitration policy with SCM")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, ForceL3PrefetchForComputeWalker, -1, "-1: default, 0: disable, 1: enable")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, ForceZPassAsyncComputeThreadLimit, -1, "-1: default, >0: Limit value in STATE_COMPUTE_MODE")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, ForcePixelAsyncComputeThreadLimit, -1, "-1: default, >0: Limit value in STATE_COMPUTE_MODE")
|
||||
|
||||
@@ -5172,7 +5172,8 @@ typedef struct tagINTERFACE_DESCRIPTOR_DATA {
|
||||
// DWORD 1
|
||||
uint64_t Reserved_32 : BITFIELD_RANGE(32, 63);
|
||||
// DWORD 2
|
||||
uint32_t Reserved_64 : BITFIELD_RANGE(0, 6);
|
||||
uint32_t Reserved_64 : BITFIELD_RANGE(0, 1);
|
||||
uint32_t Reserved_66 : BITFIELD_RANGE(2, 6);
|
||||
uint32_t SoftwareExceptionEnable : BITFIELD_RANGE(7, 7);
|
||||
uint32_t Reserved_72 : BITFIELD_RANGE(8, 10);
|
||||
uint32_t MaskStackExceptionEnable : BITFIELD_RANGE(11, 11);
|
||||
|
||||
@@ -46,6 +46,8 @@ struct DispatchKernelEncoderI {
|
||||
virtual uint32_t getRequiredWorkgroupOrder() const = 0;
|
||||
virtual bool requiresGenerationOfLocalIdsByRuntime() const = 0;
|
||||
|
||||
virtual int32_t getSchedulingHintExp() const = 0;
|
||||
|
||||
virtual ImplicitArgs *getImplicitArgs() const = 0;
|
||||
};
|
||||
} // namespace NEO
|
||||
|
||||
@@ -53,7 +53,7 @@ class HwInfoConfig {
|
||||
virtual uint32_t getMaxThreadsForWorkgroup(const HardwareInfo &hwInfo, uint32_t maxNumEUsPerSubSlice) const = 0;
|
||||
virtual void setForceNonCoherent(void *const commandPtr, const StateComputeModeProperties &properties) = 0;
|
||||
virtual void updateScmCommand(void *const commandPtr, const StateComputeModeProperties &properties) = 0;
|
||||
virtual void updateIddCommand(void *const commandPtr, uint32_t numGrf) = 0;
|
||||
virtual void updateIddCommand(void *const commandPtr, uint32_t numGrf, int32_t threadArbitrationPolicy) = 0;
|
||||
virtual bool obtainBlitterPreference(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool isBlitterFullySupported(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool isPageTableManagerSupported(const HardwareInfo &hwInfo) const = 0;
|
||||
@@ -104,6 +104,7 @@ class HwInfoConfig {
|
||||
virtual bool useChannelRedForUnusedShaderChannels() const = 0;
|
||||
virtual bool isIpSamplingSupported(const NEO::HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool isGrfNumReportedWithScm() const = 0;
|
||||
virtual bool isThreadArbitrationPolicyReportedWithScm() const = 0;
|
||||
virtual bool isCooperativeEngineSupported(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool isTimestampWaitSupportedForEvents() const = 0;
|
||||
virtual bool isTilePlacementResourceWaRequired(const HardwareInfo &hwInfo) const = 0;
|
||||
@@ -146,7 +147,7 @@ class HwInfoConfigHw : public HwInfoConfig {
|
||||
uint32_t getMaxThreadsForWorkgroup(const HardwareInfo &hwInfo, uint32_t maxNumEUsPerSubSlice) const override;
|
||||
void setForceNonCoherent(void *const commandPtr, const StateComputeModeProperties &properties) override;
|
||||
void updateScmCommand(void *const commandPtr, const StateComputeModeProperties &properties) override;
|
||||
void updateIddCommand(void *const commandPtr, uint32_t numGrf) override;
|
||||
void updateIddCommand(void *const commandPtr, uint32_t numGrf, int32_t threadArbitrationPolicy) override;
|
||||
bool obtainBlitterPreference(const HardwareInfo &hwInfo) const override;
|
||||
bool isBlitterFullySupported(const HardwareInfo &hwInfo) const override;
|
||||
bool isPageTableManagerSupported(const HardwareInfo &hwInfo) const override;
|
||||
@@ -197,6 +198,7 @@ class HwInfoConfigHw : public HwInfoConfig {
|
||||
bool useChannelRedForUnusedShaderChannels() const override;
|
||||
bool isIpSamplingSupported(const NEO::HardwareInfo &hwInfo) const override;
|
||||
bool isGrfNumReportedWithScm() const override;
|
||||
bool isThreadArbitrationPolicyReportedWithScm() const override;
|
||||
bool isCooperativeEngineSupported(const HardwareInfo &hwInfo) const override;
|
||||
bool isTimestampWaitSupportedForEvents() const override;
|
||||
bool isTilePlacementResourceWaRequired(const HardwareInfo &hwInfo) const override;
|
||||
|
||||
@@ -120,7 +120,7 @@ template <PRODUCT_FAMILY gfxProduct>
|
||||
void HwInfoConfigHw<gfxProduct>::updateScmCommand(void *const commandPtr, const StateComputeModeProperties &properties) {}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
void HwInfoConfigHw<gfxProduct>::updateIddCommand(void *const commandPtr, uint32_t numGrf) {}
|
||||
void HwInfoConfigHw<gfxProduct>::updateIddCommand(void *const commandPtr, uint32_t numGrf, int32_t threadArbitrationPolicy) {}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
bool HwInfoConfigHw<gfxProduct>::isPageTableManagerSupported(const HardwareInfo &hwInfo) const {
|
||||
@@ -359,6 +359,14 @@ bool HwInfoConfigHw<gfxProduct>::isGrfNumReportedWithScm() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
bool HwInfoConfigHw<gfxProduct>::isThreadArbitrationPolicyReportedWithScm() const {
|
||||
if (DebugManager.flags.ForceThreadArbitrationPolicyProgrammingWithScm.get() != -1) {
|
||||
return DebugManager.flags.ForceThreadArbitrationPolicyProgrammingWithScm.get();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
bool HwInfoConfigHw<gfxProduct>::isCooperativeEngineSupported(const HardwareInfo &hwInfo) const {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user