Unify logic determining thread arbitration policy value

Related-To: NEO-6728

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
Filip Hazubski
2022-03-07 20:29:02 +00:00
committed by Compute-Runtime-Automation
parent d5fedf90c5
commit dd01cff879
27 changed files with 109 additions and 89 deletions

View File

@ -188,10 +188,6 @@ struct CommandList : _ze_command_list_handle_t {
return commandListPreemptionMode; return commandListPreemptionMode;
} }
int32_t getThreadArbitrationPolicy() const {
return threadArbitrationPolicy;
}
UnifiedMemoryControls getUnifiedMemoryControls() const { UnifiedMemoryControls getUnifiedMemoryControls() const {
return unifiedMemoryControls; return unifiedMemoryControls;
} }
@ -256,7 +252,6 @@ struct CommandList : _ze_command_list_handle_t {
uint32_t cmdListType = CommandListType::TYPE_REGULAR; uint32_t cmdListType = CommandListType::TYPE_REGULAR;
uint32_t commandListPerThreadScratchSize = 0u; uint32_t commandListPerThreadScratchSize = 0u;
uint32_t commandListPerThreadPrivateScratchSize = 0u; uint32_t commandListPerThreadPrivateScratchSize = 0u;
int32_t threadArbitrationPolicy = NEO::ThreadArbitrationPolicy::NotPresent;
uint32_t partitionCount = 1; uint32_t partitionCount = 1;
bool isFlushTaskSubmissionEnabled = false; bool isFlushTaskSubmissionEnabled = false;
bool isSyncModeQueue = false; bool isSyncModeQueue = false;

View File

@ -74,7 +74,7 @@ template <GFXCORE_FAMILY gfxCoreFamily>
void CommandListCoreFamily<gfxCoreFamily>::programThreadArbitrationPolicy(Device *device) { void CommandListCoreFamily<gfxCoreFamily>::programThreadArbitrationPolicy(Device *device) {
using GfxFamily = typename NEO::GfxFamilyMapper<gfxCoreFamily>::GfxFamily; using GfxFamily = typename NEO::GfxFamilyMapper<gfxCoreFamily>::GfxFamily;
auto &hwHelper = NEO::HwHelper::get(device->getNEODevice()->getHardwareInfo().platform.eRenderCoreFamily); auto &hwHelper = NEO::HwHelper::get(device->getNEODevice()->getHardwareInfo().platform.eRenderCoreFamily);
threadArbitrationPolicy = hwHelper.getDefaultThreadArbitrationPolicy(); auto threadArbitrationPolicy = hwHelper.getDefaultThreadArbitrationPolicy();
if (NEO::DebugManager.flags.OverrideThreadArbitrationPolicy.get() != -1) { if (NEO::DebugManager.flags.OverrideThreadArbitrationPolicy.get() != -1) {
threadArbitrationPolicy = static_cast<uint32_t>(NEO::DebugManager.flags.OverrideThreadArbitrationPolicy.get()); threadArbitrationPolicy = static_cast<uint32_t>(NEO::DebugManager.flags.OverrideThreadArbitrationPolicy.get());
} }
@ -2240,6 +2240,7 @@ void CommandListCoreFamily<gfxCoreFamily>::updateStreamProperties(Kernel &kernel
if (!containsAnyKernel) { if (!containsAnyKernel) {
requiredStreamState.frontEndState.setProperties(isCooperative, kernelAttributes.flags.requiresDisabledEUFusion, disableOverdispatch, -1, hwInfo); requiredStreamState.frontEndState.setProperties(isCooperative, kernelAttributes.flags.requiresDisabledEUFusion, disableOverdispatch, -1, hwInfo);
finalStreamState = requiredStreamState; finalStreamState = requiredStreamState;
requiredStreamState.stateComputeMode.setProperties(false, kernelAttributes.numGrfRequired, kernel.getSchedulingHintExp(), hwInfo);
containsAnyKernel = true; containsAnyKernel = true;
} }
@ -2252,10 +2253,10 @@ void CommandListCoreFamily<gfxCoreFamily>::updateStreamProperties(Kernel &kernel
commandsToPatch.push_back({pVfeStateAddress, pVfeState, CommandToPatch::FrontEndState}); commandsToPatch.push_back({pVfeStateAddress, pVfeState, CommandToPatch::FrontEndState});
} }
auto &neoDevice = *device->getNEODevice(); finalStreamState.stateComputeMode.setProperties(false, kernelAttributes.numGrfRequired, kernel.getSchedulingHintExp(), hwInfo);
finalStreamState.stateComputeMode.setProperties(false, kernelAttributes.numGrfRequired, this->threadArbitrationPolicy);
if (finalStreamState.stateComputeMode.isDirty()) { if (finalStreamState.stateComputeMode.isDirty()) {
auto &neoDevice = *device->getNEODevice();
NEO::EncodeWA<GfxFamily>::encodeAdditionalPipelineSelect(neoDevice, *commandContainer.getCommandStream(), true); NEO::EncodeWA<GfxFamily>::encodeAdditionalPipelineSelect(neoDevice, *commandContainer.getCommandStream(), true);
NEO::EncodeComputeMode<GfxFamily>::programComputeModeCommand(*commandContainer.getCommandStream(), finalStreamState.stateComputeMode, hwInfo); NEO::EncodeComputeMode<GfxFamily>::programComputeModeCommand(*commandContainer.getCommandStream(), finalStreamState.stateComputeMode, hwInfo);
NEO::EncodeWA<GfxFamily>::encodeAdditionalPipelineSelect(neoDevice, *commandContainer.getCommandStream(), false); NEO::EncodeWA<GfxFamily>::encodeAdditionalPipelineSelect(neoDevice, *commandContainer.getCommandStream(), false);

View File

@ -112,8 +112,6 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendLaunchKernelWithParams(z
NEO::Device *neoDevice = device->getNEODevice(); NEO::Device *neoDevice = device->getNEODevice();
this->threadArbitrationPolicy = kernelImp->getSchedulingHintExp();
if (NEO::DebugManager.flags.EnableSWTags.get()) { if (NEO::DebugManager.flags.EnableSWTags.get()) {
neoDevice->getRootDeviceEnvironment().tagsManager->insertTag<GfxFamily, NEO::SWTags::KernelNameTag>( neoDevice->getRootDeviceEnvironment().tagsManager->insertTag<GfxFamily, NEO::SWTags::KernelNameTag>(
*commandContainer.getCommandStream(), *commandContainer.getCommandStream(),

View File

@ -27,35 +27,35 @@ template <GFXCORE_FAMILY gfxCoreFamily>
ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::executeCommandListImmediateWithFlushTask(bool performMigration) { ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::executeCommandListImmediateWithFlushTask(bool performMigration) {
NEO::DispatchFlags dispatchFlags( NEO::DispatchFlags dispatchFlags(
{}, //csrDependencies {}, //csrDependencies
nullptr, //barrierTimestampPacketNodes nullptr, //barrierTimestampPacketNodes
{}, //pipelineSelectArgs {}, //pipelineSelectArgs
nullptr, //flushStampReference nullptr, //flushStampReference
NEO::QueueThrottle::MEDIUM, //throttle NEO::QueueThrottle::MEDIUM, //throttle
this->getCommandListPreemptionMode(), //preemptionMode this->getCommandListPreemptionMode(), //preemptionMode
this->commandContainer.lastSentNumGrfRequired, //numGrfRequired this->commandContainer.lastSentNumGrfRequired, //numGrfRequired
NEO::L3CachingSettings::l3CacheOn, //l3CacheSettings NEO::L3CachingSettings::l3CacheOn, //l3CacheSettings
this->getThreadArbitrationPolicy(), //threadArbitrationPolicy this->requiredStreamState.stateComputeMode.threadArbitrationPolicy.value, //threadArbitrationPolicy
NEO::AdditionalKernelExecInfo::NotApplicable, //additionalKernelExecInfo NEO::AdditionalKernelExecInfo::NotApplicable, //additionalKernelExecInfo
NEO::KernelExecutionType::NotApplicable, //kernelExecutionType NEO::KernelExecutionType::NotApplicable, //kernelExecutionType
NEO::MemoryCompressionState::NotApplicable, //memoryCompressionState NEO::MemoryCompressionState::NotApplicable, //memoryCompressionState
NEO::QueueSliceCount::defaultSliceCount, //sliceCount NEO::QueueSliceCount::defaultSliceCount, //sliceCount
this->isSyncModeQueue, //blocking this->isSyncModeQueue, //blocking
this->isSyncModeQueue, //dcFlush this->isSyncModeQueue, //dcFlush
this->getCommandListSLMEnable(), //useSLM this->getCommandListSLMEnable(), //useSLM
this->isSyncModeQueue, //guardCommandBufferWithPipeControl this->isSyncModeQueue, //guardCommandBufferWithPipeControl
false, //GSBA32BitRequired false, //GSBA32BitRequired
false, //requiresCoherency false, //requiresCoherency
false, //lowPriority false, //lowPriority
true, //implicitFlush true, //implicitFlush
this->csr->isNTo1SubmissionModelEnabled(), //outOfOrderExecutionAllowed this->csr->isNTo1SubmissionModelEnabled(), //outOfOrderExecutionAllowed
false, //epilogueRequired false, //epilogueRequired
false, //usePerDssBackedBuffer false, //usePerDssBackedBuffer
false, //useSingleSubdevice false, //useSingleSubdevice
false, //useGlobalAtomics false, //useGlobalAtomics
this->device->getNEODevice()->getNumGenericSubDevices() > 1, //areMultipleSubDevicesInContext this->device->getNEODevice()->getNumGenericSubDevices() > 1, //areMultipleSubDevicesInContext
false, //memoryMigrationRequired false, //memoryMigrationRequired
false //textureCacheFlush false //textureCacheFlush
); );
this->commandContainer.removeDuplicatesFromResidencyContainer(); this->commandContainer.removeDuplicatesFromResidencyContainer();

View File

@ -210,14 +210,10 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendLaunchKernelWithParams(z
} }
} }
KernelImp *kernelImp = static_cast<KernelImp *>(kernel);
if (kernelImp->getSchedulingHintExp() != NEO::ThreadArbitrationPolicy::NotPresent) {
this->threadArbitrationPolicy = kernelImp->getSchedulingHintExp();
}
auto isMultiOsContextCapable = (this->partitionCount > 1) && !isCooperative; auto isMultiOsContextCapable = (this->partitionCount > 1) && !isCooperative;
updateStreamProperties(*kernel, isMultiOsContextCapable, isCooperative); updateStreamProperties(*kernel, isMultiOsContextCapable, isCooperative);
KernelImp *kernelImp = static_cast<KernelImp *>(kernel);
this->containsStatelessUncachedResource |= kernelImp->getKernelRequiresUncachedMocs(); this->containsStatelessUncachedResource |= kernelImp->getKernelRequiresUncachedMocs();
this->requiresQueueUncachedMocs |= kernelImp->getKernelRequiresQueueUncachedMocs(); this->requiresQueueUncachedMocs |= kernelImp->getKernelRequiresQueueUncachedMocs();

View File

@ -151,6 +151,7 @@ struct Kernel : _ze_kernel_handle_t, virtual NEO::DispatchKernelEncoderI {
virtual NEO::GraphicsAllocation *getPrivateMemoryGraphicsAllocation() = 0; virtual NEO::GraphicsAllocation *getPrivateMemoryGraphicsAllocation() = 0;
virtual ze_result_t setSchedulingHintExp(ze_scheduling_hint_exp_desc_t *pHint) = 0; virtual ze_result_t setSchedulingHintExp(ze_scheduling_hint_exp_desc_t *pHint) = 0;
virtual int32_t getSchedulingHintExp() = 0;
Kernel() = default; Kernel() = default;
Kernel(const Kernel &) = delete; Kernel(const Kernel &) = delete;

View File

@ -1014,9 +1014,6 @@ ze_result_t KernelImp::setSchedulingHintExp(ze_scheduling_hint_exp_desc_t *pHint
} }
int32_t KernelImp::getSchedulingHintExp() { int32_t KernelImp::getSchedulingHintExp() {
if (NEO::DebugManager.flags.OverrideThreadArbitrationPolicy.get() != -1) {
this->schedulingHintExpFlag = static_cast<uint32_t>(NEO::DebugManager.flags.OverrideThreadArbitrationPolicy.get());
}
return this->schedulingHintExpFlag; return this->schedulingHintExpFlag;
} }
} // namespace L0 } // namespace L0

View File

@ -152,7 +152,7 @@ struct KernelImp : Kernel {
} }
ze_result_t setSchedulingHintExp(ze_scheduling_hint_exp_desc_t *pHint) override; ze_result_t setSchedulingHintExp(ze_scheduling_hint_exp_desc_t *pHint) override;
int32_t getSchedulingHintExp(); int32_t getSchedulingHintExp() override;
NEO::ImplicitArgs *getImplicitArgs() const override { return pImplicitArgs.get(); } NEO::ImplicitArgs *getImplicitArgs() const override { return pImplicitArgs.get(); }

View File

@ -94,7 +94,7 @@ HWTEST_F(CommandListAppendLaunchKernel, givenKernelWithThreadArbitrationPolicySe
auto result = commandList->appendLaunchKernel(kernel->toHandle(), &groupCount, nullptr, 0, nullptr); auto result = commandList->appendLaunchKernel(kernel->toHandle(), &groupCount, nullptr, 0, nullptr);
ASSERT_EQ(ZE_RESULT_SUCCESS, result); ASSERT_EQ(ZE_RESULT_SUCCESS, result);
ASSERT_EQ(commandList->threadArbitrationPolicy, NEO::ThreadArbitrationPolicy::RoundRobin); ASSERT_EQ(NEO::ThreadArbitrationPolicy::RoundRobin, commandList->getFinalStreamState().stateComputeMode.threadArbitrationPolicy.value);
delete (pHint); delete (pHint);
} }
@ -114,7 +114,7 @@ HWTEST_F(CommandListAppendLaunchKernel, givenKernelWithThreadArbitrationPolicySe
auto result = commandList->appendLaunchKernel(kernel->toHandle(), &groupCount, nullptr, 0, nullptr); auto result = commandList->appendLaunchKernel(kernel->toHandle(), &groupCount, nullptr, 0, nullptr);
ASSERT_EQ(ZE_RESULT_SUCCESS, result); ASSERT_EQ(ZE_RESULT_SUCCESS, result);
ASSERT_EQ(0, commandList->threadArbitrationPolicy); ASSERT_EQ(NEO::ThreadArbitrationPolicy::AgeBased, commandList->getFinalStreamState().stateComputeMode.threadArbitrationPolicy.value);
delete (pHint); delete (pHint);
} }

View File

@ -1234,6 +1234,37 @@ HWTEST2_F(CommandListAppendLaunchKernel, givenCooperativeAndNonCooperativeKernel
EXPECT_EQ(ZE_RESULT_ERROR_INVALID_ARGUMENT, result); EXPECT_EQ(ZE_RESULT_ERROR_INVALID_ARGUMENT, result);
} }
HWTEST2_F(CommandListAppendLaunchKernel, GivenDebugToggleSetWhenUpdateStreamPropertiesIsCalledThenCorrectThreadArbitrationPolicyIsSet, IsAtLeastSkl) {
DebugManagerStateRestore restorer;
auto &hwHelper = NEO::HwHelper::get(device->getHwInfo().platform.eRenderCoreFamily);
auto defaultThreadArbitrationPolicy = hwHelper.getDefaultThreadArbitrationPolicy();
auto nonDefaultThreadArbitrationPolicy = defaultThreadArbitrationPolicy + 1;
Mock<::L0::Kernel> kernel;
auto pMockModule = std::unique_ptr<Module>(new Mock<Module>(device, nullptr));
kernel.module = pMockModule.get();
auto pCommandList = std::make_unique<WhiteBox<::L0::CommandListCoreFamily<gfxCoreFamily>>>();
auto result = pCommandList->initialize(device, NEO::EngineGroupType::Compute, 0u);
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
// initial kernel with no policy preference
pCommandList->updateStreamProperties(kernel, false, false);
EXPECT_EQ(defaultThreadArbitrationPolicy, pCommandList->finalStreamState.stateComputeMode.threadArbitrationPolicy.value);
// policy changed to non-default state
pCommandList->finalStreamState.stateComputeMode.threadArbitrationPolicy.value = nonDefaultThreadArbitrationPolicy;
// another kernel with no policy preference - do not update policy
pCommandList->updateStreamProperties(kernel, false, false);
EXPECT_EQ(nonDefaultThreadArbitrationPolicy, pCommandList->finalStreamState.stateComputeMode.threadArbitrationPolicy.value);
// another kernel with no policy preference, this time with debug toggle set - update policy back to default value
DebugManager.flags.ForceDefaultThreadArbitrationPolicyIfNotSpecified.set(true);
pCommandList->updateStreamProperties(kernel, false, false);
EXPECT_EQ(defaultThreadArbitrationPolicy, pCommandList->finalStreamState.stateComputeMode.threadArbitrationPolicy.value);
}
struct MultiTileCommandListAppendLaunchFunctionXeHpCoreFixture : public MultiDeviceModuleFixture { struct MultiTileCommandListAppendLaunchFunctionXeHpCoreFixture : public MultiDeviceModuleFixture {
void SetUp() { void SetUp() {
DebugManager.flags.EnableImplicitScaling.set(1); DebugManager.flags.EnableImplicitScaling.set(1);

View File

@ -953,7 +953,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenEnoughMemoryOnlyForPreambleWh
csrCS.getSpace(csrCS.getAvailableSpace() - sizeNeededForPreamble); csrCS.getSpace(csrCS.getAvailableSpace() - sizeNeededForPreamble);
commandStreamReceiver.streamProperties.stateComputeMode.setProperties(flushTaskFlags.requiresCoherency, flushTaskFlags.numGrfRequired, commandStreamReceiver.streamProperties.stateComputeMode.setProperties(flushTaskFlags.requiresCoherency, flushTaskFlags.numGrfRequired,
flushTaskFlags.threadArbitrationPolicy); flushTaskFlags.threadArbitrationPolicy, *defaultHwInfo);
flushTask(commandStreamReceiver); flushTask(commandStreamReceiver);
EXPECT_EQ(sizeNeeded, csrCS.getUsed()); EXPECT_EQ(sizeNeeded, csrCS.getUsed());
@ -987,7 +987,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenEnoughMemoryOnlyForPreambleAn
csrCS.getSpace(csrCS.getAvailableSpace() - sizeNeededForPreamble - sizeNeededForStateBaseAddress); csrCS.getSpace(csrCS.getAvailableSpace() - sizeNeededForPreamble - sizeNeededForStateBaseAddress);
commandStreamReceiver.streamProperties.stateComputeMode.setProperties(flushTaskFlags.requiresCoherency, flushTaskFlags.numGrfRequired, commandStreamReceiver.streamProperties.stateComputeMode.setProperties(flushTaskFlags.requiresCoherency, flushTaskFlags.numGrfRequired,
flushTaskFlags.threadArbitrationPolicy); flushTaskFlags.threadArbitrationPolicy, *defaultHwInfo);
flushTask(commandStreamReceiver); flushTask(commandStreamReceiver);
EXPECT_EQ(sizeNeeded, csrCS.getUsed()); EXPECT_EQ(sizeNeeded, csrCS.getUsed());
@ -1025,7 +1025,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenEnoughMemoryOnlyForPreambleAn
flushTaskFlags.preemptionMode = PreemptionHelper::getDefaultPreemptionMode(mockDevice->getHardwareInfo()); flushTaskFlags.preemptionMode = PreemptionHelper::getDefaultPreemptionMode(mockDevice->getHardwareInfo());
commandStreamReceiver.streamProperties.stateComputeMode.setProperties(flushTaskFlags.requiresCoherency, flushTaskFlags.numGrfRequired, commandStreamReceiver.streamProperties.stateComputeMode.setProperties(flushTaskFlags.requiresCoherency, flushTaskFlags.numGrfRequired,
flushTaskFlags.threadArbitrationPolicy); flushTaskFlags.threadArbitrationPolicy, *defaultHwInfo);
commandStreamReceiver.flushTask( commandStreamReceiver.flushTask(
commandStream, commandStream,
0, 0,

View File

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

View File

@ -96,7 +96,7 @@ HWTEST2_F(CommandStreamReceiverFlushTaskDg2AndLaterTests, givenProgramExtendedPi
dispatchFlags.threadArbitrationPolicy = hwHelper.getDefaultThreadArbitrationPolicy(); dispatchFlags.threadArbitrationPolicy = hwHelper.getDefaultThreadArbitrationPolicy();
commandStreamReceiver.streamProperties.stateComputeMode.setProperties(dispatchFlags.requiresCoherency, dispatchFlags.numGrfRequired, commandStreamReceiver.streamProperties.stateComputeMode.setProperties(dispatchFlags.requiresCoherency, dispatchFlags.numGrfRequired,
dispatchFlags.threadArbitrationPolicy); dispatchFlags.threadArbitrationPolicy, *defaultHwInfo);
auto cmdSizeForAllCommands = commandStreamReceiver.getRequiredCmdStreamSize(dispatchFlags, *pDevice); auto cmdSizeForAllCommands = commandStreamReceiver.getRequiredCmdStreamSize(dispatchFlags, *pDevice);
commandStreamReceiver.flushTask(commandStream, commandStreamReceiver.flushTask(commandStream,
0, 0,

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2018-2021 Intel Corporation * Copyright (C) 2018-2022 Intel Corporation
* *
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
* *
@ -144,7 +144,7 @@ struct UltCommandStreamReceiverTest
commandStreamReceiver.lastMediaSamplerConfig = 0; commandStreamReceiver.lastMediaSamplerConfig = 0;
commandStreamReceiver.lastSentUseGlobalAtomics = false; commandStreamReceiver.lastSentUseGlobalAtomics = false;
commandStreamReceiver.streamProperties.stateComputeMode.setProperties(0, GrfConfig::DefaultGrfNumber, commandStreamReceiver.streamProperties.stateComputeMode.setProperties(0, GrfConfig::DefaultGrfNumber,
hwHelper.getDefaultThreadArbitrationPolicy()); hwHelper.getDefaultThreadArbitrationPolicy(), *defaultHwInfo);
} }
template <typename GfxFamily> template <typename GfxFamily>

View File

@ -328,6 +328,7 @@ OverrideSystolicInComputeWalker = -1
OverrideKernelSizeLimitForSmallDispatch = -1 OverrideKernelSizeLimitForSmallDispatch = -1
SkipFlushingEventsOnGetStatusCalls = 0 SkipFlushingEventsOnGetStatusCalls = 0
AllowUnrestrictedSize = 0 AllowUnrestrictedSize = 0
ForceDefaultThreadArbitrationPolicyIfNotSpecified = 0
DoNotFreeResources = 0 DoNotFreeResources = 0
OverrideGmmResourceUsageField = -1 OverrideGmmResourceUsageField = -1
LogAllocationType = 0 LogAllocationType = 0

View File

@ -260,23 +260,13 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
dispatchFlags.pipelineSelectArgs.specialPipelineSelectMode, dispatchFlags.pipelineSelectArgs.specialPipelineSelectMode,
hwInfo); hwInfo);
if (dispatchFlags.threadArbitrationPolicy == ThreadArbitrationPolicy::NotPresent) {
if (this->streamProperties.stateComputeMode.threadArbitrationPolicy.value != -1) {
// Reuse previous programming
dispatchFlags.threadArbitrationPolicy = this->streamProperties.stateComputeMode.threadArbitrationPolicy.value;
} else {
// Pick default if this is first submit
dispatchFlags.threadArbitrationPolicy = hwHelper.getDefaultThreadArbitrationPolicy();
}
}
if (dispatchFlags.numGrfRequired == GrfConfig::NotApplicable) { if (dispatchFlags.numGrfRequired == GrfConfig::NotApplicable) {
dispatchFlags.numGrfRequired = lastSentNumGrfRequired; dispatchFlags.numGrfRequired = lastSentNumGrfRequired;
} }
auto requiresCoherency = hwHelper.forceNonGpuCoherencyWA(dispatchFlags.requiresCoherency); auto requiresCoherency = hwHelper.forceNonGpuCoherencyWA(dispatchFlags.requiresCoherency);
this->streamProperties.stateComputeMode.setProperties(requiresCoherency, dispatchFlags.numGrfRequired, this->streamProperties.stateComputeMode.setProperties(requiresCoherency, dispatchFlags.numGrfRequired,
dispatchFlags.threadArbitrationPolicy); dispatchFlags.threadArbitrationPolicy, hwInfo);
csrSizeRequestFlags.l3ConfigChanged = this->lastSentL3Config != newL3Config; csrSizeRequestFlags.l3ConfigChanged = this->lastSentL3Config != newL3Config;
csrSizeRequestFlags.preemptionRequestChanged = this->lastPreemptionMode != dispatchFlags.preemptionMode; csrSizeRequestFlags.preemptionRequestChanged = this->lastPreemptionMode != dispatchFlags.preemptionMode;

View File

@ -16,7 +16,7 @@ struct StateComputeModeProperties {
StreamProperty pixelAsyncComputeThreadLimit{}; StreamProperty pixelAsyncComputeThreadLimit{};
StreamProperty threadArbitrationPolicy{}; StreamProperty threadArbitrationPolicy{};
void setProperties(bool requiresCoherency, uint32_t numGrfRequired, int32_t threadArbitrationPolicy); void setProperties(bool requiresCoherency, uint32_t numGrfRequired, int32_t threadArbitrationPolicy, const HardwareInfo &hwInfo);
void setProperties(const StateComputeModeProperties &properties); void setProperties(const StateComputeModeProperties &properties);
bool isDirty() const; bool isDirty() const;
void clearIsDirty(); void clearIsDirty();

View File

@ -7,11 +7,13 @@
#include "shared/source/command_stream/stream_properties.h" #include "shared/source/command_stream/stream_properties.h"
#include "shared/source/command_stream/thread_arbitration_policy.h"
#include "shared/source/kernel/grf_config.h" #include "shared/source/kernel/grf_config.h"
using namespace NEO; using namespace NEO;
void StateComputeModeProperties::setProperties(bool requiresCoherency, uint32_t numGrfRequired, int32_t threadArbitrationPolicy) { void StateComputeModeProperties::setProperties(bool requiresCoherency, uint32_t numGrfRequired, int32_t threadArbitrationPolicy,
const HardwareInfo &hwInfo) {
clearIsDirty(); clearIsDirty();
int32_t isCoherencyRequired = (requiresCoherency ? 1 : 0); int32_t isCoherencyRequired = (requiresCoherency ? 1 : 0);
@ -32,8 +34,15 @@ void StateComputeModeProperties::setProperties(bool requiresCoherency, uint32_t
} }
this->pixelAsyncComputeThreadLimit.set(pixelAsyncComputeThreadLimit); this->pixelAsyncComputeThreadLimit.set(pixelAsyncComputeThreadLimit);
bool setDefaultThreadArbitrationPolicy = (threadArbitrationPolicy == ThreadArbitrationPolicy::NotPresent) &&
(NEO::DebugManager.flags.ForceDefaultThreadArbitrationPolicyIfNotSpecified.get() ||
(this->threadArbitrationPolicy.value == ThreadArbitrationPolicy::NotPresent));
if (setDefaultThreadArbitrationPolicy) {
auto &hwHelper = NEO::HwHelper::get(hwInfo.platform.eRenderCoreFamily);
threadArbitrationPolicy = hwHelper.getDefaultThreadArbitrationPolicy();
}
if (DebugManager.flags.OverrideThreadArbitrationPolicy.get() != -1) { if (DebugManager.flags.OverrideThreadArbitrationPolicy.get() != -1) {
threadArbitrationPolicy = static_cast<uint32_t>(DebugManager.flags.OverrideThreadArbitrationPolicy.get()); threadArbitrationPolicy = DebugManager.flags.OverrideThreadArbitrationPolicy.get();
} }
this->threadArbitrationPolicy.set(threadArbitrationPolicy); this->threadArbitrationPolicy.set(threadArbitrationPolicy);
} }

View File

@ -409,6 +409,7 @@ DECLARE_DEBUG_VARIABLE(bool, DisableDeepBind, false, "Disable passing RTLD_DEEPB
DECLARE_DEBUG_VARIABLE(bool, UseUmKmDataTranslator, false, "Use helper library for UMD<->KMD (WDDM) struct layout compatibility") DECLARE_DEBUG_VARIABLE(bool, UseUmKmDataTranslator, false, "Use helper library for UMD<->KMD (WDDM) struct layout compatibility")
DECLARE_DEBUG_VARIABLE(bool, SkipFlushingEventsOnGetStatusCalls, false, "When set to 1, events are not causing internal flush when querying for CL_EVENT_COMMAND_EXECUTION_STATUS") DECLARE_DEBUG_VARIABLE(bool, SkipFlushingEventsOnGetStatusCalls, false, "When set to 1, events are not causing internal flush when querying for CL_EVENT_COMMAND_EXECUTION_STATUS")
DECLARE_DEBUG_VARIABLE(bool, AllowUnrestrictedSize, false, "Allow allocating memory with greater size than MAX_MEM_ALLOC_SIZE") DECLARE_DEBUG_VARIABLE(bool, AllowUnrestrictedSize, false, "Allow allocating memory with greater size than MAX_MEM_ALLOC_SIZE")
DECLARE_DEBUG_VARIABLE(bool, ForceDefaultThreadArbitrationPolicyIfNotSpecified, false, "When executing kernel without thread arbitration hint specified, ensure the default setting is used")
DECLARE_DEBUG_VARIABLE(int32_t, ProgramExtendedPipeControlPriorToNonPipelinedStateCommand, -1, "-1: default, 0: disable, 1: enable, Program additional extended version of PIPE CONTROL command before non pipelined state command") DECLARE_DEBUG_VARIABLE(int32_t, ProgramExtendedPipeControlPriorToNonPipelinedStateCommand, -1, "-1: default, 0: disable, 1: enable, Program additional extended version of PIPE CONTROL command before non pipelined state command")
DECLARE_DEBUG_VARIABLE(int32_t, OverrideDrmRegion, -1, "-1: disable, 0+: override to given memory region for all allocations") DECLARE_DEBUG_VARIABLE(int32_t, OverrideDrmRegion, -1, "-1: disable, 0+: override to given memory region for all allocations")
DECLARE_DEBUG_VARIABLE(bool, ForceAllResourcesUncached, false, "When set, all memory operations for all resources are forced to UC. This overrides all caching-related debug variables and globally disables all caches") DECLARE_DEBUG_VARIABLE(bool, ForceAllResourcesUncached, false, "When set, all memory operations for all resources are forced to UC. This overrides all caching-related debug variables and globally disables all caches")

View File

@ -32,7 +32,7 @@ GEN12LPTEST_F(CommandEncoderTest, WhenAdjustComputeModeIsCalledThenStateComputeM
// Adjust the State Compute Mode which sets FORCE_NON_COHERENT_FORCE_GPU_NON_COHERENT // Adjust the State Compute Mode which sets FORCE_NON_COHERENT_FORCE_GPU_NON_COHERENT
StreamProperties properties{}; StreamProperties properties{};
properties.stateComputeMode.setProperties(false, cmdContainer.lastSentNumGrfRequired, 0); properties.stateComputeMode.setProperties(false, cmdContainer.lastSentNumGrfRequired, 0, *defaultHwInfo);
NEO::EncodeComputeMode<FamilyType>::programComputeModeCommand(*cmdContainer.getCommandStream(), NEO::EncodeComputeMode<FamilyType>::programComputeModeCommand(*cmdContainer.getCommandStream(),
properties.stateComputeMode, *defaultHwInfo); properties.stateComputeMode, *defaultHwInfo);

View File

@ -273,25 +273,25 @@ XE_HPC_CORETEST_F(CommandEncodeXeHpcCoreTest, whenAdjustComputeModeIsCalledThenC
StreamProperties properties{}; StreamProperties properties{};
auto pLinearStream = std::make_unique<LinearStream>(buffer, sizeof(buffer)); auto pLinearStream = std::make_unique<LinearStream>(buffer, sizeof(buffer));
properties.stateComputeMode.setProperties(false, 0, ThreadArbitrationPolicy::AgeBased); properties.stateComputeMode.setProperties(false, 0, ThreadArbitrationPolicy::AgeBased, *defaultHwInfo);
EncodeComputeMode<FamilyType>::programComputeModeCommand(*pLinearStream, properties.stateComputeMode, *defaultHwInfo); EncodeComputeMode<FamilyType>::programComputeModeCommand(*pLinearStream, properties.stateComputeMode, *defaultHwInfo);
auto pScm = reinterpret_cast<STATE_COMPUTE_MODE *>(pLinearStream->getCpuBase()); auto pScm = reinterpret_cast<STATE_COMPUTE_MODE *>(pLinearStream->getCpuBase());
EXPECT_EQ(EU_THREAD_SCHEDULING_MODE_OVERRIDE::EU_THREAD_SCHEDULING_MODE_OVERRIDE_OLDEST_FIRST, pScm->getEuThreadSchedulingModeOverride()); EXPECT_EQ(EU_THREAD_SCHEDULING_MODE_OVERRIDE::EU_THREAD_SCHEDULING_MODE_OVERRIDE_OLDEST_FIRST, pScm->getEuThreadSchedulingModeOverride());
pLinearStream = std::make_unique<LinearStream>(buffer, sizeof(buffer)); pLinearStream = std::make_unique<LinearStream>(buffer, sizeof(buffer));
properties.stateComputeMode.setProperties(false, 0, ThreadArbitrationPolicy::RoundRobin); properties.stateComputeMode.setProperties(false, 0, ThreadArbitrationPolicy::RoundRobin, *defaultHwInfo);
EncodeComputeMode<FamilyType>::programComputeModeCommand(*pLinearStream, properties.stateComputeMode, *defaultHwInfo); EncodeComputeMode<FamilyType>::programComputeModeCommand(*pLinearStream, properties.stateComputeMode, *defaultHwInfo);
pScm = reinterpret_cast<STATE_COMPUTE_MODE *>(pLinearStream->getCpuBase()); pScm = reinterpret_cast<STATE_COMPUTE_MODE *>(pLinearStream->getCpuBase());
EXPECT_EQ(EU_THREAD_SCHEDULING_MODE_OVERRIDE::EU_THREAD_SCHEDULING_MODE_OVERRIDE_ROUND_ROBIN, pScm->getEuThreadSchedulingModeOverride()); EXPECT_EQ(EU_THREAD_SCHEDULING_MODE_OVERRIDE::EU_THREAD_SCHEDULING_MODE_OVERRIDE_ROUND_ROBIN, pScm->getEuThreadSchedulingModeOverride());
pLinearStream = std::make_unique<LinearStream>(buffer, sizeof(buffer)); pLinearStream = std::make_unique<LinearStream>(buffer, sizeof(buffer));
properties.stateComputeMode.setProperties(false, 0, ThreadArbitrationPolicy::RoundRobinAfterDependency); properties.stateComputeMode.setProperties(false, 0, ThreadArbitrationPolicy::RoundRobinAfterDependency, *defaultHwInfo);
EncodeComputeMode<FamilyType>::programComputeModeCommand(*pLinearStream, properties.stateComputeMode, *defaultHwInfo); EncodeComputeMode<FamilyType>::programComputeModeCommand(*pLinearStream, properties.stateComputeMode, *defaultHwInfo);
pScm = reinterpret_cast<STATE_COMPUTE_MODE *>(pLinearStream->getCpuBase()); pScm = reinterpret_cast<STATE_COMPUTE_MODE *>(pLinearStream->getCpuBase());
EXPECT_EQ(EU_THREAD_SCHEDULING_MODE_OVERRIDE::EU_THREAD_SCHEDULING_MODE_OVERRIDE_STALL_BASED_ROUND_ROBIN, pScm->getEuThreadSchedulingModeOverride()); EXPECT_EQ(EU_THREAD_SCHEDULING_MODE_OVERRIDE::EU_THREAD_SCHEDULING_MODE_OVERRIDE_STALL_BASED_ROUND_ROBIN, pScm->getEuThreadSchedulingModeOverride());
pLinearStream = std::make_unique<LinearStream>(buffer, sizeof(buffer)); pLinearStream = std::make_unique<LinearStream>(buffer, sizeof(buffer));
properties.stateComputeMode.setProperties(false, 0, ThreadArbitrationPolicy::NotPresent); properties.stateComputeMode.setProperties(false, 0, ThreadArbitrationPolicy::NotPresent, *defaultHwInfo);
EncodeComputeMode<FamilyType>::programComputeModeCommand(*pLinearStream, properties.stateComputeMode, *defaultHwInfo); EncodeComputeMode<FamilyType>::programComputeModeCommand(*pLinearStream, properties.stateComputeMode, *defaultHwInfo);
pScm = reinterpret_cast<STATE_COMPUTE_MODE *>(pLinearStream->getCpuBase()); pScm = reinterpret_cast<STATE_COMPUTE_MODE *>(pLinearStream->getCpuBase());
EXPECT_EQ(EU_THREAD_SCHEDULING_MODE_OVERRIDE::EU_THREAD_SCHEDULING_MODE_OVERRIDE_HW_DEFAULT, pScm->getEuThreadSchedulingModeOverride()); EXPECT_EQ(EU_THREAD_SCHEDULING_MODE_OVERRIDE::EU_THREAD_SCHEDULING_MODE_OVERRIDE_HW_DEFAULT, pScm->getEuThreadSchedulingModeOverride());

View File

@ -69,7 +69,7 @@ TEST(StreamPropertiesTests, whenSettingStateComputeModePropertiesThenCorrectValu
for (auto requiresCoherency : ::testing::Bool()) { for (auto requiresCoherency : ::testing::Bool()) {
for (auto largeGrf : ::testing::Bool()) { for (auto largeGrf : ::testing::Bool()) {
for (auto threadArbitrationPolicy : threadArbitrationPolicyValues) { for (auto threadArbitrationPolicy : threadArbitrationPolicyValues) {
properties.stateComputeMode.setProperties(requiresCoherency, largeGrf ? 256 : 128, threadArbitrationPolicy); properties.stateComputeMode.setProperties(requiresCoherency, largeGrf ? 256 : 128, threadArbitrationPolicy, *defaultHwInfo);
EXPECT_EQ(largeGrf, properties.stateComputeMode.largeGrfMode.value); EXPECT_EQ(largeGrf, properties.stateComputeMode.largeGrfMode.value);
EXPECT_EQ(requiresCoherency, properties.stateComputeMode.isCoherencyRequired.value); EXPECT_EQ(requiresCoherency, properties.stateComputeMode.isCoherencyRequired.value);
EXPECT_EQ(-1, properties.stateComputeMode.zPassAsyncComputeThreadLimit.value); EXPECT_EQ(-1, properties.stateComputeMode.zPassAsyncComputeThreadLimit.value);
@ -81,19 +81,19 @@ TEST(StreamPropertiesTests, whenSettingStateComputeModePropertiesThenCorrectValu
for (auto forceZPassAsyncComputeThreadLimit : ::testing::Bool()) { for (auto forceZPassAsyncComputeThreadLimit : ::testing::Bool()) {
DebugManager.flags.ForceZPassAsyncComputeThreadLimit.set(forceZPassAsyncComputeThreadLimit); DebugManager.flags.ForceZPassAsyncComputeThreadLimit.set(forceZPassAsyncComputeThreadLimit);
properties.stateComputeMode.setProperties(false, 0u, 0u); properties.stateComputeMode.setProperties(false, 0u, 0u, *defaultHwInfo);
EXPECT_EQ(forceZPassAsyncComputeThreadLimit, properties.stateComputeMode.zPassAsyncComputeThreadLimit.value); EXPECT_EQ(forceZPassAsyncComputeThreadLimit, properties.stateComputeMode.zPassAsyncComputeThreadLimit.value);
} }
for (auto forcePixelAsyncComputeThreadLimit : ::testing::Bool()) { for (auto forcePixelAsyncComputeThreadLimit : ::testing::Bool()) {
DebugManager.flags.ForcePixelAsyncComputeThreadLimit.set(forcePixelAsyncComputeThreadLimit); DebugManager.flags.ForcePixelAsyncComputeThreadLimit.set(forcePixelAsyncComputeThreadLimit);
properties.stateComputeMode.setProperties(false, 0u, 0u); properties.stateComputeMode.setProperties(false, 0u, 0u, *defaultHwInfo);
EXPECT_EQ(forcePixelAsyncComputeThreadLimit, properties.stateComputeMode.pixelAsyncComputeThreadLimit.value); EXPECT_EQ(forcePixelAsyncComputeThreadLimit, properties.stateComputeMode.pixelAsyncComputeThreadLimit.value);
} }
for (auto threadArbitrationPolicy : threadArbitrationPolicyValues) { for (auto threadArbitrationPolicy : threadArbitrationPolicyValues) {
DebugManager.flags.OverrideThreadArbitrationPolicy.set(threadArbitrationPolicy); DebugManager.flags.OverrideThreadArbitrationPolicy.set(threadArbitrationPolicy);
properties.stateComputeMode.setProperties(false, 0u, 0u); properties.stateComputeMode.setProperties(false, 0u, 0u, *defaultHwInfo);
EXPECT_EQ(threadArbitrationPolicy, properties.stateComputeMode.threadArbitrationPolicy.value); EXPECT_EQ(threadArbitrationPolicy, properties.stateComputeMode.threadArbitrationPolicy.value);
} }
} }

View File

@ -73,7 +73,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTestPvcAndLater, givenCommandCon
using STATE_COMPUTE_MODE = typename FamilyType::STATE_COMPUTE_MODE; using STATE_COMPUTE_MODE = typename FamilyType::STATE_COMPUTE_MODE;
cmdContainer->lastSentNumGrfRequired = GrfConfig::DefaultGrfNumber; cmdContainer->lastSentNumGrfRequired = GrfConfig::DefaultGrfNumber;
StreamProperties streamProperties{}; StreamProperties streamProperties{};
streamProperties.stateComputeMode.setProperties(false, GrfConfig::LargeGrfNumber, 0u); streamProperties.stateComputeMode.setProperties(false, GrfConfig::LargeGrfNumber, 0u, *defaultHwInfo);
EncodeComputeMode<FamilyType>::programComputeModeCommand(*cmdContainer->getCommandStream(), streamProperties.stateComputeMode, *defaultHwInfo); EncodeComputeMode<FamilyType>::programComputeModeCommand(*cmdContainer->getCommandStream(), streamProperties.stateComputeMode, *defaultHwInfo);
GenCmdList commands; GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());

View File

@ -439,11 +439,11 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenForceBtpPrefetchModeD
HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenDispatchInterfaceWhenNumRequiredGrfIsNotDefaultThenStateComputeModeCommandAdded) { HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenDispatchInterfaceWhenNumRequiredGrfIsNotDefaultThenStateComputeModeCommandAdded) {
StreamProperties streamProperties{}; StreamProperties streamProperties{};
streamProperties.stateComputeMode.setProperties(false, 128, 0u); streamProperties.stateComputeMode.setProperties(false, 128, 0u, *defaultHwInfo);
streamProperties.stateComputeMode.setProperties(false, 128, 0u); streamProperties.stateComputeMode.setProperties(false, 128, 0u, *defaultHwInfo);
EXPECT_FALSE(streamProperties.stateComputeMode.isDirty()); EXPECT_FALSE(streamProperties.stateComputeMode.isDirty());
streamProperties.stateComputeMode.setProperties(false, 256, 0u); streamProperties.stateComputeMode.setProperties(false, 256, 0u, *defaultHwInfo);
EXPECT_TRUE(streamProperties.stateComputeMode.isDirty()); EXPECT_TRUE(streamProperties.stateComputeMode.isDirty());
} }

View File

@ -22,7 +22,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenCommandContainerWhenN
using STATE_COMPUTE_MODE = typename FamilyType::STATE_COMPUTE_MODE; using STATE_COMPUTE_MODE = typename FamilyType::STATE_COMPUTE_MODE;
cmdContainer->lastSentNumGrfRequired = 0; cmdContainer->lastSentNumGrfRequired = 0;
StreamProperties streamProperties{}; StreamProperties streamProperties{};
streamProperties.stateComputeMode.setProperties(false, cmdContainer->lastSentNumGrfRequired + 1, 0u); streamProperties.stateComputeMode.setProperties(false, cmdContainer->lastSentNumGrfRequired + 1, 0u, *defaultHwInfo);
EncodeComputeMode<FamilyType>::programComputeModeCommand(*cmdContainer->getCommandStream(), streamProperties.stateComputeMode, *defaultHwInfo); EncodeComputeMode<FamilyType>::programComputeModeCommand(*cmdContainer->getCommandStream(), streamProperties.stateComputeMode, *defaultHwInfo);
GenCmdList commands; GenCmdList commands;
@ -58,7 +58,7 @@ HWTEST2_F(CommandEncodeStatesTest, givenLargeGrfModeProgrammedThenExpectedComman
NEO::EncodeComputeMode<GfxFamily>::adjustPipelineSelect(*cmdContainer, descriptor); NEO::EncodeComputeMode<GfxFamily>::adjustPipelineSelect(*cmdContainer, descriptor);
StreamProperties streamProperties{}; StreamProperties streamProperties{};
streamProperties.stateComputeMode.setProperties(false, 256u, 0u); streamProperties.stateComputeMode.setProperties(false, 256u, 0u, *defaultHwInfo);
NEO::EncodeComputeMode<GfxFamily>::programComputeModeCommand(*cmdContainer->getCommandStream(), streamProperties.stateComputeMode, *defaultHwInfo); NEO::EncodeComputeMode<GfxFamily>::programComputeModeCommand(*cmdContainer->getCommandStream(), streamProperties.stateComputeMode, *defaultHwInfo);
auto usedSpaceAfter = cmdContainer->getCommandStream()->getUsed(); auto usedSpaceAfter = cmdContainer->getCommandStream()->getUsed();

View File

@ -191,7 +191,7 @@ PVCTEST_F(PvcComputeModeRequirements, giventhreadArbitrationPolicyWithoutSharedH
}; };
getCsrHw<FamilyType>()->streamProperties.stateComputeMode.setProperties(flags.requiresCoherency, flags.numGrfRequired, getCsrHw<FamilyType>()->streamProperties.stateComputeMode.setProperties(flags.requiresCoherency, flags.numGrfRequired,
flags.threadArbitrationPolicy); flags.threadArbitrationPolicy, *defaultHwInfo);
flushTask(true); flushTask(true);
findCmd(true); // first time findCmd(true); // first time

View File

@ -62,7 +62,7 @@ XE_HPG_CORETEST_F(ComputeModeRequirementsXeHpgCore, GivenVariousSettingsWhenComp
DebugManager.flags.ForcePixelAsyncComputeThreadLimit.set(testValue.pixelThreadLimit); DebugManager.flags.ForcePixelAsyncComputeThreadLimit.set(testValue.pixelThreadLimit);
pCsr->streamProperties.stateComputeMode = {}; pCsr->streamProperties.stateComputeMode = {};
pCsr->streamProperties.stateComputeMode.setProperties(false, 0u, 0u); pCsr->streamProperties.stateComputeMode.setProperties(false, 0u, 0u, *defaultHwInfo);
LinearStream stream(buff, 1024); LinearStream stream(buff, 1024);
pCsr->programComputeMode(stream, flags, *defaultHwInfo); pCsr->programComputeMode(stream, flags, *defaultHwInfo);
EXPECT_EQ(cmdsSize, stream.getUsed()); EXPECT_EQ(cmdsSize, stream.getUsed());
@ -83,7 +83,7 @@ XE_HPG_CORETEST_F(ComputeModeRequirementsXeHpgCore, GivenVariousSettingsWhenComp
DebugManager.flags.ForcePixelAsyncComputeThreadLimit.set(-1); DebugManager.flags.ForcePixelAsyncComputeThreadLimit.set(-1);
pCsr->streamProperties.stateComputeMode = {}; pCsr->streamProperties.stateComputeMode = {};
pCsr->streamProperties.stateComputeMode.setProperties(false, 0u, 0u); pCsr->streamProperties.stateComputeMode.setProperties(false, 0u, 0u, *defaultHwInfo);
LinearStream stream(buff, 1024); LinearStream stream(buff, 1024);
pCsr->programComputeMode(stream, flags, *defaultHwInfo); pCsr->programComputeMode(stream, flags, *defaultHwInfo);
EXPECT_EQ(cmdsSize, stream.getUsed()); EXPECT_EQ(cmdsSize, stream.getUsed());