mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
fix: correctly set unpacked device binary prior decoding
- add parsing Intel GT notes from elf when unpacking binary - set indirectAccessBufferMajorVersion with correct value Related-To: NEO-15211, IGC-12385 Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
4debbdea36
commit
f7188038b4
@@ -227,15 +227,19 @@ cl_int Program::processGenBinary(const ClDevice &clDevice) {
|
||||
}
|
||||
|
||||
if (!decodedSingleDeviceBinary.isSet) {
|
||||
decodedSingleDeviceBinary.programInfo = {};
|
||||
|
||||
auto blob = ArrayRef<const uint8_t>(reinterpret_cast<const uint8_t *>(buildInfo.unpackedDeviceBinary.get()), buildInfo.unpackedDeviceBinarySize);
|
||||
SingleDeviceBinary binary = {};
|
||||
binary.deviceBinary = blob;
|
||||
binary.targetDevice = NEO::getTargetDevice(clDevice.getRootDeviceEnvironment());
|
||||
SingleDeviceBinary singleDeviceBinary = {};
|
||||
decodedSingleDeviceBinary.programInfo = {};
|
||||
|
||||
singleDeviceBinary.deviceBinary = blob;
|
||||
singleDeviceBinary.targetDevice = NEO::getTargetDevice(clDevice.getRootDeviceEnvironment());
|
||||
singleDeviceBinary.generatorFeatureVersions.indirectMemoryAccessDetection = this->indirectDetectionVersion;
|
||||
singleDeviceBinary.generatorFeatureVersions.indirectAccessBuffer = this->indirectAccessBufferMajorVersion;
|
||||
singleDeviceBinary.generator = this->isGeneratedByIgc ? GeneratorType::igc : GeneratorType::unknown;
|
||||
|
||||
auto &gfxCoreHelper = clDevice.getGfxCoreHelper();
|
||||
std::tie(decodedSingleDeviceBinary.decodeError, std::ignore) = NEO::decodeSingleDeviceBinary(decodedSingleDeviceBinary.programInfo, binary, decodedSingleDeviceBinary.decodeErrors, decodedSingleDeviceBinary.decodeWarnings, gfxCoreHelper);
|
||||
std::tie(decodedSingleDeviceBinary.decodeError, std::ignore) = NEO::decodeSingleDeviceBinary(decodedSingleDeviceBinary.programInfo, singleDeviceBinary, decodedSingleDeviceBinary.decodeErrors, decodedSingleDeviceBinary.decodeWarnings, gfxCoreHelper);
|
||||
} else {
|
||||
decodedSingleDeviceBinary.isSet = false;
|
||||
}
|
||||
|
||||
@@ -217,7 +217,7 @@ cl_int Program::createProgramFromBinary(
|
||||
|
||||
this->isGeneratedByIgc = singleDeviceBinary.generator == GeneratorType::igc;
|
||||
this->indirectDetectionVersion = singleDeviceBinary.generatorFeatureVersions.indirectMemoryAccessDetection;
|
||||
this->indirectAccessBufferMajorVersion = singleDeviceBinary.generatorFeatureVersions.indirectMemoryAccessDetection;
|
||||
this->indirectAccessBufferMajorVersion = singleDeviceBinary.generatorFeatureVersions.indirectAccessBuffer;
|
||||
|
||||
bool rebuild = AddressingModeHelper::containsBindlessKernel(decodedSingleDeviceBinary.programInfo.kernelInfos);
|
||||
rebuild |= !clDevice.getDevice().getExecutionEnvironment()->isOneApiPvcWaEnv();
|
||||
|
||||
Reference in New Issue
Block a user