refactor: Enable CSR heap sharing on Older Gen platforms

Related-To: LOCI-4312
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
This commit is contained in:
Jitendra Sharma
2023-07-17 10:00:40 +00:00
committed by Compute-Runtime-Automation
parent 3637f519c3
commit 160daeb874
6 changed files with 15 additions and 14 deletions

View File

@@ -11,7 +11,7 @@ namespace L0 {
template <typename Family>
bool L0GfxCoreHelperHw<Family>::platformSupportsCmdListHeapSharing() const {
return false;
return true;
}
template <typename Family>

View File

@@ -113,13 +113,7 @@ ze_result_t KernelImmutableData::initialize(NEO::KernelInfo *kernelInfo, Device
kernelDescriptor->payloadMappings.implicitArgs.simdSize, kernelDescriptor->kernelAttributes.simdSize);
}
if (kernelInfo->heapInfo.surfaceStateHeapSize != 0) {
this->surfaceStateHeapSize = kernelInfo->heapInfo.surfaceStateHeapSize;
surfaceStateHeapTemplate.reset(new uint8_t[surfaceStateHeapSize]);
memcpy_s(surfaceStateHeapTemplate.get(), surfaceStateHeapSize,
kernelInfo->heapInfo.pSsh, surfaceStateHeapSize);
} else if (NEO::KernelDescriptor::isBindlessAddressingKernel(kernelInfo->kernelDescriptor)) {
if (NEO::KernelDescriptor::isBindlessAddressingKernel(kernelInfo->kernelDescriptor)) {
auto &gfxCoreHelper = deviceImp->getNEODevice()->getGfxCoreHelper();
auto surfaceStateSize = static_cast<uint32_t>(gfxCoreHelper.getRenderSurfaceStateSize());
@@ -127,6 +121,12 @@ ze_result_t KernelImmutableData::initialize(NEO::KernelInfo *kernelInfo, Device
UNRECOVERABLE_IF(kernelInfo->kernelDescriptor.kernelAttributes.numArgsStateful != kernelInfo->kernelDescriptor.getBindlessOffsetToSurfaceState().size());
surfaceStateHeapTemplate.reset(new uint8_t[surfaceStateHeapSize]);
} else if (kernelInfo->heapInfo.surfaceStateHeapSize != 0) {
this->surfaceStateHeapSize = kernelInfo->heapInfo.surfaceStateHeapSize;
surfaceStateHeapTemplate.reset(new uint8_t[surfaceStateHeapSize]);
memcpy_s(surfaceStateHeapTemplate.get(), surfaceStateHeapSize,
kernelInfo->heapInfo.pSsh, surfaceStateHeapSize);
}
if (kernelInfo->heapInfo.dynamicStateHeapSize != 0) {