2017-12-21 07:45:38 +08:00
|
|
|
/*
|
2022-02-11 07:33:40 +08:00
|
|
|
* Copyright (C) 2018-2022 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
|
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"
|
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"
|
2020-04-02 17:28:38 +08:00
|
|
|
#include "shared/source/helpers/constants.h"
|
2020-02-24 05:44:01 +08:00
|
|
|
#include "shared/source/helpers/hw_info.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;
|
|
|
|
|
|
|
|
namespace CSRequirements {
|
|
|
|
//cleanup section usually contains 1-2 pipeControls BB end and place for BB start
|
|
|
|
//that makes 16 * 2 + 4 + 8 = 40 bytes
|
|
|
|
//then command buffer is aligned to cacheline that can take up to 63 bytes
|
|
|
|
//to be sure everything fits minimal size is at 2 x cacheline.
|
|
|
|
|
|
|
|
constexpr auto minCommandQueueCommandStreamSize = 2 * MemoryConstants::cacheLineSize;
|
|
|
|
constexpr auto csOverfetchSize = MemoryConstants::pageSize;
|
|
|
|
} // namespace CSRequirements
|
|
|
|
|
|
|
|
namespace TimeoutControls {
|
|
|
|
constexpr int64_t maxTimeout = std::numeric_limits<int64_t>::max();
|
|
|
|
}
|
2019-08-21 18:50:47 +08:00
|
|
|
|
|
|
|
namespace QueueSliceCount {
|
|
|
|
constexpr uint64_t defaultSliceCount = 0;
|
|
|
|
}
|
|
|
|
|
2019-08-22 23:02:37 +08:00
|
|
|
namespace L3CachingSettings {
|
|
|
|
constexpr uint32_t l3CacheOn = 0u;
|
|
|
|
constexpr uint32_t l3CacheOff = 1u;
|
2019-08-26 23:03:13 +08:00
|
|
|
constexpr uint32_t l3AndL1On = 2u;
|
2020-08-20 17:48:10 +08:00
|
|
|
constexpr uint32_t NotApplicable = 3u;
|
2019-08-22 23:02:37 +08:00
|
|
|
} // namespace L3CachingSettings
|
2017-12-21 07:45:38 +08:00
|
|
|
|
|
|
|
struct DispatchFlags {
|
2019-09-13 18:00:30 +08:00
|
|
|
DispatchFlags() = delete;
|
2021-02-05 00:48:27 +08:00
|
|
|
DispatchFlags(CsrDependencies csrDependenciesP, TimestampPacketContainer *barrierTimestampPacketNodesP, PipelineSelectArgs pipelineSelectArgsP,
|
|
|
|
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,
|
|
|
|
bool requiresCoherencyP, bool lowPriorityP, bool implicitFlushP, bool outOfOrderExecutionAllowedP, bool epilogueRequiredP,
|
2021-12-06 18:01:46 +08:00
|
|
|
bool usePerDSSbackedBufferP, bool useSingleSubdeviceP, bool useGlobalAtomicsP, bool areMultipleSubDevicesInContextP, bool memoryMigrationRequiredP, bool textureCacheFlush) : csrDependencies(csrDependenciesP),
|
|
|
|
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),
|
|
|
|
requiresCoherency(requiresCoherencyP),
|
|
|
|
lowPriority(lowPriorityP),
|
|
|
|
implicitFlush(implicitFlushP),
|
|
|
|
outOfOrderExecutionAllowed(outOfOrderExecutionAllowedP),
|
|
|
|
epilogueRequired(epilogueRequiredP),
|
|
|
|
usePerDssBackedBuffer(usePerDSSbackedBufferP),
|
|
|
|
useSingleSubdevice(useSingleSubdeviceP),
|
|
|
|
useGlobalAtomics(useGlobalAtomicsP),
|
|
|
|
areMultipleSubDevicesInContext(areMultipleSubDevicesInContextP),
|
|
|
|
memoryMigrationRequired(memoryMigrationRequiredP),
|
|
|
|
textureCacheFlush(textureCacheFlush){};
|
2020-11-18 21:56:18 +08:00
|
|
|
|
2019-02-15 00:12:15 +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;
|
|
|
|
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;
|
2020-09-02 17:38:54 +08:00
|
|
|
uint32_t additionalKernelExecInfo = AdditionalKernelExecInfo::NotApplicable;
|
2020-11-17 18:42:29 +08:00
|
|
|
KernelExecutionType kernelExecutionType = KernelExecutionType::NotApplicable;
|
2020-12-17 08:36:45 +08:00
|
|
|
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;
|
2017-12-21 07:45:38 +08:00
|
|
|
bool requiresCoherency = 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;
|
2020-11-18 21:56:18 +08:00
|
|
|
bool useSingleSubdevice = false;
|
2021-01-26 22:05:22 +08:00
|
|
|
bool useGlobalAtomics = 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-02-11 07:33:40 +08:00
|
|
|
bool disableEUFusion = false;
|
2017-12-21 07:45:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct CsrSizeRequestFlags {
|
|
|
|
bool l3ConfigChanged = false;
|
|
|
|
bool preemptionRequestChanged = false;
|
|
|
|
bool mediaSamplerConfigChanged = false;
|
|
|
|
bool hasSharedHandles = false;
|
2018-11-14 15:40:37 +08:00
|
|
|
bool specialPipelineSelectModeChanged = false;
|
2021-09-24 02:13:37 +08:00
|
|
|
bool activePartitionsChanged = false;
|
2017-12-21 07:45:38 +08:00
|
|
|
};
|
2019-03-26 18:59:46 +08:00
|
|
|
} // namespace NEO
|