refactor: add heaplessModeEnabled argument to isHeaplessStateInitEnabled

Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
Kamil Kopryk 2024-04-09 17:16:06 +00:00 committed by Compute-Runtime-Automation
parent 22e94c3a8c
commit cfc3b6a8c2
7 changed files with 10 additions and 8 deletions

View File

@ -239,7 +239,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::initialize(Device *device, NEO
this->useOnlyGlobalTimestamps = gfxCoreHelper.useOnlyGlobalTimestamps();
this->maxFillPaternSizeForCopyEngine = productHelper.getMaxFillPaternSizeForCopyEngine();
this->heaplessModeEnabled = compilerProductHelper.isHeaplessModeEnabled();
this->heaplessStateInitEnabled = compilerProductHelper.isHeaplessStateInitEnabled();
this->heaplessStateInitEnabled = compilerProductHelper.isHeaplessStateInitEnabled(this->heaplessModeEnabled);
this->requiredStreamState.initSupport(rootDeviceEnvironment);
this->finalStreamState.initSupport(rootDeviceEnvironment);
this->duplicatedInOrderCounterStorageEnabled = gfxCoreHelper.duplicatedInOrderCounterStorageEnabled(rootDeviceEnvironment);

View File

@ -100,7 +100,7 @@ ze_result_t CommandQueueImp::initialize(bool copyOnly, bool isInternal, bool imm
this->dispatchCmdListBatchBufferAsPrimary = L0GfxCoreHelper::dispatchCmdListBatchBufferAsPrimary(rootDeviceEnvironment, !immediateCmdListQueue);
auto &compilerProductHelper = rootDeviceEnvironment.getHelper<NEO::CompilerProductHelper>();
this->heaplessModeEnabled = compilerProductHelper.isHeaplessModeEnabled();
this->heaplessStateInitEnabled = compilerProductHelper.isHeaplessStateInitEnabled();
this->heaplessStateInitEnabled = compilerProductHelper.isHeaplessStateInitEnabled(this->heaplessModeEnabled);
}
return returnValue;
}

View File

@ -131,7 +131,7 @@ CommandQueue::CommandQueue(Context *context, ClDevice *device, const cl_queue_pr
}
this->heaplessModeEnabled = compilerProductHelper.isHeaplessModeEnabled();
this->heaplessStateInitEnabled = compilerProductHelper.isHeaplessStateInitEnabled();
this->heaplessStateInitEnabled = compilerProductHelper.isHeaplessStateInitEnabled(this->heaplessModeEnabled);
}
}

View File

@ -283,7 +283,7 @@ void EncodeDispatchKernel<Family>::encode(CommandContainer &container, EncodeDis
}
}
bool heaplessStateInitEnabled = rootDeviceEnvironment.getHelper<CompilerProductHelper>().isHeaplessStateInitEnabled();
bool heaplessStateInitEnabled = rootDeviceEnvironment.getHelper<CompilerProductHelper>().isHeaplessStateInitEnabled(heaplessModeEnabled);
if (heaplessStateInitEnabled == false) {
if (container.isAnyHeapDirty() ||

View File

@ -461,7 +461,9 @@ bool Device::createEngine(uint32_t deviceCsrIndex, EngineTypeUsage engineTypeUsa
}
auto &compilerProductHelper = this->getCompilerProductHelper();
bool isHeaplessStateInit = isPrimaryEngine && compilerProductHelper.isHeaplessStateInitEnabled();
auto heaplessEnabled = compilerProductHelper.isHeaplessModeEnabled();
bool isHeaplessStateInit = isPrimaryEngine && compilerProductHelper.isHeaplessStateInitEnabled(heaplessEnabled);
bool initializeDevice = (useContextGroup || isHeaplessStateInit) && !firstSubmissionDone;
if (initializeDevice) {

View File

@ -77,7 +77,7 @@ class CompilerProductHelper {
virtual StackVec<OclCVersion, 5> getDeviceOpenCLCVersions(const HardwareInfo &hwInfo, OclCVersion max) const = 0;
virtual void adjustHwInfoForIgc(HardwareInfo &hwInfo) const = 0;
virtual bool isHeaplessModeEnabled() const = 0;
virtual bool isHeaplessStateInitEnabled() const = 0;
virtual bool isHeaplessStateInitEnabled(bool heaplessModeEnabled) const = 0;
virtual void getKernelFp16AtomicCapabilities(const ReleaseHelper *releaseHelper, uint32_t &fp16Caps) const = 0;
virtual void getKernelFp32AtomicCapabilities(uint32_t &fp32Caps) const = 0;
virtual void getKernelFp64AtomicCapabilities(uint32_t &fp64Caps) const = 0;
@ -124,7 +124,7 @@ class CompilerProductHelperHw : public CompilerProductHelper {
StackVec<OclCVersion, 5> getDeviceOpenCLCVersions(const HardwareInfo &hwInfo, OclCVersion max) const override;
void adjustHwInfoForIgc(HardwareInfo &hwInfo) const override;
bool isHeaplessModeEnabled() const override;
bool isHeaplessStateInitEnabled() const override;
bool isHeaplessStateInitEnabled(bool heaplessModeEnabled) const override;
void getKernelFp16AtomicCapabilities(const ReleaseHelper *releaseHelper, uint32_t &fp16Caps) const override;
void getKernelFp32AtomicCapabilities(uint32_t &fp32Caps) const override;
void getKernelFp64AtomicCapabilities(uint32_t &fp64Caps) const override;

View File

@ -234,7 +234,7 @@ bool CompilerProductHelperHw<gfxProduct>::isHeaplessModeEnabled() const {
}
template <PRODUCT_FAMILY gfxProduct>
bool CompilerProductHelperHw<gfxProduct>::isHeaplessStateInitEnabled() const {
bool CompilerProductHelperHw<gfxProduct>::isHeaplessStateInitEnabled([[maybe_unused]] bool heaplessModeEnabled) const {
return false;
}