From fe6cec4380ed08cd6701974c8707a5199b5da05b Mon Sep 17 00:00:00 2001 From: "Larsen, Steffen" Date: Wed, 15 Jun 2022 07:08:25 -0700 Subject: [PATCH] [SYCL] Add support for ZEBIN format in persistent cache Following the changes in https://github.com/intel/llvm/pull/6256 this commit allows executable device binaries with ZEBIN format to be cached persistently. Signed-off-by: Larsen, Steffen --- sycl/source/detail/pi.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sycl/source/detail/pi.cpp b/sycl/source/detail/pi.cpp index 7d212ca2282ed..7203937bfc3f4 100644 --- a/sycl/source/detail/pi.cpp +++ b/sycl/source/detail/pi.cpp @@ -725,7 +725,8 @@ RT::PiDeviceBinaryType getBinaryImageFormat(const unsigned char *ImgData, struct { RT::PiDeviceBinaryType Fmt; const uint16_t Magic; - } ELFFmts[] = {{PI_DEVICE_BINARY_TYPE_NATIVE, 0xFF04}}; // OpenCL executable + } ELFFmts[] = {{PI_DEVICE_BINARY_TYPE_NATIVE, 0xFF04}, // OpenCL executable + {PI_DEVICE_BINARY_TYPE_NATIVE, 0xFF12}}; // ZEBIN executable // ELF files need to be parsed separately. The header type ends after 18 // bytes.