mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 14:02:58 +08:00
Add start override to Direct Submission debug flags
Related-To: NEO-5010 Change-Id: I6d690d3f1aef9ad377ad44db0f3be753ad831f63 Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
a4ba92338a
commit
e910e28819
@@ -258,7 +258,10 @@ HWTEST_F(UltCommandStreamReceiverTest, givenNoBlitterOverrideWhenBlitterNotSuppo
|
||||
|
||||
DirectSubmissionProperties properties;
|
||||
properties.engineSupported = false;
|
||||
EXPECT_FALSE(commandStreamReceiver.checkDirectSubmissionSupportsEngine(properties, aub_stream::ENGINE_BCS));
|
||||
properties.submitOnInit = false;
|
||||
bool startOnInit = true;
|
||||
EXPECT_FALSE(commandStreamReceiver.checkDirectSubmissionSupportsEngine(properties, aub_stream::ENGINE_BCS, startOnInit));
|
||||
EXPECT_FALSE(startOnInit);
|
||||
}
|
||||
|
||||
HWTEST_F(UltCommandStreamReceiverTest, givenNoBlitterOverrideWhenBlitterSupportedThenExpectTrueReturned) {
|
||||
@@ -266,7 +269,10 @@ HWTEST_F(UltCommandStreamReceiverTest, givenNoBlitterOverrideWhenBlitterSupporte
|
||||
|
||||
DirectSubmissionProperties properties;
|
||||
properties.engineSupported = true;
|
||||
EXPECT_TRUE(commandStreamReceiver.checkDirectSubmissionSupportsEngine(properties, aub_stream::ENGINE_BCS));
|
||||
properties.submitOnInit = true;
|
||||
bool startOnInit = false;
|
||||
EXPECT_TRUE(commandStreamReceiver.checkDirectSubmissionSupportsEngine(properties, aub_stream::ENGINE_BCS, startOnInit));
|
||||
EXPECT_TRUE(startOnInit);
|
||||
}
|
||||
|
||||
HWTEST_F(UltCommandStreamReceiverTest, givenBlitterOverrideEnableWhenBlitterNotSupportedThenExpectTrueReturned) {
|
||||
@@ -276,7 +282,23 @@ HWTEST_F(UltCommandStreamReceiverTest, givenBlitterOverrideEnableWhenBlitterNotS
|
||||
|
||||
DirectSubmissionProperties properties;
|
||||
properties.engineSupported = false;
|
||||
EXPECT_TRUE(commandStreamReceiver.checkDirectSubmissionSupportsEngine(properties, aub_stream::ENGINE_BCS));
|
||||
properties.submitOnInit = false;
|
||||
bool startOnInit = false;
|
||||
EXPECT_TRUE(commandStreamReceiver.checkDirectSubmissionSupportsEngine(properties, aub_stream::ENGINE_BCS, startOnInit));
|
||||
EXPECT_TRUE(startOnInit);
|
||||
}
|
||||
|
||||
HWTEST_F(UltCommandStreamReceiverTest, givenBlitterOverrideEnableAndNoStartWhenBlitterNotSupportedThenExpectTrueReturnedStartOnInitSetToTrue) {
|
||||
DebugManagerStateRestore debugManagerStateRestore;
|
||||
DebugManager.flags.DirectSubmissionOverrideBlitterSupport.set(2);
|
||||
auto &commandStreamReceiver = pDevice->getUltCommandStreamReceiver<FamilyType>();
|
||||
|
||||
DirectSubmissionProperties properties;
|
||||
properties.engineSupported = false;
|
||||
properties.submitOnInit = true;
|
||||
bool startOnInit = true;
|
||||
EXPECT_TRUE(commandStreamReceiver.checkDirectSubmissionSupportsEngine(properties, aub_stream::ENGINE_BCS, startOnInit));
|
||||
EXPECT_FALSE(startOnInit);
|
||||
}
|
||||
|
||||
HWTEST_F(UltCommandStreamReceiverTest, givenBlitterOverrideDisableWhenBlitterSupportedThenExpectFalseReturned) {
|
||||
@@ -286,7 +308,10 @@ HWTEST_F(UltCommandStreamReceiverTest, givenBlitterOverrideDisableWhenBlitterSup
|
||||
|
||||
DirectSubmissionProperties properties;
|
||||
properties.engineSupported = true;
|
||||
EXPECT_FALSE(commandStreamReceiver.checkDirectSubmissionSupportsEngine(properties, aub_stream::ENGINE_BCS));
|
||||
properties.submitOnInit = false;
|
||||
bool startOnInit = true;
|
||||
EXPECT_FALSE(commandStreamReceiver.checkDirectSubmissionSupportsEngine(properties, aub_stream::ENGINE_BCS, startOnInit));
|
||||
EXPECT_FALSE(startOnInit);
|
||||
}
|
||||
|
||||
HWTEST_F(UltCommandStreamReceiverTest, givenNoRenderOverrideWhenRenderNotSupportedThenExpectFalseReturned) {
|
||||
@@ -294,7 +319,10 @@ HWTEST_F(UltCommandStreamReceiverTest, givenNoRenderOverrideWhenRenderNotSupport
|
||||
|
||||
DirectSubmissionProperties properties;
|
||||
properties.engineSupported = false;
|
||||
EXPECT_FALSE(commandStreamReceiver.checkDirectSubmissionSupportsEngine(properties, aub_stream::ENGINE_RCS));
|
||||
properties.submitOnInit = false;
|
||||
bool startOnInit = true;
|
||||
EXPECT_FALSE(commandStreamReceiver.checkDirectSubmissionSupportsEngine(properties, aub_stream::ENGINE_RCS, startOnInit));
|
||||
EXPECT_FALSE(startOnInit);
|
||||
}
|
||||
|
||||
HWTEST_F(UltCommandStreamReceiverTest, givenNoRenderOverrideWhenRenderSupportedThenExpectTrueReturned) {
|
||||
@@ -302,7 +330,10 @@ HWTEST_F(UltCommandStreamReceiverTest, givenNoRenderOverrideWhenRenderSupportedT
|
||||
|
||||
DirectSubmissionProperties properties;
|
||||
properties.engineSupported = true;
|
||||
EXPECT_TRUE(commandStreamReceiver.checkDirectSubmissionSupportsEngine(properties, aub_stream::ENGINE_RCS));
|
||||
properties.submitOnInit = true;
|
||||
bool startOnInit = false;
|
||||
EXPECT_TRUE(commandStreamReceiver.checkDirectSubmissionSupportsEngine(properties, aub_stream::ENGINE_RCS, startOnInit));
|
||||
EXPECT_TRUE(startOnInit);
|
||||
}
|
||||
|
||||
HWTEST_F(UltCommandStreamReceiverTest, givenRenderOverrideEnableWhenRenderNotSupportedThenExpectTrueReturned) {
|
||||
@@ -312,7 +343,23 @@ HWTEST_F(UltCommandStreamReceiverTest, givenRenderOverrideEnableWhenRenderNotSup
|
||||
|
||||
DirectSubmissionProperties properties;
|
||||
properties.engineSupported = false;
|
||||
EXPECT_TRUE(commandStreamReceiver.checkDirectSubmissionSupportsEngine(properties, aub_stream::ENGINE_RCS));
|
||||
properties.submitOnInit = false;
|
||||
bool startOnInit = false;
|
||||
EXPECT_TRUE(commandStreamReceiver.checkDirectSubmissionSupportsEngine(properties, aub_stream::ENGINE_RCS, startOnInit));
|
||||
EXPECT_TRUE(startOnInit);
|
||||
}
|
||||
|
||||
HWTEST_F(UltCommandStreamReceiverTest, givenRenderOverrideEnableAndNoStartWhenRenderNotSupportedThenExpectTrueReturnedAndStartOnInitSetFalse) {
|
||||
DebugManagerStateRestore debugManagerStateRestore;
|
||||
DebugManager.flags.DirectSubmissionOverrideRenderSupport.set(2);
|
||||
auto &commandStreamReceiver = pDevice->getUltCommandStreamReceiver<FamilyType>();
|
||||
|
||||
DirectSubmissionProperties properties;
|
||||
properties.engineSupported = false;
|
||||
properties.submitOnInit = true;
|
||||
bool startOnInit = true;
|
||||
EXPECT_TRUE(commandStreamReceiver.checkDirectSubmissionSupportsEngine(properties, aub_stream::ENGINE_RCS, startOnInit));
|
||||
EXPECT_FALSE(startOnInit);
|
||||
}
|
||||
|
||||
HWTEST_F(UltCommandStreamReceiverTest, givenRenderOverrideDisableWhenRenderSupportedThenExpectFalseReturned) {
|
||||
@@ -322,7 +369,10 @@ HWTEST_F(UltCommandStreamReceiverTest, givenRenderOverrideDisableWhenRenderSuppo
|
||||
|
||||
DirectSubmissionProperties properties;
|
||||
properties.engineSupported = true;
|
||||
EXPECT_FALSE(commandStreamReceiver.checkDirectSubmissionSupportsEngine(properties, aub_stream::ENGINE_RCS));
|
||||
properties.submitOnInit = false;
|
||||
bool startOnInit = true;
|
||||
EXPECT_FALSE(commandStreamReceiver.checkDirectSubmissionSupportsEngine(properties, aub_stream::ENGINE_RCS, startOnInit));
|
||||
EXPECT_FALSE(startOnInit);
|
||||
}
|
||||
|
||||
HWTEST_F(UltCommandStreamReceiverTest, givenNoComputeOverrideWhenComputeNotSupportedThenExpectFalseReturned) {
|
||||
@@ -330,7 +380,10 @@ HWTEST_F(UltCommandStreamReceiverTest, givenNoComputeOverrideWhenComputeNotSuppo
|
||||
|
||||
DirectSubmissionProperties properties;
|
||||
properties.engineSupported = false;
|
||||
EXPECT_FALSE(commandStreamReceiver.checkDirectSubmissionSupportsEngine(properties, aub_stream::ENGINE_CCS));
|
||||
properties.submitOnInit = false;
|
||||
bool startOnInit = true;
|
||||
EXPECT_FALSE(commandStreamReceiver.checkDirectSubmissionSupportsEngine(properties, aub_stream::ENGINE_CCS, startOnInit));
|
||||
EXPECT_FALSE(startOnInit);
|
||||
}
|
||||
|
||||
HWTEST_F(UltCommandStreamReceiverTest, givenNoComputeOverrideWhenComputeSupportedThenExpectTrueReturned) {
|
||||
@@ -338,7 +391,10 @@ HWTEST_F(UltCommandStreamReceiverTest, givenNoComputeOverrideWhenComputeSupporte
|
||||
|
||||
DirectSubmissionProperties properties;
|
||||
properties.engineSupported = true;
|
||||
EXPECT_TRUE(commandStreamReceiver.checkDirectSubmissionSupportsEngine(properties, aub_stream::ENGINE_CCS));
|
||||
properties.submitOnInit = true;
|
||||
bool startOnInit = false;
|
||||
EXPECT_TRUE(commandStreamReceiver.checkDirectSubmissionSupportsEngine(properties, aub_stream::ENGINE_CCS, startOnInit));
|
||||
EXPECT_TRUE(startOnInit);
|
||||
}
|
||||
|
||||
HWTEST_F(UltCommandStreamReceiverTest, givenComputeOverrideEnableWhenComputeNotSupportedThenExpectTrueReturned) {
|
||||
@@ -348,7 +404,23 @@ HWTEST_F(UltCommandStreamReceiverTest, givenComputeOverrideEnableWhenComputeNotS
|
||||
|
||||
DirectSubmissionProperties properties;
|
||||
properties.engineSupported = false;
|
||||
EXPECT_TRUE(commandStreamReceiver.checkDirectSubmissionSupportsEngine(properties, aub_stream::ENGINE_CCS));
|
||||
properties.submitOnInit = false;
|
||||
bool startOnInit = false;
|
||||
EXPECT_TRUE(commandStreamReceiver.checkDirectSubmissionSupportsEngine(properties, aub_stream::ENGINE_CCS, startOnInit));
|
||||
EXPECT_TRUE(startOnInit);
|
||||
}
|
||||
|
||||
HWTEST_F(UltCommandStreamReceiverTest, givenComputeOverrideEnableAndNoStartWhenComputeNotSupportedThenExpectTrueReturnedAndStartOnInitSetToFalse) {
|
||||
DebugManagerStateRestore debugManagerStateRestore;
|
||||
DebugManager.flags.DirectSubmissionOverrideComputeSupport.set(2);
|
||||
auto &commandStreamReceiver = pDevice->getUltCommandStreamReceiver<FamilyType>();
|
||||
|
||||
DirectSubmissionProperties properties;
|
||||
properties.engineSupported = false;
|
||||
properties.submitOnInit = true;
|
||||
bool startOnInit = true;
|
||||
EXPECT_TRUE(commandStreamReceiver.checkDirectSubmissionSupportsEngine(properties, aub_stream::ENGINE_CCS, startOnInit));
|
||||
EXPECT_FALSE(startOnInit);
|
||||
}
|
||||
|
||||
HWTEST_F(UltCommandStreamReceiverTest, givenComputeOverrideDisableWhenComputeSupportedThenExpectFalseReturned) {
|
||||
@@ -358,7 +430,10 @@ HWTEST_F(UltCommandStreamReceiverTest, givenComputeOverrideDisableWhenComputeSup
|
||||
|
||||
DirectSubmissionProperties properties;
|
||||
properties.engineSupported = true;
|
||||
EXPECT_FALSE(commandStreamReceiver.checkDirectSubmissionSupportsEngine(properties, aub_stream::ENGINE_CCS));
|
||||
properties.submitOnInit = false;
|
||||
bool startOnInit = true;
|
||||
EXPECT_FALSE(commandStreamReceiver.checkDirectSubmissionSupportsEngine(properties, aub_stream::ENGINE_CCS, startOnInit));
|
||||
EXPECT_FALSE(startOnInit);
|
||||
}
|
||||
|
||||
typedef UltCommandStreamReceiverTest CommandStreamReceiverFlushTests;
|
||||
|
||||
@@ -100,7 +100,8 @@ class CommandStreamReceiverHw : public CommandStreamReceiver {
|
||||
|
||||
bool initDirectSubmission(Device &device, OsContext &osContext) override;
|
||||
bool checkDirectSubmissionSupportsEngine(const DirectSubmissionProperties &directSubmissionProperty,
|
||||
aub_stream::EngineType contextEngineType);
|
||||
aub_stream::EngineType contextEngineType,
|
||||
bool &startOnInit);
|
||||
|
||||
protected:
|
||||
void programPreemption(LinearStream &csr, DispatchFlags &dispatchFlags);
|
||||
|
||||
@@ -1070,15 +1070,17 @@ inline bool CommandStreamReceiverHw<GfxFamily>::initDirectSubmission(Device &dev
|
||||
startDirect = directSubmissionProperty.useRootDevice;
|
||||
}
|
||||
|
||||
bool submitOnInit = directSubmissionProperty.submitOnInit;
|
||||
bool engineSupported = checkDirectSubmissionSupportsEngine(directSubmissionProperty,
|
||||
contextEngineType);
|
||||
contextEngineType,
|
||||
submitOnInit);
|
||||
if (engineSupported && startDirect) {
|
||||
if (contextEngineType == aub_stream::ENGINE_BCS) {
|
||||
blitterDirectSubmission = DirectSubmissionHw<GfxFamily, BlitterDispatcher<GfxFamily>>::create(device, osContext);
|
||||
ret = blitterDirectSubmission->initialize(directSubmissionProperty.submitOnInit);
|
||||
ret = blitterDirectSubmission->initialize(submitOnInit);
|
||||
} else {
|
||||
directSubmission = DirectSubmissionHw<GfxFamily, RenderDispatcher<GfxFamily>>::create(device, osContext);
|
||||
ret = directSubmission->initialize(directSubmissionProperty.submitOnInit);
|
||||
ret = directSubmission->initialize(submitOnInit);
|
||||
this->dispatchMode = DispatchMode::ImmediateDispatch;
|
||||
}
|
||||
}
|
||||
@@ -1088,23 +1090,28 @@ inline bool CommandStreamReceiverHw<GfxFamily>::initDirectSubmission(Device &dev
|
||||
|
||||
template <typename GfxFamily>
|
||||
inline bool CommandStreamReceiverHw<GfxFamily>::checkDirectSubmissionSupportsEngine(const DirectSubmissionProperties &directSubmissionProperty,
|
||||
aub_stream::EngineType contextEngineType) {
|
||||
aub_stream::EngineType contextEngineType,
|
||||
bool &startOnInit) {
|
||||
bool supported = directSubmissionProperty.engineSupported;
|
||||
startOnInit = directSubmissionProperty.submitOnInit;
|
||||
if (contextEngineType == aub_stream::ENGINE_BCS) {
|
||||
int32_t blitterOverrideKey = DebugManager.flags.DirectSubmissionOverrideBlitterSupport.get();
|
||||
if (blitterOverrideKey != -1) {
|
||||
supported = blitterOverrideKey == 0 ? false : true;
|
||||
startOnInit = blitterOverrideKey == 1 ? true : false;
|
||||
}
|
||||
} else if (contextEngineType == aub_stream::ENGINE_RCS) {
|
||||
int32_t renderOverrideKey = DebugManager.flags.DirectSubmissionOverrideRenderSupport.get();
|
||||
if (renderOverrideKey != -1) {
|
||||
supported = renderOverrideKey == 0 ? false : true;
|
||||
startOnInit = renderOverrideKey == 1 ? true : false;
|
||||
}
|
||||
} else {
|
||||
//assume else is CCS
|
||||
int32_t computeOverrideKey = DebugManager.flags.DirectSubmissionOverrideComputeSupport.get();
|
||||
if (computeOverrideKey != -1) {
|
||||
supported = computeOverrideKey == 0 ? false : true;
|
||||
startOnInit = computeOverrideKey == 1 ? true : false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -133,9 +133,9 @@ DECLARE_DEBUG_VARIABLE(int32_t, DirectSubmissionSemaphoreAddressing, -1, "-1: do
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, DirectSubmissionDisableCpuCacheFlush, -1, "-1: do not override, 0: disable, 1: enable")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, DirectSubmissionEnableDebugBuffer, 0, "0: diagnostic feature disabled - dispatch regular workload, 1: dispatch diagnostic buffer - mode 1 - single SDI command, 2: dispatch diagnostic buffer - mode 2 - no command")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, DirectSubmissionDiagnosticExecutionCount, 30, "Number of executions of EnableDebugBuffer modes within diagnostic run")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, DirectSubmissionOverrideBlitterSupport, -1, "Overrides default blitter support: -1: do not override, 0: disable engine support, 1: enable engine support")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, DirectSubmissionOverrideRenderSupport, -1, "Overrides default render support: -1: do not override, 0: disable engine support, 1: enable engine support")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, DirectSubmissionOverrideComputeSupport, -1, "Overrides default compute support: -1: do not override, 0: disable engine support, 1: enable engine support")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, DirectSubmissionOverrideBlitterSupport, -1, "Overrides default blitter support: -1: do not override, 0: disable engine support, 1: enable engine support with init start, 2: enable engine support without init start")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, DirectSubmissionOverrideRenderSupport, -1, "Overrides default render support: -1: do not override, 0: disable engine support, 1: enable engine support with init start, 2: enable engine support without init start")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, DirectSubmissionOverrideComputeSupport, -1, "Overrides default compute support: -1: do not override, 0: disable engine support, 1: enable engine support with init start, 2: enable engine support without init start")
|
||||
DECLARE_DEBUG_VARIABLE(bool, DirectSubmissionDisableCacheFlush, false, "Disable dispatching cache flush commands")
|
||||
DECLARE_DEBUG_VARIABLE(bool, DirectSubmissionDisableMonitorFence, false, "Disable dispatching monitor fence commands")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user