2017-12-21 07:45:38 +08:00
|
|
|
/*
|
2019-01-25 17:20:32 +08:00
|
|
|
* Copyright (C) 2017-2019 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
|
2019-09-10 22:13:11 +08:00
|
|
|
#include "core/helpers/pipeline_select_args.h"
|
2019-09-04 16:58:52 +08:00
|
|
|
#include "core/memory_manager/memory_constants.h"
|
2019-01-25 17:20:32 +08:00
|
|
|
#include "runtime/helpers/csr_deps.h"
|
2017-12-21 07:45:38 +08:00
|
|
|
#include "runtime/helpers/hw_info.h"
|
2018-01-29 18:18:34 +08:00
|
|
|
#include "runtime/helpers/properties_helper.h"
|
2018-09-21 20:06:35 +08:00
|
|
|
#include "runtime/kernel/grf_config.h"
|
2019-02-27 18:39:32 +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;
|
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;
|
2019-10-03 20:38:49 +08:00
|
|
|
DispatchFlags(CsrDependencies csrDependencies, const TimestampPacketContainer *barrierTimestampPacketNodes, PipelineSelectArgs pipelineSelectArgs,
|
|
|
|
FlushStampTrackingObj *flushStampReference, QueueThrottle throttle, PreemptionMode preemptionMode, uint32_t numGrfRequired,
|
2019-08-21 18:50:47 +08:00
|
|
|
uint32_t l3CacheSettings, uint64_t sliceCount, bool blocking, bool dcFlush,
|
2019-09-13 18:00:30 +08:00
|
|
|
bool useSLM, bool guardCommandBufferWithPipeControl, bool gsba32BitRequired,
|
|
|
|
bool requiresCoherency, bool lowPriority, bool implicitFlush,
|
|
|
|
bool outOfOrderExecutionAllowed, bool multiEngineQueue, bool epilogueRequired) : csrDependencies(csrDependencies),
|
2019-10-03 20:38:49 +08:00
|
|
|
barrierTimestampPacketNodes(barrierTimestampPacketNodes),
|
2019-09-13 18:00:30 +08:00
|
|
|
pipelineSelectArgs(pipelineSelectArgs),
|
|
|
|
flushStampReference(flushStampReference),
|
|
|
|
throttle(throttle),
|
|
|
|
preemptionMode(preemptionMode),
|
|
|
|
numGrfRequired(numGrfRequired),
|
|
|
|
l3CacheSettings(l3CacheSettings),
|
2019-08-21 18:50:47 +08:00
|
|
|
sliceCount(sliceCount),
|
2019-09-13 18:00:30 +08:00
|
|
|
blocking(blocking),
|
|
|
|
dcFlush(dcFlush),
|
|
|
|
useSLM(useSLM),
|
|
|
|
guardCommandBufferWithPipeControl(guardCommandBufferWithPipeControl),
|
|
|
|
gsba32BitRequired(gsba32BitRequired),
|
|
|
|
requiresCoherency(requiresCoherency),
|
|
|
|
lowPriority(lowPriority),
|
|
|
|
implicitFlush(implicitFlush),
|
|
|
|
outOfOrderExecutionAllowed(outOfOrderExecutionAllowed),
|
|
|
|
multiEngineQueue(multiEngineQueue),
|
|
|
|
epilogueRequired(epilogueRequired){};
|
2019-02-15 00:12:15 +08:00
|
|
|
CsrDependencies csrDependencies;
|
2019-10-03 20:38:49 +08:00
|
|
|
const 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;
|
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-02-15 00:12:15 +08:00
|
|
|
bool multiEngineQueue = false;
|
2019-08-08 01:33:40 +08:00
|
|
|
bool epilogueRequired = false;
|
2017-12-21 07:45:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct CsrSizeRequestFlags {
|
|
|
|
bool l3ConfigChanged = false;
|
|
|
|
bool coherencyRequestChanged = false;
|
|
|
|
bool preemptionRequestChanged = false;
|
|
|
|
bool mediaSamplerConfigChanged = false;
|
|
|
|
bool hasSharedHandles = false;
|
2018-09-21 20:06:35 +08:00
|
|
|
bool numGrfRequiredChanged = false;
|
2018-11-14 15:40:37 +08:00
|
|
|
bool specialPipelineSelectModeChanged = false;
|
2017-12-21 07:45:38 +08:00
|
|
|
};
|
2019-03-26 18:59:46 +08:00
|
|
|
} // namespace NEO
|