feature: add debug key to generate sip header file

- header file can be used with LoadBinarySipFromFile

Related-To: GSD-8253

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2024-03-06 12:30:11 +00:00
committed by Compute-Runtime-Automation
parent f71f6d2b72
commit cb7ac1ada0
4 changed files with 21 additions and 0 deletions

View File

@@ -9,6 +9,7 @@
#include "shared/source/built_ins/sip.h"
#include "shared/source/compiler_interface/compiler_interface.h"
#include "shared/source/debug_settings/debug_settings_manager.h"
#include "shared/source/device/device.h"
#include "shared/source/execution_environment/execution_environment.h"
#include "shared/source/execution_environment/root_device_environment.h"
@@ -45,6 +46,11 @@ const SipKernel &BuiltIns::getSipKernel(SipKernelType type, Device &device) {
UNRECOVERABLE_IF(ret != TranslationOutput::ErrorCode::success);
UNRECOVERABLE_IF(sipBinary.size() == 0);
if (NEO::debugManager.flags.DumpSipHeaderFile.get() != "unk") {
std::string name = NEO::debugManager.flags.DumpSipHeaderFile.get() + "_header.bin";
writeDataToFile(name.c_str(), stateSaveAreaHeader.data(), stateSaveAreaHeader.size());
}
const auto allocType = AllocationType::kernelIsaInternal;
AllocationProperties properties = {device.getRootDeviceIndex(), sipBinary.size(), allocType, device.getDeviceBitfield()};