mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-10 07:08:04 +08:00
Rename command list tracking debug flag and variables
This change reflects exact nature of debug variable and what is code actually doing Related-To: NEO-7187 Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
0d23fa1a98
commit
f0888fece2
@@ -67,6 +67,7 @@ struct CommandList : _ze_command_list_handle_t {
|
||||
CommandType type = Invalid;
|
||||
};
|
||||
using CommandsToPatch = StackVec<CommandToPatch, 16>;
|
||||
using CmdListReturnPoints = StackVec<CmdListReturnPoint, 32>;
|
||||
|
||||
virtual ze_result_t close() = 0;
|
||||
virtual ze_result_t destroy() = 0;
|
||||
@@ -265,7 +266,7 @@ struct CommandList : _ze_command_list_handle_t {
|
||||
return commandsToPatch;
|
||||
}
|
||||
|
||||
std::vector<CmdListReturnPoint> &getReturnPoints() {
|
||||
CmdListReturnPoints &getReturnPoints() {
|
||||
return returnPoints;
|
||||
}
|
||||
|
||||
@@ -305,7 +306,7 @@ struct CommandList : _ze_command_list_handle_t {
|
||||
std::map<const void *, NEO::GraphicsAllocation *> hostPtrMap;
|
||||
std::vector<NEO::GraphicsAllocation *> ownedPrivateAllocations;
|
||||
std::vector<NEO::GraphicsAllocation *> patternAllocations;
|
||||
std::vector<CmdListReturnPoint> returnPoints;
|
||||
CmdListReturnPoints returnPoints;
|
||||
|
||||
NEO::StreamProperties requiredStreamState{};
|
||||
NEO::StreamProperties finalStreamState{};
|
||||
@@ -320,7 +321,7 @@ struct CommandList : _ze_command_list_handle_t {
|
||||
bool containsCooperativeKernelsFlag = false;
|
||||
bool containsStatelessUncachedResource = false;
|
||||
bool performMemoryPrefetch = false;
|
||||
bool multiReturnPointCommandList = false;
|
||||
bool frontEndStateTracking = false;
|
||||
bool systolicModeSupport = false;
|
||||
bool pipelineSelectStateTracking = false;
|
||||
bool stateComputeModeTracking = false;
|
||||
|
||||
@@ -123,9 +123,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::initialize(Device *device, NEO
|
||||
this->commandListPreemptionMode = device->getDevicePreemptionMode();
|
||||
this->engineGroupType = engineGroupType;
|
||||
this->flags = flags;
|
||||
if (this->multiReturnPointCommandList) {
|
||||
this->returnPoints.reserve(32);
|
||||
}
|
||||
|
||||
auto &hwInfo = device->getHwInfo();
|
||||
this->systolicModeSupport = NEO::PreambleHelper<GfxFamily>::isSystolicModeConfigurable(hwInfo);
|
||||
|
||||
@@ -2352,7 +2350,7 @@ void CommandListCoreFamily<gfxCoreFamily>::updateStreamProperties(Kernel &kernel
|
||||
NEO::PreambleHelper<GfxFamily>::programVfeState(pVfeState, hwInfo, 0, 0, device->getMaxNumHwThreads(), finalStreamState, nullptr);
|
||||
commandsToPatch.push_back({pVfeStateAddress, pVfeState, CommandToPatch::FrontEndState});
|
||||
}
|
||||
if (this->multiReturnPointCommandList) {
|
||||
if (this->frontEndStateTracking) {
|
||||
auto &stream = *commandContainer.getCommandStream();
|
||||
NEO::EncodeBatchBufferStartOrEnd<GfxFamily>::programBatchBufferEnd(stream);
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
namespace L0 {
|
||||
|
||||
CommandList::CommandList(uint32_t numIddsPerBlock) : commandContainer(numIddsPerBlock) {
|
||||
multiReturnPointCommandList = L0HwHelper::enableMultiReturnPointCommandList();
|
||||
frontEndStateTracking = L0HwHelper::enableFrontEndStateTracking();
|
||||
pipelineSelectStateTracking = L0HwHelper::enablePipelineSelectStateTracking();
|
||||
stateComputeModeTracking = L0HwHelper::enableStateComputeModeTracking();
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace L0 {
|
||||
CommandQueueAllocatorFn commandQueueFactory[IGFX_MAX_PRODUCT] = {};
|
||||
|
||||
bool CommandQueue::frontEndTrackingEnabled() const {
|
||||
return NEO::DebugManager.flags.AllowPatchingVfeStateInCommandLists.get() || this->multiReturnPointCommandList;
|
||||
return NEO::DebugManager.flags.AllowPatchingVfeStateInCommandLists.get() || this->frontEndStateTracking;
|
||||
}
|
||||
|
||||
CommandQueueImp::CommandQueueImp(Device *device, NEO::CommandStreamReceiver *csr, const ze_command_queue_desc_t *desc)
|
||||
@@ -44,7 +44,7 @@ CommandQueueImp::CommandQueueImp(Device *device, NEO::CommandStreamReceiver *csr
|
||||
useKmdWaitFunction = !!(overrideUseKmdWaitFunction);
|
||||
}
|
||||
|
||||
multiReturnPointCommandList = L0HwHelper::enableMultiReturnPointCommandList();
|
||||
frontEndStateTracking = L0HwHelper::enableFrontEndStateTracking();
|
||||
pipelineSelectStateTracking = L0HwHelper::enablePipelineSelectStateTracking();
|
||||
stateComputeModeTracking = L0HwHelper::enableStateComputeModeTracking();
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ struct CommandQueue : _ze_command_queue_handle_t {
|
||||
bool commandQueueDebugCmdsProgrammed = false;
|
||||
bool isCopyOnlyCommandQueue = false;
|
||||
bool internalUsage = false;
|
||||
bool multiReturnPointCommandList = false;
|
||||
bool frontEndStateTracking = false;
|
||||
bool pipelineSelectStateTracking = false;
|
||||
bool stateComputeModeTracking = false;
|
||||
};
|
||||
|
||||
@@ -70,6 +70,16 @@ struct CommandQueueHw : public CommandQueueImp {
|
||||
|
||||
inline bool isNEODebuggerActive(Device *device);
|
||||
|
||||
NEO::StreamProperties cmdListBeginState{};
|
||||
|
||||
size_t spaceForResidency = 0;
|
||||
NEO::PreemptionMode preemptionMode{};
|
||||
NEO::PreemptionMode statePreemption{};
|
||||
uint32_t perThreadScratchSpaceSize = 0;
|
||||
uint32_t perThreadPrivateScratchSize = 0;
|
||||
int32_t engineInstanced = -1;
|
||||
UnifiedMemoryControls unifiedMemoryControls{};
|
||||
|
||||
bool anyCommandListWithCooperativeKernels = false;
|
||||
bool anyCommandListWithoutCooperativeKernels = false;
|
||||
bool anyCommandListRequiresDisabledEUFusion = false;
|
||||
@@ -78,13 +88,6 @@ struct CommandQueueHw : public CommandQueueImp {
|
||||
bool containsAnyRegularCmdList = false;
|
||||
bool gsbaStateDirty = false;
|
||||
bool frontEndStateDirty = false;
|
||||
size_t spaceForResidency = 0;
|
||||
NEO::StreamProperties cmdListBeginState{};
|
||||
NEO::PreemptionMode preemptionMode{};
|
||||
NEO::PreemptionMode statePreemption{};
|
||||
uint32_t perThreadScratchSpaceSize = 0;
|
||||
uint32_t perThreadPrivateScratchSize = 0;
|
||||
int32_t engineInstanced = -1;
|
||||
const bool isPreemptionModeInitial{false};
|
||||
bool isDevicePreemptionModeMidThread{};
|
||||
bool isDebugEnabled{};
|
||||
@@ -94,7 +97,6 @@ struct CommandQueueHw : public CommandQueueImp {
|
||||
bool isDirectSubmissionEnabled{};
|
||||
bool isDispatchTaskCountPostSyncRequired{};
|
||||
bool hasIndirectAccess{};
|
||||
UnifiedMemoryControls unifiedMemoryControls;
|
||||
};
|
||||
|
||||
ze_result_t validateCommandListsParams(CommandListExecutionContext &ctx,
|
||||
|
||||
@@ -391,7 +391,7 @@ size_t CommandQueueHw<gfxCoreFamily>::estimateFrontEndCmdSizeForMultipleCommandL
|
||||
estimatedSize += singleFrontEndCmdSize;
|
||||
isFrontEndStateDirty = false;
|
||||
}
|
||||
if (this->multiReturnPointCommandList) {
|
||||
if (this->frontEndStateTracking) {
|
||||
uint32_t frontEndChanges = commandList->getReturnPointsSize();
|
||||
estimatedSize += (frontEndChanges * singleFrontEndCmdSize);
|
||||
estimatedSize += (frontEndChanges * NEO::EncodeBatchBufferStartOrEnd<GfxFamily>::getBatchBufferStartSize());
|
||||
@@ -1164,8 +1164,9 @@ void CommandQueueHw<gfxCoreFamily>::programOneCmdListPipelineSelect(CommandList
|
||||
csrState.pipelineSelect.setProperties(cmdListRequired.pipelineSelect);
|
||||
|
||||
if (!preambleSet || csrState.pipelineSelect.isDirty()) {
|
||||
bool systolic = csrState.pipelineSelect.systolicMode.value == 1 ? true : false;
|
||||
NEO::PipelineSelectArgs args = {
|
||||
!!csrState.pipelineSelect.systolicMode.value,
|
||||
systolic,
|
||||
false,
|
||||
false,
|
||||
commandList->getSystolicModeSupport()};
|
||||
|
||||
@@ -15,10 +15,10 @@ L0HwHelper &L0HwHelper::get(GFXCORE_FAMILY gfxCore) {
|
||||
return *l0HwHelperFactory[gfxCore];
|
||||
}
|
||||
|
||||
bool L0HwHelper::enableMultiReturnPointCommandList() {
|
||||
bool L0HwHelper::enableFrontEndStateTracking() {
|
||||
constexpr bool defaultValue = false;
|
||||
if (NEO::DebugManager.flags.MultiReturnPointCommandList.get() != -1) {
|
||||
return !!NEO::DebugManager.flags.MultiReturnPointCommandList.get();
|
||||
if (NEO::DebugManager.flags.EnableFrontEndTracking.get() != -1) {
|
||||
return !!NEO::DebugManager.flags.EnableFrontEndTracking.get();
|
||||
}
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ struct EventPool;
|
||||
class L0HwHelper {
|
||||
public:
|
||||
static L0HwHelper &get(GFXCORE_FAMILY gfxCore);
|
||||
static bool enableMultiReturnPointCommandList();
|
||||
static bool enableFrontEndStateTracking();
|
||||
static bool enablePipelineSelectStateTracking();
|
||||
static bool enableStateComputeModeTracking();
|
||||
virtual void setAdditionalGroupProperty(ze_command_queue_group_properties_t &groupProperty, NEO::EngineGroupT &group) const = 0;
|
||||
|
||||
Reference in New Issue
Block a user