mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-22 19:29:06 +08:00
[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:
committed by
Compute-Runtime-Automation
parent
8b9078127f
commit
f3324964f6
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user