refactor: use cmd list member instead of getting l0GfxCoreHelper

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski 2024-06-20 15:42:19 +00:00 committed by Compute-Runtime-Automation
parent 18b19373c3
commit 0164288fce
2 changed files with 4 additions and 1 deletions

View File

@ -381,6 +381,7 @@ struct CommandListCoreFamily : public CommandListImp {
bool inOrderAtomicSignalingEnabled = false;
bool allowCbWaitEventsNoopDispatch = false;
bool copyOperationFenceSupported = false;
bool implicitSynchronizedDispatchForCooperativeKernelsAllowed = false;
};
template <PRODUCT_FAMILY gfxProductFamily>

View File

@ -219,6 +219,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::initialize(Device *device, NEO
auto &rootDeviceEnvironment = neoDevice->getRootDeviceEnvironment();
auto &productHelper = rootDeviceEnvironment.getHelper<NEO::ProductHelper>();
auto &gfxCoreHelper = neoDevice->getGfxCoreHelper();
auto &l0GfxCoreHelper = device->getL0GfxCoreHelper();
auto &compilerProductHelper = neoDevice->getCompilerProductHelper();
auto gmmHelper = rootDeviceEnvironment.getGmmHelper();
@ -249,6 +250,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::initialize(Device *device, NEO
this->scratchAddressPatchingEnabled = (this->heaplessModeEnabled && !isImmediateType());
this->copyOperationFenceSupported = (isCopyOnly() || isCopyOffloadEnabled()) && productHelper.isDeviceToHostCopySignalingFenceRequired();
this->defaultPipelinedThreadArbitrationPolicy = gfxCoreHelper.getDefaultThreadArbitrationPolicy();
this->implicitSynchronizedDispatchForCooperativeKernelsAllowed = l0GfxCoreHelper.implicitSynchronizedDispatchForCooperativeKernelsAllowed();
if (NEO::debugManager.flags.OverrideThreadArbitrationPolicy.get() != -1) {
this->defaultPipelinedThreadArbitrationPolicy = NEO::debugManager.flags.OverrideThreadArbitrationPolicy.get();
}
@ -391,7 +393,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendLaunchKernel(ze_kernel_h
return ret;
}
if (launchParams.isCooperative && device->getL0GfxCoreHelper().implicitSynchronizedDispatchForCooperativeKernelsAllowed()) {
if (launchParams.isCooperative && this->implicitSynchronizedDispatchForCooperativeKernelsAllowed) {
enableSynchronizedDispatch(NEO::SynchronizedDispatchMode::full);
}