[perf] initialize stream properties only once without further check

Related-To: NEO-5055

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2023-03-09 23:12:09 +00:00
committed by Compute-Runtime-Automation
parent 8b9078127f
commit f3324964f6
36 changed files with 283 additions and 284 deletions

View File

@@ -894,7 +894,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenEnoughMemoryOnlyForPreambleWh
csrCS.getSpace(csrCS.getAvailableSpace() - sizeNeededForPreamble);
commandStreamReceiver.streamProperties.stateComputeMode.setPropertiesAll(flushTaskFlags.requiresCoherency, flushTaskFlags.numGrfRequired,
flushTaskFlags.threadArbitrationPolicy, PreemptionMode::Disabled, pDevice->getRootDeviceEnvironment());
flushTaskFlags.threadArbitrationPolicy, PreemptionMode::Disabled);
flushTask(commandStreamReceiver);
EXPECT_EQ(sizeNeeded, csrCS.getUsed());
@@ -928,7 +928,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenEnoughMemoryOnlyForPreambleAn
csrCS.getSpace(csrCS.getAvailableSpace() - sizeNeededForPreamble - sizeNeededForStateBaseAddress);
commandStreamReceiver.streamProperties.stateComputeMode.setPropertiesAll(flushTaskFlags.requiresCoherency, flushTaskFlags.numGrfRequired,
flushTaskFlags.threadArbitrationPolicy, PreemptionMode::Disabled, pDevice->getRootDeviceEnvironment());
flushTaskFlags.threadArbitrationPolicy, PreemptionMode::Disabled);
flushTask(commandStreamReceiver);
EXPECT_EQ(sizeNeeded, csrCS.getUsed());
@@ -966,7 +966,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenEnoughMemoryOnlyForPreambleAn
flushTaskFlags.preemptionMode = PreemptionHelper::getDefaultPreemptionMode(mockDevice->getHardwareInfo());
commandStreamReceiver.streamProperties.stateComputeMode.setPropertiesAll(flushTaskFlags.requiresCoherency, flushTaskFlags.numGrfRequired,
flushTaskFlags.threadArbitrationPolicy, PreemptionMode::Disabled, pDevice->getRootDeviceEnvironment());
flushTaskFlags.threadArbitrationPolicy, PreemptionMode::Disabled);
commandStreamReceiver.flushTask(
commandStream,
0,

View File

@@ -1050,7 +1050,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskTests, GivenPreambleSe
expectedUsed = alignUp(expectedUsed, MemoryConstants::cacheLineSize);
commandStreamReceiver.streamProperties.stateComputeMode.setPropertiesAll(flushTaskFlags.requiresCoherency, flushTaskFlags.numGrfRequired,
flushTaskFlags.threadArbitrationPolicy, PreemptionMode::Disabled, pDevice->getRootDeviceEnvironment());
flushTaskFlags.threadArbitrationPolicy, PreemptionMode::Disabled);
commandStreamReceiver.flushTask(commandStream, 0, &dsh, &ioh, &ssh, taskLevel, flushTaskFlags, *pDevice);
// Verify that we didn't grab a new CS buffer

View File

@@ -740,6 +740,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenEnqueueWithoutArbitrationPoli
DebugManager.flags.ForceThreadArbitrationPolicyProgrammingWithScm.set(1);
auto &commandStreamReceiver = pDevice->getUltCommandStreamReceiver<FamilyType>();
commandStreamReceiver.streamProperties.initSupport(pDevice->getRootDeviceEnvironment());
auto &csrThreadArbitrationPolicy = commandStreamReceiver.streamProperties.stateComputeMode.threadArbitrationPolicy.value;
int32_t sentThreadArbitrationPolicy = ThreadArbitrationPolicy::RoundRobinAfterDependency;

View File

@@ -634,7 +634,8 @@ HWTEST2_F(CommandStreamReceiverHwTest, whenProgramVFEStateIsCalledThenCorrectCom
UltDeviceFactory deviceFactory{1, 0};
auto pDevice = deviceFactory.rootDevices[0];
auto pHwInfo = pDevice->getRootDeviceEnvironment().getMutableHardwareInfo();
auto &rootDeviceEnvironment = pDevice->getRootDeviceEnvironment();
auto pHwInfo = rootDeviceEnvironment.getMutableHardwareInfo();
const auto &productHelper = pDevice->getProductHelper();
uint8_t memory[1 * KB]{};
@@ -649,6 +650,7 @@ HWTEST2_F(CommandStreamReceiverHwTest, whenProgramVFEStateIsCalledThenCorrectCom
{
mockCsr->getStreamProperties().frontEndState = {};
mockCsr->getStreamProperties().frontEndState.initSupport(rootDeviceEnvironment);
auto flags = DispatchFlagsHelper::createDefaultDispatchFlags();
flags.additionalKernelExecInfo = AdditionalKernelExecInfo::DisableOverdispatch;

View File

@@ -98,7 +98,7 @@ HWTEST2_F(CommandStreamReceiverFlushTaskDg2AndLaterTests, givenProgramExtendedPi
dispatchFlags.threadArbitrationPolicy = gfxCoreHelper.getDefaultThreadArbitrationPolicy();
commandStreamReceiver.streamProperties.stateComputeMode.setPropertiesAll(dispatchFlags.requiresCoherency, dispatchFlags.numGrfRequired,
dispatchFlags.threadArbitrationPolicy, PreemptionMode::Disabled, pDevice->getRootDeviceEnvironment());
dispatchFlags.threadArbitrationPolicy, PreemptionMode::Disabled);
auto cmdSizeForAllCommands = commandStreamReceiver.getRequiredCmdStreamSize(dispatchFlags, *pDevice);
commandStreamReceiver.flushTask(commandStream,
0,