How to emit SPIRV and how to emit LLVM? #5608
-
--emit-llvm doesn't work in dcpp. Don't understand why. Also, how do I emit the SPIRV module to file instead of linking it to the .o? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Hi, I usually use: I'm unsure, if and |
Beta Was this translation helpful? Give feedback.
-
When I invoke clang++ directly I get "kernel name is missing" errors. When I use dpcpp with these commands, it does generate a .spv, but it's broken:
This is the mandelbrot test that ships with oneAPI. llvm-spirv --to-text does produce a form of disassembly, but I'm hoping to use the regular SPIRV-Tools with this. |
Beta Was this translation helpful? Give feedback.
-
I see. dpcpp binary includes several extensions. Addition of
KhronosGroup/SPIRV-Headers#176 and KhronosGroup/SPIRV-Headers#177 are addressing this problem, when they merged - this capability will become known for SPIR-V tools. |
Beta Was this translation helpful? Give feedback.
Hi, I usually use:
clang++ -fsycl -fsycl-device-only test.cpp
- to emit .bc fileand
clang++ -fsycl -fsycl-device-only -fno-sycl-use-bitcode test.cpp
to emit .spv fileI'm unsure, if
-fno-sycl-use-bitcode
option works with dpcpp, so in this case I would suggest:dpcpp -fsycl-device-only test.cpp
- this alone will emit .bc filellvm-spirv --spirv-ext=+all test.bc
- this will translate it to .spv fileand
llvm-dis
/llvm-spirv --to-text
are used to emit test formats for IR and SPV