refactor: add statelessBuiltinsEnabled bool to cmdlist
Related-To: NEO-6075 Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
parent
2116808b8d
commit
635f596599
|
@ -369,6 +369,10 @@ struct CommandList : _ze_command_list_handle_t {
|
|||
return taskCountUpdateFenceRequired;
|
||||
}
|
||||
|
||||
bool isStatelessBuiltinsEnabled() const {
|
||||
return statelessBuiltinsEnabled;
|
||||
}
|
||||
|
||||
void registerCsrDcFlushForDcMitigation(NEO::CommandStreamReceiver &csr);
|
||||
|
||||
protected:
|
||||
|
@ -458,6 +462,7 @@ struct CommandList : _ze_command_list_handle_t {
|
|||
bool scratchAddressPatchingEnabled = false;
|
||||
bool taskCountUpdateFenceRequired = false;
|
||||
bool requiresDcFlushForDcMitigation = false;
|
||||
bool statelessBuiltinsEnabled = false;
|
||||
};
|
||||
|
||||
using CommandListAllocatorFn = CommandList *(*)(uint32_t);
|
||||
|
|
|
@ -255,6 +255,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::initialize(Device *device, NEO
|
|||
if (NEO::debugManager.flags.OverrideThreadArbitrationPolicy.get() != -1) {
|
||||
this->defaultPipelinedThreadArbitrationPolicy = NEO::debugManager.flags.OverrideThreadArbitrationPolicy.get();
|
||||
}
|
||||
this->statelessBuiltinsEnabled = compilerProductHelper.isForceToStatelessRequired();
|
||||
|
||||
this->commandContainer.doubleSbaWaRef() = this->doubleSbaWa;
|
||||
this->commandContainer.l1CachePolicyDataRef() = &this->l1CachePolicyData;
|
||||
|
@ -1472,10 +1473,8 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendMemoryCopy(void *dstptr,
|
|||
uintptr_t leftSize = 0;
|
||||
uintptr_t rightSize = 0;
|
||||
uintptr_t middleSizeBytes = 0;
|
||||
bool isStateless = this->cmdListHeapAddressModel == NEO::HeapAddressModel::globalStateless;
|
||||
if (neoDevice->getCompilerProductHelper().isForceToStatelessRequired()) {
|
||||
isStateless = true;
|
||||
}
|
||||
bool isStateless = (this->cmdListHeapAddressModel == NEO::HeapAddressModel::globalStateless) || this->isStatelessBuiltinsEnabled();
|
||||
|
||||
const bool isHeapless = this->isHeaplessModeEnabled();
|
||||
|
||||
if (!isCopyOnlyEnabled) {
|
||||
|
|
|
@ -306,6 +306,7 @@ struct WhiteBox<::L0::CommandListImp> : public ::L0::CommandListImp {
|
|||
using BaseClass::signalAllEventPackets;
|
||||
using BaseClass::stateBaseAddressTracking;
|
||||
using BaseClass::stateComputeModeTracking;
|
||||
using BaseClass::statelessBuiltinsEnabled;
|
||||
using CommandList::flags;
|
||||
using CommandList::internalUsage;
|
||||
using CommandList::kernelWithAssertAppended;
|
||||
|
|
|
@ -3034,6 +3034,7 @@ TEST_F(CommandListCreate, givenCreatedCommandListWhenGettingTrackingFlagsThenDef
|
|||
|
||||
auto &l0GfxCoreHelper = rootDeviceEnvironment.getHelper<L0GfxCoreHelper>();
|
||||
auto &productHelper = rootDeviceEnvironment.getHelper<NEO::ProductHelper>();
|
||||
auto &compilerProductHelper = rootDeviceEnvironment.getHelper<NEO::CompilerProductHelper>();
|
||||
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::ult::CommandList> commandList(CommandList::whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::renderCompute, 0u, returnValue, false)));
|
||||
|
@ -3062,6 +3063,7 @@ TEST_F(CommandListCreate, givenCreatedCommandListWhenGettingTrackingFlagsThenDef
|
|||
EXPECT_EQ(expectedDispatchCmdListBatchBufferAsPrimary, commandList->getCmdListBatchBufferFlag());
|
||||
|
||||
EXPECT_EQ(commandList->heaplessModeEnabled, commandList->scratchAddressPatchingEnabled);
|
||||
EXPECT_EQ(commandList->statelessBuiltinsEnabled, compilerProductHelper.isForceToStatelessRequired());
|
||||
}
|
||||
|
||||
TEST(BuiltinTypeHelperTest, givenNonStatelessAndNonHeaplessWhenAdjustBuiltinTypeIsCalledThenCorrectBuiltinTypeIsReturned) {
|
||||
|
|
Loading…
Reference in New Issue