2017-12-21 00:45:38 +01:00
|
|
|
/*
|
2020-01-17 15:14:52 +01:00
|
|
|
* Copyright (C) 2017-2020 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
|
2020-02-23 22:44:01 +01:00
|
|
|
#include "shared/source/command_stream/csr_deps.h"
|
2020-12-17 00:36:45 +00:00
|
|
|
#include "shared/source/command_stream/memory_compression_state.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"
|
2020-04-02 11:28:38 +02:00
|
|
|
#include "shared/source/helpers/constants.h"
|
2020-02-23 22:44:01 +01:00
|
|
|
#include "shared/source/helpers/hw_info.h"
|
|
|
|
|
#include "shared/source/helpers/pipeline_select_args.h"
|
|
|
|
|
#include "shared/source/kernel/grf_config.h"
|
2019-02-27 11:39:32 +01:00
|
|
|
|
2020-11-17 11:42:29 +01:00
|
|
|
#include "opencl/source/kernel/kernel_execution_type.h"
|
|
|
|
|
|
2020-09-02 11:38:54 +02:00
|
|
|
#include "csr_properties_flags.h"
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
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 03:50:47 -07:00
|
|
|
|
|
|
|
|
namespace QueueSliceCount {
|
|
|
|
|
constexpr uint64_t defaultSliceCount = 0;
|
|
|
|
|
}
|
|
|
|
|
|
2019-08-22 17:02:37 +02:00
|
|
|
namespace L3CachingSettings {
|
|
|
|
|
constexpr uint32_t l3CacheOn = 0u;
|
|
|
|
|
constexpr uint32_t l3CacheOff = 1u;
|
2019-08-26 17:03:13 +02:00
|
|
|
constexpr uint32_t l3AndL1On = 2u;
|
2020-08-20 11:48:10 +02:00
|
|
|
constexpr uint32_t NotApplicable = 3u;
|
2019-08-22 17:02:37 +02:00
|
|
|
} // namespace L3CachingSettings
|
2017-12-21 00:45:38 +01:00
|
|
|
|
|
|
|
|
struct DispatchFlags {
|
2019-09-13 12:00:30 +02:00
|
|
|
DispatchFlags() = delete;
|
2019-11-12 09:37:16 +01:00
|
|
|
DispatchFlags(CsrDependencies csrDependencies, TimestampPacketContainer *barrierTimestampPacketNodes, PipelineSelectArgs pipelineSelectArgs,
|
2019-10-03 14:38:49 +02:00
|
|
|
FlushStampTrackingObj *flushStampReference, QueueThrottle throttle, PreemptionMode preemptionMode, uint32_t numGrfRequired,
|
2020-12-17 00:36:45 +00:00
|
|
|
uint32_t l3CacheSettings, uint32_t threadArbitrationPolicy, uint32_t additionalKernelExecInfo,
|
|
|
|
|
KernelExecutionType kernelExecutionType, MemoryCompressionState memoryCompressionState,
|
|
|
|
|
uint64_t sliceCount, bool blocking, bool dcFlush, bool useSLM, bool guardCommandBufferWithPipeControl, bool gsba32BitRequired,
|
|
|
|
|
bool requiresCoherency, bool lowPriority, bool implicitFlush, bool outOfOrderExecutionAllowed, bool epilogueRequired,
|
|
|
|
|
bool usePerDSSbackedBuffer, bool useSingleSubdevice) : csrDependencies(csrDependencies),
|
|
|
|
|
barrierTimestampPacketNodes(barrierTimestampPacketNodes),
|
|
|
|
|
pipelineSelectArgs(pipelineSelectArgs),
|
|
|
|
|
flushStampReference(flushStampReference),
|
|
|
|
|
throttle(throttle),
|
|
|
|
|
preemptionMode(preemptionMode),
|
|
|
|
|
numGrfRequired(numGrfRequired),
|
|
|
|
|
l3CacheSettings(l3CacheSettings),
|
|
|
|
|
threadArbitrationPolicy(threadArbitrationPolicy),
|
|
|
|
|
additionalKernelExecInfo(additionalKernelExecInfo),
|
|
|
|
|
kernelExecutionType(kernelExecutionType),
|
|
|
|
|
memoryCompressionState(memoryCompressionState),
|
|
|
|
|
sliceCount(sliceCount),
|
|
|
|
|
blocking(blocking),
|
|
|
|
|
dcFlush(dcFlush),
|
|
|
|
|
useSLM(useSLM),
|
|
|
|
|
guardCommandBufferWithPipeControl(guardCommandBufferWithPipeControl),
|
|
|
|
|
gsba32BitRequired(gsba32BitRequired),
|
|
|
|
|
requiresCoherency(requiresCoherency),
|
|
|
|
|
lowPriority(lowPriority),
|
|
|
|
|
implicitFlush(implicitFlush),
|
|
|
|
|
outOfOrderExecutionAllowed(outOfOrderExecutionAllowed),
|
|
|
|
|
epilogueRequired(epilogueRequired),
|
|
|
|
|
usePerDssBackedBuffer(usePerDSSbackedBuffer),
|
|
|
|
|
useSingleSubdevice(useSingleSubdevice){};
|
2020-11-18 13:56:18 +00:00
|
|
|
|
2019-02-14 17:12:15 +01: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;
|
|
|
|
|
uint32_t numGrfRequired = GrfConfig::DefaultGrfNumber;
|
2019-08-22 17:02:37 +02:00
|
|
|
uint32_t l3CacheSettings = L3CachingSettings::l3CacheOn;
|
2019-11-12 13:59:37 +01:00
|
|
|
uint32_t threadArbitrationPolicy = ThreadArbitrationPolicy::NotPresent;
|
2020-09-02 11:38:54 +02:00
|
|
|
uint32_t additionalKernelExecInfo = AdditionalKernelExecInfo::NotApplicable;
|
2020-11-17 11:42:29 +01:00
|
|
|
KernelExecutionType kernelExecutionType = KernelExecutionType::NotApplicable;
|
2020-12-17 00:36:45 +00:00
|
|
|
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;
|
2017-12-21 00:45:38 +01:00
|
|
|
bool requiresCoherency = 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;
|
2020-11-18 13:56:18 +00:00
|
|
|
bool useSingleSubdevice = false;
|
2017-12-21 00:45:38 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct CsrSizeRequestFlags {
|
|
|
|
|
bool l3ConfigChanged = false;
|
|
|
|
|
bool coherencyRequestChanged = false;
|
|
|
|
|
bool preemptionRequestChanged = false;
|
|
|
|
|
bool mediaSamplerConfigChanged = false;
|
|
|
|
|
bool hasSharedHandles = false;
|
2018-09-21 14:06:35 +02:00
|
|
|
bool numGrfRequiredChanged = false;
|
2018-11-14 08:40:37 +01:00
|
|
|
bool specialPipelineSelectModeChanged = false;
|
2017-12-21 00:45:38 +01:00
|
|
|
};
|
2019-03-26 11:59:46 +01:00
|
|
|
} // namespace NEO
|