mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 15:53:45 +08:00
Remove redundant value CsrSizeRequestFlags::numGrfRequiredChanged
Related-To: NEO-5995 Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
adc5fb30d7
commit
32b0f7b014
@@ -154,7 +154,6 @@ void CommandContainer::reset() {
|
||||
|
||||
iddBlock = nullptr;
|
||||
nextIddInBlock = this->getNumIddPerBlock();
|
||||
lastSentNumGrfRequired = 0;
|
||||
lastPipelineSelectModeRequired = false;
|
||||
lastSentUseGlobalAtomics = false;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,6 @@ class CommandContainer : public NonCopyableOrMovableClass {
|
||||
|
||||
uint32_t slmSize = std::numeric_limits<uint32_t>::max();
|
||||
uint32_t nextIddInBlock = 0;
|
||||
uint32_t lastSentNumGrfRequired = 0;
|
||||
bool lastPipelineSelectModeRequired = false;
|
||||
bool lastSentUseGlobalAtomics = false;
|
||||
|
||||
|
||||
@@ -384,7 +384,6 @@ class CommandStreamReceiver {
|
||||
std::chrono::microseconds gpuHangCheckPeriod{500'000};
|
||||
uint32_t lastSentL3Config = 0;
|
||||
uint32_t latestSentStatelessMocsConfig = 0;
|
||||
uint32_t lastSentNumGrfRequired = GrfConfig::DefaultGrfNumber;
|
||||
uint64_t lastSentSliceCount = QueueSliceCount::defaultSliceCount;
|
||||
|
||||
uint32_t requiredScratchSize = 0;
|
||||
|
||||
@@ -75,7 +75,6 @@ class CommandStreamReceiverHw : public CommandStreamReceiver {
|
||||
size_t getCmdSizeForComputeMode();
|
||||
MOCKABLE_VIRTUAL bool hasSharedHandles();
|
||||
|
||||
bool isComputeModeNeeded() const;
|
||||
bool isPipelineSelectAlreadyProgrammed() const;
|
||||
void programComputeMode(LinearStream &csr, DispatchFlags &dispatchFlags, const HardwareInfo &hwInfo);
|
||||
|
||||
|
||||
@@ -268,10 +268,6 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
|
||||
dispatchFlags.pipelineSelectArgs.specialPipelineSelectMode,
|
||||
hwInfo);
|
||||
|
||||
if (dispatchFlags.numGrfRequired == GrfConfig::NotApplicable) {
|
||||
dispatchFlags.numGrfRequired = lastSentNumGrfRequired;
|
||||
}
|
||||
|
||||
auto requiresCoherency = hwHelper.forceNonGpuCoherencyWA(dispatchFlags.requiresCoherency);
|
||||
this->streamProperties.stateComputeMode.setProperties(requiresCoherency, dispatchFlags.numGrfRequired,
|
||||
dispatchFlags.threadArbitrationPolicy, hwInfo);
|
||||
@@ -281,9 +277,6 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
|
||||
csrSizeRequestFlags.mediaSamplerConfigChanged = this->lastMediaSamplerConfig != static_cast<int8_t>(dispatchFlags.pipelineSelectArgs.mediaSamplerRequired);
|
||||
csrSizeRequestFlags.specialPipelineSelectModeChanged = isSpecialPipelineSelectModeChanged;
|
||||
|
||||
csrSizeRequestFlags.numGrfRequiredChanged = this->lastSentNumGrfRequired != dispatchFlags.numGrfRequired;
|
||||
lastSentNumGrfRequired = dispatchFlags.numGrfRequired;
|
||||
|
||||
csrSizeRequestFlags.activePartitionsChanged = isProgramActivePartitionConfigRequired();
|
||||
|
||||
auto force32BitAllocations = getMemoryManager()->peekForce32BitAllocations();
|
||||
@@ -809,7 +802,7 @@ size_t CommandStreamReceiverHw<GfxFamily>::getRequiredCmdStreamSize(const Dispat
|
||||
size += sizeof(typename GfxFamily::MI_BATCH_BUFFER_START);
|
||||
|
||||
size += getCmdSizeForL3Config();
|
||||
if (isComputeModeNeeded()) {
|
||||
if (this->streamProperties.stateComputeMode.isDirty()) {
|
||||
size += getCmdSizeForComputeMode();
|
||||
}
|
||||
size += getCmdSizeForMediaSampler(dispatchFlags.pipelineSelectArgs.mediaSamplerRequired);
|
||||
@@ -1373,7 +1366,7 @@ inline MemoryCompressionState CommandStreamReceiverHw<GfxFamily>::getMemoryCompr
|
||||
template <typename GfxFamily>
|
||||
inline bool CommandStreamReceiverHw<GfxFamily>::isPipelineSelectAlreadyProgrammed() const {
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(peekHwInfo().platform.eProductFamily);
|
||||
return isComputeModeNeeded() && hwInfoConfig.is3DPipelineSelectWARequired() && isRcs();
|
||||
return this->streamProperties.stateComputeMode.isDirty() && hwInfoConfig.is3DPipelineSelectWARequired() && isRcs();
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
|
||||
@@ -9,25 +9,18 @@
|
||||
#include "shared/source/command_stream/command_stream_receiver_hw.h"
|
||||
#include "shared/source/device/device.h"
|
||||
#include "shared/source/helpers/pipe_control_args.h"
|
||||
#include "shared/source/helpers/state_compute_mode_helper.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
|
||||
namespace NEO {
|
||||
template <typename GfxFamily>
|
||||
void CommandStreamReceiverHw<GfxFamily>::programComputeMode(LinearStream &stream, DispatchFlags &dispatchFlags, const HardwareInfo &hwInfo) {
|
||||
if (isComputeModeNeeded()) {
|
||||
if (this->streamProperties.stateComputeMode.isDirty()) {
|
||||
EncodeComputeMode<GfxFamily>::programComputeModeCommandWithSynchronization(
|
||||
stream, this->streamProperties.stateComputeMode, dispatchFlags.pipelineSelectArgs,
|
||||
hasSharedHandles(), hwInfo, isRcs());
|
||||
}
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
inline bool CommandStreamReceiverHw<GfxFamily>::isComputeModeNeeded() const {
|
||||
return StateComputeModeHelper<Family>::isStateComputeModeRequired(csrSizeRequestFlags, false) ||
|
||||
this->streamProperties.stateComputeMode.isDirty();
|
||||
}
|
||||
|
||||
template <>
|
||||
inline void CommandStreamReceiverHw<Family>::addPipeControlBeforeStateBaseAddress(LinearStream &commandStream) {
|
||||
PipeControlArgs args;
|
||||
|
||||
@@ -123,7 +123,6 @@ struct CsrSizeRequestFlags {
|
||||
bool preemptionRequestChanged = false;
|
||||
bool mediaSamplerConfigChanged = false;
|
||||
bool hasSharedHandles = false;
|
||||
bool numGrfRequiredChanged = false;
|
||||
bool specialPipelineSelectModeChanged = false;
|
||||
bool activePartitionsChanged = false;
|
||||
};
|
||||
|
||||
@@ -19,8 +19,10 @@ void StateComputeModeProperties::setProperties(bool requiresCoherency, uint32_t
|
||||
int32_t isCoherencyRequired = (requiresCoherency ? 1 : 0);
|
||||
this->isCoherencyRequired.set(isCoherencyRequired);
|
||||
|
||||
int32_t largeGrfMode = (numGrfRequired == GrfConfig::LargeGrfNumber ? 1 : 0);
|
||||
this->largeGrfMode.set(largeGrfMode);
|
||||
if (this->largeGrfMode.value == -1 || numGrfRequired != GrfConfig::NotApplicable) {
|
||||
int32_t largeGrfMode = (numGrfRequired == GrfConfig::LargeGrfNumber ? 1 : 0);
|
||||
this->largeGrfMode.set(largeGrfMode);
|
||||
}
|
||||
|
||||
int32_t zPassAsyncComputeThreadLimit = -1;
|
||||
if (DebugManager.flags.ForceZPassAsyncComputeThreadLimit.get() != -1) {
|
||||
|
||||
@@ -160,10 +160,6 @@ macro(macro_for_each_core_type)
|
||||
endif()
|
||||
|
||||
endforeach()
|
||||
set(SRC_FILE "${CORE_COREX_PREFIX}/state_compute_mode_helper_${CORE_TYPE_LOWER}.cpp")
|
||||
if(EXISTS ${SRC_FILE})
|
||||
list(APPEND CORE_SRCS_${CORE_TYPE}_CPP_BASE ${SRC_FILE})
|
||||
endif()
|
||||
if(EXISTS ${GENERATED_COREX_PREFIX}/hw_cmds_generated_${CORE_TYPE_LOWER}.inl)
|
||||
list(APPEND CORE_SRCS_${CORE_TYPE}_H_BASE "${GENERATED_COREX_PREFIX}/hw_cmds_generated_${CORE_TYPE_LOWER}.inl")
|
||||
endif()
|
||||
|
||||
@@ -19,18 +19,13 @@ static auto gfxCore = IGFX_GEN11_CORE;
|
||||
|
||||
template <>
|
||||
void CommandStreamReceiverHw<Family>::programComputeMode(LinearStream &stream, DispatchFlags &dispatchFlags, const HardwareInfo &hwInfo) {
|
||||
if (this->isComputeModeNeeded()) {
|
||||
if (this->streamProperties.stateComputeMode.isCoherencyRequired.isDirty) {
|
||||
EncodeComputeMode<Family>::programComputeModeCommandWithSynchronization(
|
||||
stream, this->streamProperties.stateComputeMode, dispatchFlags.pipelineSelectArgs,
|
||||
hasSharedHandles(), hwInfo, isRcs());
|
||||
}
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
inline bool CommandStreamReceiverHw<GfxFamily>::isComputeModeNeeded() const {
|
||||
return this->streamProperties.stateComputeMode.isCoherencyRequired.isDirty;
|
||||
}
|
||||
|
||||
template <>
|
||||
void CommandStreamReceiverHw<Family>::programMediaSampler(LinearStream &stream, DispatchFlags &dispatchFlags) {
|
||||
using PWR_CLK_STATE_REGISTER = Family::PWR_CLK_STATE_REGISTER;
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/helpers/state_compute_mode_helper.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
template <>
|
||||
bool StateComputeModeHelper<TGLLPFamily>::isStateComputeModeRequired(const CsrSizeRequestFlags &csrSizeRequestFlags, bool isThreadArbitionPolicyProgrammed) {
|
||||
return csrSizeRequestFlags.numGrfRequiredChanged;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
@@ -19,11 +19,6 @@ template <>
|
||||
void CommandStreamReceiverHw<Family>::programComputeMode(LinearStream &stream, DispatchFlags &dispatchFlags, const HardwareInfo &hwInfo) {
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
inline bool CommandStreamReceiverHw<GfxFamily>::isComputeModeNeeded() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
template <>
|
||||
void populateFactoryTable<CommandStreamReceiverHw<Family>>() {
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * IGFX_MAX_CORE];
|
||||
|
||||
@@ -19,11 +19,6 @@ template <>
|
||||
void CommandStreamReceiverHw<Family>::programComputeMode(LinearStream &stream, DispatchFlags &dispatchFlags, const HardwareInfo &hwInfo) {
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
inline bool CommandStreamReceiverHw<GfxFamily>::isComputeModeNeeded() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
template <>
|
||||
void populateFactoryTable<CommandStreamReceiverHw<Family>>() {
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * IGFX_MAX_CORE];
|
||||
|
||||
@@ -116,7 +116,6 @@ set(NEO_CORE_HELPERS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/state_base_address_bdw_and_later.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/state_base_address_icllp_and_later.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/state_base_address_skl.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/state_compute_mode_helper.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/stdio.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/string.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/string_helpers.h
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "shared/source/command_stream/csr_definitions.h"
|
||||
|
||||
#include "hw_cmds.h"
|
||||
|
||||
namespace NEO {
|
||||
template <typename GfxFamily>
|
||||
struct StateComputeModeHelper {
|
||||
static bool isStateComputeModeRequired(const CsrSizeRequestFlags &csrSizeRequestFlags, bool isThreadArbitionPolicyProgrammed);
|
||||
};
|
||||
} // namespace NEO
|
||||
@@ -1,17 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/helpers/state_compute_mode_helper.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
template <>
|
||||
bool StateComputeModeHelper<XeHpFamily>::isStateComputeModeRequired(const CsrSizeRequestFlags &csrSizeRequestFlags, bool isThreadArbitionPolicyProgrammed) {
|
||||
return csrSizeRequestFlags.numGrfRequiredChanged;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
@@ -16,7 +16,6 @@ using Family = NEO::XE_HPC_COREFamily;
|
||||
#include "shared/source/command_stream/command_stream_receiver_hw_xehp_and_later.inl"
|
||||
#include "shared/source/helpers/blit_commands_helper_xehp_and_later.inl"
|
||||
#include "shared/source/helpers/populate_factory.h"
|
||||
#include "shared/source/helpers/state_compute_mode_helper.h"
|
||||
|
||||
namespace NEO {
|
||||
static auto gfxCore = IGFX_XE_HPC_CORE;
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/helpers/state_compute_mode_helper.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
using Family = XE_HPC_COREFamily;
|
||||
|
||||
template <>
|
||||
bool StateComputeModeHelper<Family>::isStateComputeModeRequired(const CsrSizeRequestFlags &csrSizeRequestFlags, bool isThreadArbitionPolicyProgrammed) {
|
||||
return csrSizeRequestFlags.numGrfRequiredChanged;
|
||||
}
|
||||
|
||||
template struct StateComputeModeHelper<Family>;
|
||||
|
||||
} // namespace NEO
|
||||
@@ -1,17 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/helpers/state_compute_mode_helper.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
template <>
|
||||
bool StateComputeModeHelper<XE_HPG_COREFamily>::isStateComputeModeRequired(const CsrSizeRequestFlags &csrSizeRequestFlags, bool isThreadArbitionPolicyProgrammed) {
|
||||
return csrSizeRequestFlags.numGrfRequiredChanged;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
Reference in New Issue
Block a user