Intel software engineers have been working on allowing OpenMP offloading to their Intel GPUs by way of targeting generic SPIR-V, the common intermediate representation used across Vulkan / OpenGL / OpenCL drivers. The initial patches to that work have now landed in upstream LLVM/Clang 20 for OpenMP offloading to SPIR-V.
The past few weeks the initial Clang driver bits have been under review for allowing OpenMP offloading to generic SPIR-V going through the liboffload library. With Intel engineers working on it, the first intended target is Intel GPUs. But with SPIR-V working across OpenGL / OpenCL / Vulkan drivers and being ingested by them, it’s possible that this code will end up benefiting other GPU drivers/hardware without too much additional work assuming there isn’t any Intel-specific operations being added to the SPIR-V code.
Intel engineer Nick Sarnie explained in the LLVM pull request:
“This is the first of a series of patches to add support for OpenMP offloading to SPIR-V through liboffload with the first intended target being Intel GPUs. This patch implements the basic driver and clang-linker-wrapper work for JIT mode. There are still many missing pieces, so this is not yet usable.
We introduce spirv64-intel-unknown as the only currently supported triple. The user-facing argument to enable offloading will be -fopenmp -fopenmp-targets=spirv64-intel
Add a new SPIRVOpenMPToolChain toolchain based on the existing general SPIR-V toolchain which will call all the required SPIR-V tools (and eventually the SPIR-V backend) as well as add the corresponding device RTL as an argument to the linker.
We can’t get through the front end consistently yet, so it’s difficult to add any LIT tests that execute any tools, but front end changes are planned very shortly, and then we can add those tests.”
Hopefully the rest of the Intel code for OpenMP to SPIR-V offloading will make it into upstream LLVM soon… Ideally in time for the LLVM/Clang 20 release this spring.