mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-13 18:23:03 +08:00
feat(zebin): Add support for ELF section type SHT_NOBITS
This commit adds support for parsing SHT_NOBITS zebin's ELF sections (containing global/constant zero-initialized data). - Correction: in CTNI path, do not add related symbol if surface has not been allocated. Related-To: NEO-7196 Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
c0664896ad
commit
7790e208fd
@@ -382,12 +382,16 @@ ze_result_t ModuleTranslationUnit::processUnpackedBinary() {
|
||||
}
|
||||
|
||||
auto svmAllocsManager = device->getDriverHandle()->getSvmAllocsManager();
|
||||
if (programInfo.globalConstants.size != 0) {
|
||||
this->globalConstBuffer = NEO::allocateGlobalsSurface(svmAllocsManager, *device->getNEODevice(), programInfo.globalConstants.size, true, programInfo.linkerInput.get(), programInfo.globalConstants.initData);
|
||||
auto globalConstDataSize = programInfo.globalConstants.size + programInfo.globalConstants.zeroInitSize;
|
||||
if (globalConstDataSize != 0) {
|
||||
this->globalConstBuffer = NEO::allocateGlobalsSurface(svmAllocsManager, *device->getNEODevice(), globalConstDataSize,
|
||||
programInfo.globalConstants.zeroInitSize, true, programInfo.linkerInput.get(), programInfo.globalConstants.initData);
|
||||
}
|
||||
|
||||
if (programInfo.globalVariables.size != 0) {
|
||||
this->globalVarBuffer = NEO::allocateGlobalsSurface(svmAllocsManager, *device->getNEODevice(), programInfo.globalVariables.size, false, programInfo.linkerInput.get(), programInfo.globalVariables.initData);
|
||||
auto globalVariablesDataSize = programInfo.globalVariables.size + programInfo.globalVariables.zeroInitSize;
|
||||
if (globalVariablesDataSize != 0) {
|
||||
this->globalVarBuffer = NEO::allocateGlobalsSurface(svmAllocsManager, *device->getNEODevice(), globalVariablesDataSize,
|
||||
programInfo.globalVariables.zeroInitSize, false, programInfo.linkerInput.get(), programInfo.globalVariables.initData);
|
||||
}
|
||||
|
||||
for (auto &kernelInfo : this->programInfo.kernelInfos) {
|
||||
|
||||
Reference in New Issue
Block a user