mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Share front end state updates between regular and immediate command lists
Related-To: NEO-5019 Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
7f0619e6b9
commit
5986a7199a
@ -74,7 +74,9 @@ CommandStreamReceiver::CommandStreamReceiver(ExecutionEnvironment &executionEnvi
|
||||
this->staticWorkPartitioningEnabled = true;
|
||||
}
|
||||
|
||||
this->systolicModeConfigurable = HwInfoConfig::get(hwInfo.platform.eProductFamily)->isSystolicModeConfigurable(hwInfo);
|
||||
auto hwInfoConfig = HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||
this->systolicModeConfigurable = hwInfoConfig->isSystolicModeConfigurable(hwInfo);
|
||||
hwInfoConfig->fillFrontEndPropertiesSupportStructure(feSupportFlags, hwInfo);
|
||||
}
|
||||
|
||||
CommandStreamReceiver::~CommandStreamReceiver() {
|
||||
|
@ -392,6 +392,7 @@ class CommandStreamReceiver {
|
||||
|
||||
LinearStream commandStream;
|
||||
StreamProperties streamProperties{};
|
||||
FrontEndPropertiesSupport feSupportFlags{};
|
||||
|
||||
// offset for debug state is 1kbyte, tag writes can use multiple offsets for multiple partitions and each offset can vary per platform
|
||||
const uint64_t debugPauseStateAddressOffset = MemoryConstants::kiloByte;
|
||||
|
@ -177,6 +177,7 @@ class CommandStreamReceiverHw : public CommandStreamReceiver {
|
||||
void unregisterDirectSubmissionFromController();
|
||||
constexpr bool isGlobalAtomicsProgrammingRequired(bool currentValue) const;
|
||||
void createKernelArgsBufferAllocation() override;
|
||||
void handleFrontEndStateTransition(DispatchFlags &dispatchFlags);
|
||||
|
||||
HeapDirtyState dshState;
|
||||
HeapDirtyState iohState;
|
||||
|
@ -308,13 +308,7 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
|
||||
}
|
||||
|
||||
if (!logicalStateHelper) {
|
||||
if (dispatchFlags.additionalKernelExecInfo != AdditionalKernelExecInfo::NotApplicable && lastAdditionalKernelExecInfo != dispatchFlags.additionalKernelExecInfo) {
|
||||
setMediaVFEStateDirty(true);
|
||||
}
|
||||
|
||||
if (dispatchFlags.kernelExecutionType != KernelExecutionType::NotApplicable && lastKernelExecutionType != dispatchFlags.kernelExecutionType) {
|
||||
setMediaVFEStateDirty(true);
|
||||
}
|
||||
handleFrontEndStateTransition(dispatchFlags);
|
||||
}
|
||||
|
||||
auto &commandStreamCSR = this->getCS(getRequiredCmdStreamSizeAligned(dispatchFlags, device));
|
||||
@ -970,14 +964,14 @@ inline void CommandStreamReceiverHw<GfxFamily>::programVFEState(LinearStream &cs
|
||||
lastKernelExecutionType = dispatchFlags.kernelExecutionType;
|
||||
}
|
||||
auto &hwInfo = peekHwInfo();
|
||||
|
||||
auto isCooperative = dispatchFlags.kernelExecutionType == KernelExecutionType::Concurrent;
|
||||
auto disableOverdispatch = (dispatchFlags.additionalKernelExecInfo != AdditionalKernelExecInfo::NotSet);
|
||||
streamProperties.frontEndState.setProperties(isCooperative, dispatchFlags.disableEUFusion, disableOverdispatch, osContext->isEngineInstanced(), hwInfo);
|
||||
|
||||
auto &hwHelper = NEO::HwHelper::get(hwInfo.platform.eRenderCoreFamily);
|
||||
const auto &hwInfoConfig = *NEO::HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||
auto engineGroupType = hwHelper.getEngineGroupType(getOsContext().getEngineType(), getOsContext().getEngineUsage(), hwInfo);
|
||||
auto pVfeState = PreambleHelper<GfxFamily>::getSpaceForVfeState(&csr, hwInfo, engineGroupType);
|
||||
auto disableOverdispatch = hwInfoConfig.isDisableOverdispatchAvailable(hwInfo) &&
|
||||
(dispatchFlags.additionalKernelExecInfo != AdditionalKernelExecInfo::NotSet);
|
||||
streamProperties.frontEndState.setProperties(lastKernelExecutionType == KernelExecutionType::Concurrent,
|
||||
dispatchFlags.disableEUFusion, disableOverdispatch, osContext->isEngineInstanced(), hwInfo);
|
||||
PreambleHelper<GfxFamily>::programVfeState(
|
||||
pVfeState, hwInfo, requiredScratchSize, getScratchPatchAddress(),
|
||||
maxFrontEndThreads, streamProperties, logicalStateHelper.get());
|
||||
@ -1477,4 +1471,29 @@ void CommandStreamReceiverHw<GfxFamily>::initializeDeviceWithFirstSubmission() {
|
||||
this->flushSmallTask(commandStream, commandStreamStart);
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
void CommandStreamReceiverHw<GfxFamily>::handleFrontEndStateTransition(DispatchFlags &dispatchFlags) {
|
||||
if (streamProperties.frontEndState.disableOverdispatch.value != -1) {
|
||||
lastAdditionalKernelExecInfo = streamProperties.frontEndState.disableOverdispatch.value == 1 ? AdditionalKernelExecInfo::DisableOverdispatch : AdditionalKernelExecInfo::NotSet;
|
||||
}
|
||||
if (streamProperties.frontEndState.computeDispatchAllWalkerEnable.value != -1) {
|
||||
lastKernelExecutionType = streamProperties.frontEndState.computeDispatchAllWalkerEnable.value == 1 ? KernelExecutionType::Concurrent : KernelExecutionType::Default;
|
||||
}
|
||||
|
||||
if (dispatchFlags.additionalKernelExecInfo != AdditionalKernelExecInfo::NotApplicable && lastAdditionalKernelExecInfo != dispatchFlags.additionalKernelExecInfo &&
|
||||
feSupportFlags.disableOverdispatch) {
|
||||
setMediaVFEStateDirty(true);
|
||||
}
|
||||
|
||||
if (dispatchFlags.kernelExecutionType != KernelExecutionType::NotApplicable && lastKernelExecutionType != dispatchFlags.kernelExecutionType &&
|
||||
feSupportFlags.computeDispatchAllWalker) {
|
||||
setMediaVFEStateDirty(true);
|
||||
}
|
||||
|
||||
if ((streamProperties.frontEndState.disableEUFusion.value == -1 || dispatchFlags.disableEUFusion != !!streamProperties.frontEndState.disableEUFusion.value) &&
|
||||
feSupportFlags.disableEuFusion) {
|
||||
setMediaVFEStateDirty(true);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
Reference in New Issue
Block a user