mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 22:12:59 +08:00
refactor: add command list engine group type and local dispatch getters
Related-To: NEO-12639 Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
9eb71a8f29
commit
fd4a744650
@@ -400,6 +400,14 @@ struct CommandList : _ze_command_list_handle_t {
|
||||
|
||||
void registerCsrDcFlushForDcMitigation(NEO::CommandStreamReceiver &csr);
|
||||
|
||||
NEO::EngineGroupType getEngineGroupType() const {
|
||||
return engineGroupType;
|
||||
}
|
||||
|
||||
bool getLocalDispatchSupport() const {
|
||||
return localDispatchSupport;
|
||||
}
|
||||
|
||||
protected:
|
||||
NEO::GraphicsAllocation *getAllocationFromHostPtrMap(const void *buffer, uint64_t bufferSize, bool copyOffload);
|
||||
NEO::GraphicsAllocation *getHostPtrAlloc(const void *buffer, uint64_t bufferSize, bool hostCopyAllowed, bool copyOffload);
|
||||
@@ -491,6 +499,7 @@ struct CommandList : _ze_command_list_handle_t {
|
||||
bool requiresDcFlushForDcMitigation = false;
|
||||
bool statelessBuiltinsEnabled = false;
|
||||
bool lastAppendedKernelBindlessMode = false;
|
||||
bool localDispatchSupport = false;
|
||||
};
|
||||
|
||||
using CommandListAllocatorFn = CommandList *(*)(uint32_t);
|
||||
|
||||
@@ -260,6 +260,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::initialize(Device *device, NEO
|
||||
this->defaultPipelinedThreadArbitrationPolicy = NEO::debugManager.flags.OverrideThreadArbitrationPolicy.get();
|
||||
}
|
||||
this->statelessBuiltinsEnabled = compilerProductHelper.isForceToStatelessRequired();
|
||||
this->localDispatchSupport = productHelper.getSupportedLocalDispatchSizes(hwInfo).size() > 0;
|
||||
|
||||
this->commandContainer.doubleSbaWaRef() = this->doubleSbaWa;
|
||||
this->commandContainer.l1CachePolicyDataRef() = &this->l1CachePolicyData;
|
||||
|
||||
@@ -122,6 +122,7 @@ TEST_F(CommandListCreate, whenCommandListIsCreatedThenItIsInitialized) {
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::renderCompute, 0u, returnValue, false));
|
||||
ASSERT_NE(nullptr, commandList);
|
||||
EXPECT_EQ(NEO::EngineGroupType::renderCompute, commandList->getEngineGroupType());
|
||||
|
||||
ze_device_handle_t hDevice;
|
||||
EXPECT_EQ(device, commandList->getDevice());
|
||||
@@ -3048,6 +3049,7 @@ HWTEST2_F(CommandListCreate, givenNullEventWhenAppendEventAfterWalkerThenNothing
|
||||
|
||||
TEST_F(CommandListCreate, givenCreatedCommandListWhenGettingTrackingFlagsThenDefaultValuseIsHwSupported) {
|
||||
auto &rootDeviceEnvironment = device->getNEODevice()->getRootDeviceEnvironment();
|
||||
auto &hwInfo = device->getNEODevice()->getHardwareInfo();
|
||||
|
||||
auto &l0GfxCoreHelper = rootDeviceEnvironment.getHelper<L0GfxCoreHelper>();
|
||||
auto &productHelper = rootDeviceEnvironment.getHelper<NEO::ProductHelper>();
|
||||
@@ -3081,6 +3083,7 @@ TEST_F(CommandListCreate, givenCreatedCommandListWhenGettingTrackingFlagsThenDef
|
||||
|
||||
EXPECT_EQ(commandList->heaplessModeEnabled, commandList->scratchAddressPatchingEnabled);
|
||||
EXPECT_EQ(commandList->statelessBuiltinsEnabled, compilerProductHelper.isForceToStatelessRequired());
|
||||
EXPECT_EQ((productHelper.getSupportedLocalDispatchSizes(hwInfo).size() > 0), commandList->getLocalDispatchSupport());
|
||||
}
|
||||
|
||||
TEST(BuiltinTypeHelperTest, givenNonStatelessAndNonHeaplessWhenAdjustBuiltinTypeIsCalledThenCorrectBuiltinTypeIsReturned) {
|
||||
|
||||
Reference in New Issue
Block a user