Add preemption flags creation to shared code

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2021-09-23 13:06:18 +00:00
committed by Compute-Runtime-Automation
parent 3b35ba504f
commit e295e74c0a
7 changed files with 61 additions and 78 deletions

View File

@@ -15,6 +15,7 @@
namespace NEO {
class Device;
class GraphicsAllocation;
struct KernelDescriptor;
struct PreemptionFlags {
PreemptionFlags() {
@@ -44,6 +45,7 @@ class PreemptionHelper {
static bool allowThreadGroupPreemption(const PreemptionFlags &flags);
static bool allowMidThreadPreemption(const PreemptionFlags &flags);
static void adjustDefaultPreemptionMode(RuntimeCapabilityTable &deviceCapabilities, bool allowMidThread, bool allowThreadGroup, bool allowMidBatch);
static PreemptionFlags createPreemptionLevelFlags(Device &device, const KernelDescriptor *kernelDescriptor, bool schedulerKernel);
template <typename GfxFamily>
static size_t getRequiredPreambleSize(const Device &device);