2021-05-18 10:46:21 +08:00
|
|
|
/*
|
2022-02-11 07:33:40 +08:00
|
|
|
* Copyright (C) 2021-2022 Intel Corporation
|
2021-05-18 10:46:21 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2022-07-24 12:21:16 +08:00
|
|
|
#include "shared/source/command_stream/preemption_mode.h"
|
2021-05-18 10:46:21 +08:00
|
|
|
#include "shared/source/command_stream/stream_property.h"
|
2022-11-10 17:37:42 +08:00
|
|
|
#include "shared/source/helpers/hw_info.h"
|
2021-05-18 10:46:21 +08:00
|
|
|
|
|
|
|
namespace NEO {
|
|
|
|
|
2022-08-23 12:02:33 +08:00
|
|
|
struct StateComputeModePropertiesSupport {
|
|
|
|
bool coherencyRequired = false;
|
|
|
|
bool largeGrfMode = false;
|
|
|
|
bool zPassAsyncComputeThreadLimit = false;
|
|
|
|
bool pixelAsyncComputeThreadLimit = false;
|
|
|
|
bool threadArbitrationPolicy = false;
|
|
|
|
bool devicePreemptionMode = false;
|
|
|
|
};
|
|
|
|
|
2021-05-18 10:46:21 +08:00
|
|
|
struct StateComputeModeProperties {
|
|
|
|
StreamProperty isCoherencyRequired{};
|
2021-07-07 21:34:46 +08:00
|
|
|
StreamProperty largeGrfMode{};
|
2021-11-19 21:38:23 +08:00
|
|
|
StreamProperty zPassAsyncComputeThreadLimit{};
|
|
|
|
StreamProperty pixelAsyncComputeThreadLimit{};
|
2021-12-07 19:46:24 +08:00
|
|
|
StreamProperty threadArbitrationPolicy{};
|
2022-06-23 23:25:10 +08:00
|
|
|
StreamProperty devicePreemptionMode{};
|
2021-05-18 10:46:21 +08:00
|
|
|
|
2022-06-23 23:25:10 +08:00
|
|
|
void setProperties(bool requiresCoherency, uint32_t numGrfRequired, int32_t threadArbitrationPolicy, PreemptionMode devicePreemptionMode, const HardwareInfo &hwInfo);
|
2021-05-26 21:51:11 +08:00
|
|
|
void setProperties(const StateComputeModeProperties &properties);
|
2021-12-09 19:01:40 +08:00
|
|
|
bool isDirty() const;
|
2022-03-08 21:46:04 +08:00
|
|
|
|
|
|
|
protected:
|
2021-05-18 10:46:21 +08:00
|
|
|
void clearIsDirty();
|
2022-03-08 21:46:04 +08:00
|
|
|
|
|
|
|
bool isDirtyExtra() const;
|
2022-08-23 12:02:33 +08:00
|
|
|
void setPropertiesExtra();
|
2022-03-08 21:46:04 +08:00
|
|
|
void setPropertiesExtra(const StateComputeModeProperties &properties);
|
|
|
|
void clearIsDirtyExtra();
|
2022-08-23 12:02:33 +08:00
|
|
|
|
|
|
|
StateComputeModePropertiesSupport scmPropertiesSupport = {};
|
|
|
|
bool propertiesSupportLoaded = false;
|
2021-05-18 10:46:21 +08:00
|
|
|
};
|
|
|
|
|
2022-08-23 12:02:33 +08:00
|
|
|
struct FrontEndPropertiesSupport {
|
2022-08-30 04:06:04 +08:00
|
|
|
bool computeDispatchAllWalker = false;
|
|
|
|
bool disableEuFusion = false;
|
|
|
|
bool disableOverdispatch = false;
|
|
|
|
bool singleSliceDispatchCcsMode = false;
|
2022-08-23 12:02:33 +08:00
|
|
|
};
|
|
|
|
|
2021-05-18 10:46:21 +08:00
|
|
|
struct FrontEndProperties {
|
2022-02-11 07:33:40 +08:00
|
|
|
StreamProperty computeDispatchAllWalkerEnable{};
|
|
|
|
StreamProperty disableEUFusion{};
|
2021-07-29 01:17:51 +08:00
|
|
|
StreamProperty disableOverdispatch{};
|
2021-08-13 22:48:13 +08:00
|
|
|
StreamProperty singleSliceDispatchCcsMode{};
|
2021-07-29 01:17:51 +08:00
|
|
|
|
2022-08-30 04:06:04 +08:00
|
|
|
void setProperties(bool isCooperativeKernel, bool disableEUFusion, bool disableOverdispatch, int32_t engineInstancedDevice, const HardwareInfo &hwInfo);
|
2021-05-26 21:51:11 +08:00
|
|
|
void setProperties(const FrontEndProperties &properties);
|
2022-08-30 04:06:04 +08:00
|
|
|
void setPropertySingleSliceDispatchCcsMode(int32_t engineInstancedDevice, const HardwareInfo &hwInfo);
|
2021-12-09 19:01:40 +08:00
|
|
|
bool isDirty() const;
|
2022-03-08 21:46:04 +08:00
|
|
|
|
|
|
|
protected:
|
2021-05-26 21:51:11 +08:00
|
|
|
void clearIsDirty();
|
2022-08-30 04:06:04 +08:00
|
|
|
|
|
|
|
FrontEndPropertiesSupport frontEndPropertiesSupport = {};
|
|
|
|
bool propertiesSupportLoaded = false;
|
2021-05-18 10:46:21 +08:00
|
|
|
};
|
|
|
|
|
2022-09-13 03:11:56 +08:00
|
|
|
struct PipelineSelectPropertiesSupport {
|
|
|
|
bool modeSelected = false;
|
|
|
|
bool mediaSamplerDopClockGate = false;
|
|
|
|
bool systolicMode = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct PipelineSelectProperties {
|
|
|
|
StreamProperty modeSelected{};
|
|
|
|
StreamProperty mediaSamplerDopClockGate{};
|
|
|
|
StreamProperty systolicMode{};
|
|
|
|
|
|
|
|
void setProperties(bool modeSelected, bool mediaSamplerDopClockGate, bool systolicMode, const HardwareInfo &hwInfo);
|
|
|
|
void setProperties(const PipelineSelectProperties &properties);
|
|
|
|
bool isDirty() const;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void clearIsDirty();
|
|
|
|
|
|
|
|
PipelineSelectPropertiesSupport pipelineSelectPropertiesSupport = {};
|
|
|
|
bool propertiesSupportLoaded = false;
|
|
|
|
};
|
|
|
|
|
2021-05-18 10:46:21 +08:00
|
|
|
} // namespace NEO
|