mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-06 10:26:29 +08:00
remove kernelHeader from HeapInfo
Change-Id: Ic2d441df15a7f75b5f3ef41d484969148e59715f
This commit is contained in:
committed by
Chmielewski, Krystian
parent
515b3787f5
commit
3e8f05d702
@@ -97,7 +97,7 @@ void KernelImmutableData::initialize(NEO::KernelInfo *kernelInfo, NEO::MemoryMan
|
||||
UNRECOVERABLE_IF(kernelInfo == nullptr);
|
||||
this->kernelDescriptor = &kernelInfo->kernelDescriptor;
|
||||
|
||||
auto kernelIsaSize = kernelInfo->heapInfo.pKernelHeader->KernelHeapSize;
|
||||
auto kernelIsaSize = kernelInfo->heapInfo.KernelHeapSize;
|
||||
|
||||
auto allocation = memoryManager.allocateGraphicsMemoryWithProperties(
|
||||
{device->getRootDeviceIndex(), kernelIsaSize, NEO::GraphicsAllocation::AllocationType::KERNEL_ISA});
|
||||
@@ -126,16 +126,16 @@ void KernelImmutableData::initialize(NEO::KernelInfo *kernelInfo, NEO::MemoryMan
|
||||
kernelDescriptor->payloadMappings.implicitArgs.simdSize, kernelDescriptor->kernelAttributes.simdSize);
|
||||
}
|
||||
|
||||
if (kernelInfo->heapInfo.pKernelHeader->SurfaceStateHeapSize != 0) {
|
||||
this->surfaceStateHeapSize = kernelInfo->heapInfo.pKernelHeader->SurfaceStateHeapSize;
|
||||
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.pKernelHeader->DynamicStateHeapSize != 0) {
|
||||
this->dynamicStateHeapSize = kernelInfo->heapInfo.pKernelHeader->DynamicStateHeapSize;
|
||||
if (kernelInfo->heapInfo.DynamicStateHeapSize != 0) {
|
||||
this->dynamicStateHeapSize = kernelInfo->heapInfo.DynamicStateHeapSize;
|
||||
dynamicStateHeapTemplate.reset(new uint8_t[dynamicStateHeapSize]);
|
||||
|
||||
memcpy_s(dynamicStateHeapTemplate.get(), dynamicStateHeapSize,
|
||||
|
||||
@@ -319,7 +319,7 @@ bool ModuleImp::initialize(const ze_module_desc_t *desc, NEO::Device *neoDevice)
|
||||
device->getSourceLevelDebugger()->notifyKernelDebugData(kernelInfo->kernelDescriptor.external.debugData.get(),
|
||||
kernelInfo->kernelDescriptor.kernelMetadata.kernelName,
|
||||
kernelInfo->heapInfo.pKernelHeap,
|
||||
kernelInfo->heapInfo.pKernelHeader->KernelHeapSize);
|
||||
kernelInfo->heapInfo.KernelHeapSize);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -437,8 +437,8 @@ bool ModuleImp::linkBinary() {
|
||||
for (const auto &kernelInfo : this->translationUnit->programInfo.kernelInfos) {
|
||||
auto &kernHeapInfo = kernelInfo->heapInfo;
|
||||
const char *originalIsa = reinterpret_cast<const char *>(kernHeapInfo.pKernelHeap);
|
||||
patchedIsaTempStorage.push_back(std::vector<char>(originalIsa, originalIsa + kernHeapInfo.pKernelHeader->KernelHeapSize));
|
||||
isaSegmentsForPatching.push_back(Linker::PatchableSegment{patchedIsaTempStorage.rbegin()->data(), kernHeapInfo.pKernelHeader->KernelHeapSize});
|
||||
patchedIsaTempStorage.push_back(std::vector<char>(originalIsa, originalIsa + kernHeapInfo.KernelHeapSize));
|
||||
isaSegmentsForPatching.push_back(Linker::PatchableSegment{patchedIsaTempStorage.rbegin()->data(), kernHeapInfo.KernelHeapSize});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user