mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-20 17:00:59 +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). Related-To: NEO-7196 Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
31154dc20b
commit
fa03aa9a40
@@ -255,14 +255,15 @@ cl_int Program::processProgramInfo(ProgramInfo &src, const ClDevice &clDevice) {
|
||||
|
||||
kernelInfoArray = std::move(src.kernelInfos);
|
||||
auto svmAllocsManager = context ? context->getSVMAllocsManager() : nullptr;
|
||||
if (src.globalConstants.size != 0) {
|
||||
buildInfos[rootDeviceIndex].constantSurface = allocateGlobalsSurface(svmAllocsManager, clDevice.getDevice(), src.globalConstants.size, true, linkerInput, src.globalConstants.initData);
|
||||
auto globalConstDataSize = src.globalConstants.size + src.globalConstants.zeroInitSize;
|
||||
if (globalConstDataSize != 0) {
|
||||
buildInfos[rootDeviceIndex].constantSurface = allocateGlobalsSurface(svmAllocsManager, clDevice.getDevice(), globalConstDataSize, src.globalConstants.zeroInitSize, true, linkerInput, src.globalConstants.initData);
|
||||
}
|
||||
|
||||
buildInfos[rootDeviceIndex].globalVarTotalSize = src.globalVariables.size;
|
||||
|
||||
if (src.globalVariables.size != 0) {
|
||||
buildInfos[rootDeviceIndex].globalSurface = allocateGlobalsSurface(svmAllocsManager, clDevice.getDevice(), src.globalVariables.size, false, linkerInput, src.globalVariables.initData);
|
||||
auto globalVariablesDataSize = src.globalVariables.size + src.globalVariables.zeroInitSize;
|
||||
buildInfos[rootDeviceIndex].globalVarTotalSize = globalVariablesDataSize;
|
||||
if (globalVariablesDataSize != 0) {
|
||||
buildInfos[rootDeviceIndex].globalSurface = allocateGlobalsSurface(svmAllocsManager, clDevice.getDevice(), globalVariablesDataSize, src.globalVariables.zeroInitSize, false, linkerInput, src.globalVariables.initData);
|
||||
if (clDevice.areOcl21FeaturesEnabled() == false) {
|
||||
buildInfos[rootDeviceIndex].globalVarTotalSize = 0u;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user