1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
|
/*
* Copyright (C) 2018-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/command_stream/csr_deps.h"
#include "shared/source/command_stream/csr_properties_flags.h"
#include "shared/source/command_stream/memory_compression_state.h"
#include "shared/source/command_stream/preemption_mode.h"
#include "shared/source/command_stream/queue_throttle.h"
#include "shared/source/command_stream/thread_arbitration_policy.h"
#include "shared/source/helpers/append_operations.h"
#include "shared/source/helpers/pipeline_select_args.h"
#include "shared/source/kernel/grf_config.h"
#include "shared/source/kernel/kernel_execution_type.h"
#include <limits>
namespace NEO {
class LinearStream;
struct FlushStampTrackingObj;
struct StreamProperties;
namespace TimeoutControls {
inline constexpr int64_t maxTimeout = std::numeric_limits<int64_t>::max();
}
namespace QueueSliceCount {
inline constexpr uint64_t defaultSliceCount = 0;
}
namespace L3CachingSettings {
inline constexpr uint32_t l3CacheOn = 0u;
inline constexpr uint32_t l3CacheOff = 1u;
inline constexpr uint32_t l3AndL1On = 2u;
inline constexpr uint32_t notApplicable = 3u;
} // namespace L3CachingSettings
struct DispatchBcsFlags {
DispatchBcsFlags() = delete;
DispatchBcsFlags(bool flushTaskCount, bool hasStallingCmds, bool hasRelaxedOrderingDependencies)
: flushTaskCount(flushTaskCount), hasStallingCmds(hasStallingCmds), hasRelaxedOrderingDependencies(hasRelaxedOrderingDependencies) {}
LinearStream *optionalEpilogueCmdStream = nullptr;
AppendOperations dispatchOperation = AppendOperations::none;
bool flushTaskCount = false;
bool hasStallingCmds = false;
bool hasRelaxedOrderingDependencies = false;
};
struct DispatchFlags {
DispatchFlags() = delete;
DispatchFlags(TimestampPacketContainer *barrierTimestampPacketNodesP, PipelineSelectArgs pipelineSelectArgsP,
FlushStampTrackingObj *flushStampReferenceP, QueueThrottle throttleP, PreemptionMode preemptionModeP, uint32_t numGrfRequiredP,
uint32_t l3CacheSettingsP, int32_t threadArbitrationPolicyP, uint32_t additionalKernelExecInfoP,
KernelExecutionType kernelExecutionTypeP, MemoryCompressionState memoryCompressionStateP,
uint64_t sliceCountP, bool blockingP, bool dcFlushP, bool useSLMP, bool guardCommandBufferWithPipeControlP, bool gsba32BitRequiredP,
bool lowPriorityP, bool implicitFlushP, bool outOfOrderExecutionAllowedP, bool epilogueRequiredP,
bool usePerDSSbackedBufferP, bool areMultipleSubDevicesInContextP, bool memoryMigrationRequiredP, bool textureCacheFlush,
bool hasStallingCmds, bool hasRelaxedOrderingDependencies, bool stateCacheInvalidation, bool isStallingCommandsOnNextFlushRequired, bool isDcFlushRequiredOnStallingCommandsOnNextFlush) : barrierTimestampPacketNodes(barrierTimestampPacketNodesP),
pipelineSelectArgs(pipelineSelectArgsP),
flushStampReference(flushStampReferenceP),
throttle(throttleP),
preemptionMode(preemptionModeP),
numGrfRequired(numGrfRequiredP),
l3CacheSettings(l3CacheSettingsP),
threadArbitrationPolicy(threadArbitrationPolicyP),
additionalKernelExecInfo(additionalKernelExecInfoP),
kernelExecutionType(kernelExecutionTypeP),
memoryCompressionState(memoryCompressionStateP),
sliceCount(sliceCountP),
blocking(blockingP),
dcFlush(dcFlushP),
useSLM(useSLMP),
guardCommandBufferWithPipeControl(guardCommandBufferWithPipeControlP),
gsba32BitRequired(gsba32BitRequiredP),
lowPriority(lowPriorityP),
implicitFlush(implicitFlushP),
outOfOrderExecutionAllowed(outOfOrderExecutionAllowedP),
epilogueRequired(epilogueRequiredP),
usePerDssBackedBuffer(usePerDSSbackedBufferP),
areMultipleSubDevicesInContext(areMultipleSubDevicesInContextP),
memoryMigrationRequired(memoryMigrationRequiredP),
textureCacheFlush(textureCacheFlush),
hasStallingCmds(hasStallingCmds),
hasRelaxedOrderingDependencies(hasRelaxedOrderingDependencies),
stateCacheInvalidation(stateCacheInvalidation),
isStallingCommandsOnNextFlushRequired(isStallingCommandsOnNextFlushRequired),
isDcFlushRequiredOnStallingCommandsOnNextFlush(isDcFlushRequiredOnStallingCommandsOnNextFlush){};
CsrDependencies csrDependencies{};
TimestampPacketContainer *barrierTimestampPacketNodes = nullptr;
PipelineSelectArgs pipelineSelectArgs;
FlushStampTrackingObj *flushStampReference = nullptr;
LinearStream *optionalEpilogueCmdStream = nullptr;
QueueThrottle throttle = QueueThrottle::MEDIUM;
PreemptionMode preemptionMode = PreemptionMode::Disabled;
uint32_t numGrfRequired = GrfConfig::defaultGrfNumber;
uint32_t l3CacheSettings = L3CachingSettings::l3CacheOn;
int32_t threadArbitrationPolicy = ThreadArbitrationPolicy::NotPresent;
uint32_t additionalKernelExecInfo = AdditionalKernelExecInfo::notApplicable;
KernelExecutionType kernelExecutionType = KernelExecutionType::notApplicable;
MemoryCompressionState memoryCompressionState = MemoryCompressionState::notApplicable;
uint64_t sliceCount = QueueSliceCount::defaultSliceCount;
uint64_t engineHints = 0;
bool blocking = false;
bool dcFlush = false;
bool useSLM = false;
bool guardCommandBufferWithPipeControl = false;
bool gsba32BitRequired = false;
bool lowPriority = false;
bool implicitFlush = false;
bool outOfOrderExecutionAllowed = false;
bool epilogueRequired = false;
bool usePerDssBackedBuffer = false;
bool areMultipleSubDevicesInContext = false;
bool memoryMigrationRequired = false;
bool textureCacheFlush = false;
bool hasStallingCmds = false;
bool hasRelaxedOrderingDependencies = false;
bool disableEUFusion = false;
bool stateCacheInvalidation = false;
bool isStallingCommandsOnNextFlushRequired = false;
bool isDcFlushRequiredOnStallingCommandsOnNextFlush = false;
bool isWalkerWithProfilingEnqueued = false;
};
struct CsrSizeRequestFlags {
bool l3ConfigChanged = false;
bool preemptionRequestChanged = false;
bool hasSharedHandles = false;
bool systolicPipelineSelectMode = false;
bool activePartitionsChanged = false;
};
struct ImmediateDispatchFlags {
StreamProperties *requiredState = nullptr;
void *sshCpuBase = nullptr;
LinearStream *optionalEpilogueCmdStream = nullptr;
AppendOperations dispatchOperation = AppendOperations::none;
bool blockingAppend = false;
bool requireTaskCountUpdate = false;
bool hasRelaxedOrderingDependencies = false;
bool hasStallingCmds = false;
bool isWalkerWithProfilingEnqueued = false;
};
} // namespace NEO
|