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