2017-12-21 07:45:38 +08:00
|
|
|
/*
|
2024-03-08 23:30:37 +08:00
|
|
|
* Copyright (C) 2018-2024 Intel Corporation
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
2018-09-18 15:11:08 +08:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
2022-08-30 19:35:43 +08:00
|
|
|
|
2020-02-24 05:44:01 +08:00
|
|
|
#include "shared/source/command_stream/csr_deps.h"
|
2021-05-31 20:04:57 +08:00
|
|
|
#include "shared/source/command_stream/csr_properties_flags.h"
|
2020-12-17 08:36:45 +08:00
|
|
|
#include "shared/source/command_stream/memory_compression_state.h"
|
2022-08-30 19:35:43 +08:00
|
|
|
#include "shared/source/command_stream/preemption_mode.h"
|
2020-02-24 05:44:01 +08:00
|
|
|
#include "shared/source/command_stream/queue_throttle.h"
|
|
|
|
#include "shared/source/command_stream/thread_arbitration_policy.h"
|
|
|
|
#include "shared/source/helpers/pipeline_select_args.h"
|
|
|
|
#include "shared/source/kernel/grf_config.h"
|
2021-09-25 00:40:29 +08:00
|
|
|
#include "shared/source/kernel/kernel_execution_type.h"
|
2020-11-17 18:42:29 +08:00
|
|
|
|
2017-12-21 07:45:38 +08:00
|
|
|
#include <limits>
|
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
namespace NEO {
|
2017-12-21 07:45:38 +08:00
|
|
|
struct FlushStampTrackingObj;
|
2023-06-01 21:21:48 +08:00
|
|
|
struct StreamProperties;
|
2017-12-21 07:45:38 +08:00
|
|
|
|
|
|
|
namespace TimeoutControls {
|
2022-12-08 22:23:49 +08:00
|
|
|
inline constexpr int64_t maxTimeout = std::numeric_limits<int64_t>::max();
|
2017-12-21 07:45:38 +08:00
|
|
|
}
|
2019-08-21 18:50:47 +08:00
|
|
|
|
|
|
|
namespace QueueSliceCount {
|
2022-12-08 22:23:49 +08:00
|
|
|
inline constexpr uint64_t defaultSliceCount = 0;
|
2019-08-21 18:50:47 +08:00
|
|
|
}
|
|
|
|
|
2019-08-22 23:02:37 +08:00
|
|
|
namespace L3CachingSettings {
|
2022-12-08 22:23:49 +08:00
|
|
|
inline constexpr uint32_t l3CacheOn = 0u;
|
|
|
|
inline constexpr uint32_t l3CacheOff = 1u;
|
|
|
|
inline constexpr uint32_t l3AndL1On = 2u;
|
2023-11-30 18:36:43 +08:00
|
|
|
inline constexpr uint32_t notApplicable = 3u;
|
2019-08-22 23:02:37 +08:00
|
|
|
} // namespace L3CachingSettings
|
2017-12-21 07:45:38 +08:00
|
|
|
|
2022-11-30 22:57:18 +08:00
|
|
|
struct DispatchBcsFlags {
|
|
|
|
DispatchBcsFlags() = delete;
|
|
|
|
|
|
|
|
DispatchBcsFlags(bool flushTaskCount, bool hasStallingCmds, bool hasRelaxedOrderingDependencies)
|
|
|
|
: flushTaskCount(flushTaskCount), hasStallingCmds(hasStallingCmds), hasRelaxedOrderingDependencies(hasRelaxedOrderingDependencies) {}
|
|
|
|
|
|
|
|
bool flushTaskCount = false;
|
|
|
|
bool hasStallingCmds = false;
|
|
|
|
bool hasRelaxedOrderingDependencies = false;
|
|
|
|
};
|
|
|
|
|
2017-12-21 07:45:38 +08:00
|
|
|
struct DispatchFlags {
|
2019-09-13 18:00:30 +08:00
|
|
|
DispatchFlags() = delete;
|
2023-10-04 16:58:05 +08:00
|
|
|
DispatchFlags(TimestampPacketContainer *barrierTimestampPacketNodesP, PipelineSelectArgs pipelineSelectArgsP,
|
2021-02-05 00:48:27 +08:00
|
|
|
FlushStampTrackingObj *flushStampReferenceP, QueueThrottle throttleP, PreemptionMode preemptionModeP, uint32_t numGrfRequiredP,
|
2022-03-08 01:00:26 +08:00
|
|
|
uint32_t l3CacheSettingsP, int32_t threadArbitrationPolicyP, uint32_t additionalKernelExecInfoP,
|
2021-02-05 00:48:27 +08:00
|
|
|
KernelExecutionType kernelExecutionTypeP, MemoryCompressionState memoryCompressionStateP,
|
|
|
|
uint64_t sliceCountP, bool blockingP, bool dcFlushP, bool useSLMP, bool guardCommandBufferWithPipeControlP, bool gsba32BitRequiredP,
|
2023-09-12 18:26:59 +08:00
|
|
|
bool lowPriorityP, bool implicitFlushP, bool outOfOrderExecutionAllowedP, bool epilogueRequiredP,
|
2024-03-08 23:30:37 +08:00
|
|
|
bool usePerDSSbackedBufferP, bool areMultipleSubDevicesInContextP, bool memoryMigrationRequiredP, bool textureCacheFlush,
|
2023-10-04 16:58:05 +08:00
|
|
|
bool hasStallingCmds, bool hasRelaxedOrderingDependencies, bool stateCacheInvalidation, bool isStallingCommandsOnNextFlushRequired, bool isDcFlushRequiredOnStallingCommandsOnNextFlush) : barrierTimestampPacketNodes(barrierTimestampPacketNodesP),
|
2023-07-13 17:26:41 +08:00
|
|
|
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){};
|
2020-11-18 21:56:18 +08:00
|
|
|
|
2023-10-04 16:58:05 +08:00
|
|
|
CsrDependencies csrDependencies{};
|
2019-11-12 16:37:16 +08:00
|
|
|
TimestampPacketContainer *barrierTimestampPacketNodes = nullptr;
|
2019-09-10 22:13:11 +08:00
|
|
|
PipelineSelectArgs pipelineSelectArgs;
|
2019-02-15 00:12:15 +08:00
|
|
|
FlushStampTrackingObj *flushStampReference = nullptr;
|
|
|
|
QueueThrottle throttle = QueueThrottle::MEDIUM;
|
|
|
|
PreemptionMode preemptionMode = PreemptionMode::Disabled;
|
2023-11-30 18:36:43 +08:00
|
|
|
uint32_t numGrfRequired = GrfConfig::defaultGrfNumber;
|
2019-08-22 23:02:37 +08:00
|
|
|
uint32_t l3CacheSettings = L3CachingSettings::l3CacheOn;
|
2022-03-08 01:00:26 +08:00
|
|
|
int32_t threadArbitrationPolicy = ThreadArbitrationPolicy::NotPresent;
|
2023-11-30 18:36:43 +08:00
|
|
|
uint32_t additionalKernelExecInfo = AdditionalKernelExecInfo::notApplicable;
|
|
|
|
KernelExecutionType kernelExecutionType = KernelExecutionType::notApplicable;
|
|
|
|
MemoryCompressionState memoryCompressionState = MemoryCompressionState::notApplicable;
|
2019-08-21 18:50:47 +08:00
|
|
|
uint64_t sliceCount = QueueSliceCount::defaultSliceCount;
|
2019-10-11 12:54:10 +08:00
|
|
|
uint64_t engineHints = 0;
|
2017-12-21 07:45:38 +08:00
|
|
|
bool blocking = false;
|
|
|
|
bool dcFlush = false;
|
|
|
|
bool useSLM = false;
|
|
|
|
bool guardCommandBufferWithPipeControl = false;
|
2019-09-13 18:00:30 +08:00
|
|
|
bool gsba32BitRequired = false;
|
2018-01-24 19:00:27 +08:00
|
|
|
bool lowPriority = false;
|
2017-12-21 07:45:38 +08:00
|
|
|
bool implicitFlush = false;
|
|
|
|
bool outOfOrderExecutionAllowed = false;
|
2019-08-08 01:33:40 +08:00
|
|
|
bool epilogueRequired = false;
|
2020-01-29 21:15:10 +08:00
|
|
|
bool usePerDssBackedBuffer = false;
|
2021-03-30 01:06:29 +08:00
|
|
|
bool areMultipleSubDevicesInContext = false;
|
2021-07-02 00:00:22 +08:00
|
|
|
bool memoryMigrationRequired = false;
|
2021-12-06 18:01:46 +08:00
|
|
|
bool textureCacheFlush = false;
|
2022-11-20 02:25:04 +08:00
|
|
|
bool hasStallingCmds = false;
|
2022-11-27 04:10:32 +08:00
|
|
|
bool hasRelaxedOrderingDependencies = false;
|
2022-02-11 07:33:40 +08:00
|
|
|
bool disableEUFusion = false;
|
2023-01-13 00:58:18 +08:00
|
|
|
bool stateCacheInvalidation = false;
|
2023-02-28 20:20:30 +08:00
|
|
|
bool isStallingCommandsOnNextFlushRequired = false;
|
2023-07-13 17:26:41 +08:00
|
|
|
bool isDcFlushRequiredOnStallingCommandsOnNextFlush = false;
|
2017-12-21 07:45:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct CsrSizeRequestFlags {
|
|
|
|
bool l3ConfigChanged = false;
|
|
|
|
bool preemptionRequestChanged = false;
|
|
|
|
bool mediaSamplerConfigChanged = false;
|
|
|
|
bool hasSharedHandles = false;
|
2022-08-31 21:26:29 +08:00
|
|
|
bool systolicPipelineSelectMode = false;
|
2021-09-24 02:13:37 +08:00
|
|
|
bool activePartitionsChanged = false;
|
2017-12-21 07:45:38 +08:00
|
|
|
};
|
2023-06-01 21:21:48 +08:00
|
|
|
|
|
|
|
struct ImmediateDispatchFlags {
|
2023-06-16 01:54:12 +08:00
|
|
|
StreamProperties *requiredState = nullptr;
|
|
|
|
void *sshCpuBase = nullptr;
|
2023-06-27 21:42:31 +08:00
|
|
|
bool blockingAppend = false;
|
|
|
|
bool hasRelaxedOrderingDependencies = false;
|
2023-06-28 03:54:20 +08:00
|
|
|
bool hasStallingCmds = false;
|
2023-06-01 21:21:48 +08:00
|
|
|
};
|
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
} // namespace NEO
|