Open oscarbg opened 5 years ago
SPIRV-Cross as-is does not support the "Kernel" execution mode as it supports various things which are impossible to express in GLSL/HLSL and I think MSL, non-structured control flow (goto) for one. I don't know what the scope of adding this is, and I have no plans to look into it until something materializes.
Any news on this? We are currently looking at producing SPIR-V Kernel
for Intel and were hoping to re-use some of that work by using SPIR-V Cross
to compile to MSL. The idea was mentioned in one of the last presentations https://images.anandtech.com/doci/15746/OpenCL%2030%20Press%20Deck_20.png
Kernel is fundamentally incompatible with high level languages, since it supports unstructured control-flow. A subset of Kernel which uses structured control flow may or may not work, but this is not a priority for me any time soon.
Hi, on this diagram from https://www.khronos.org/spir/, it looks like there's a path from: OpenCL C
-> Clang
-> LLVM
-> SPIR-V LLVM IR Translator
-> SPIR-V Tools
-> SPIRV-Cross
-> Metal Shading Language
.
Is it possible to go from OpenCL to Metal via SPIRV-Cross, or am I misreading the diagram?
SPIRV-Tools is marked with a red arrow to SPIRV-Cross, i.e. Vulkan (shading) model, not Kernel. OpenCL SPIR-V is not supported.
Hi, just seeing IWOCL 2019 keynote presentation slides:(https://www.khronos.org/assets/uploads/developers/library/2019-iwocl/IWOCL%20Keynote%20May19.pdf) https://www.khronos.org/developers/library/2019-iwocl in page 31 we see talks about possible plans for "OpenCL portability initiative on Apple": i.e. a OpenCL->Metal shim as Neil mentions that OpenCL maps to Metal better than to Vulkan (for CL->Vulkan we have clvk in progress) and with Apple deprecated OpenCL support maybe of interest.. for that, the slide mentions "SPIR-V Cross would need to be expanded to handle OpenCL dialect of SPIR-V) so just asking here.. I don't know why he doesn't mention using also clspv project which already maps OpenCL C source to SPIR-V Vulkan dialect.. Maybe because project is not mature enough or because maybe because is not enough as OpenCL 2.1 allows feeding directly SPIR-V OpenCL "binary" kernels for which clspv is of not use.. sorry, just random thoughts.. :-)