fix: dump zebin when building program

- when unpackSingleDeviceBinary is not called zebin should be dumped
if debug key is set

Related-To: NEO-14153

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2025-04-04 12:38:08 +00:00
committed by Compute-Runtime-Automation
parent 58fe89e116
commit cc308719d8
2 changed files with 26 additions and 0 deletions

View File

@@ -15,6 +15,7 @@
#include "shared/source/helpers/aligned_memory.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/debug_helpers.h"
#include "shared/source/helpers/file_io.h"
#include "shared/source/helpers/hw_info.h"
#include "shared/source/helpers/ptr_math.h"
#include "shared/source/helpers/string.h"
@@ -204,6 +205,10 @@ cl_int Program::processGenBinary(const ClDevice &clDevice) {
} else {
return CL_INVALID_BINARY;
}
} else {
if (NEO::debugManager.flags.DumpZEBin.get() == 1 && isDeviceBinaryFormat<DeviceBinaryFormat::zebin>(ArrayRef<const uint8_t>(reinterpret_cast<const uint8_t *>(this->buildInfos[rootDeviceIndex].unpackedDeviceBinary.get()), this->buildInfos[rootDeviceIndex].unpackedDeviceBinarySize))) {
dumpFileIncrement(this->buildInfos[rootDeviceIndex].unpackedDeviceBinary.get(), this->buildInfos[rootDeviceIndex].unpackedDeviceBinarySize, "dumped_zebin_module", ".elf");
}
}
cleanCurrentKernelInfo(rootDeviceIndex);