Keenuts wrote: > > SPIR-V modules targeting Kernel/OpenCL can have arbitrary control flows, > > and generic pointers. > > This sounds more like a top level target difference. As for naming, would > kernel be more appropriate than OpenCL?
- SPIR-V spec: OpCapability Shader requires structured CFG - Vulkan spec: Shader capability is allowed, Kernel is not. So VK requires Shader, Shader requires Logical & structured CFG - BUT: VK forbids static recursion while SPIR-V spec makes no mention of it. So at least for this part, Vulkan is not strictly equivalent to Shader. - SPIR-V spec: Kernel means unstructured CFG, but requires unsigned integers. - OpenCL spec: execution must be Kernel So OpenCL requires Kernel, Kernel allows unstructured CFG and requires unsigned int. - SPIR-V spec doesn't tie Kernel to a specific addressing model - BUT: OpenCL validation rules require Physical32 or Physical64 So it seems similarly to Vulkan, OpenCL != Kernel. Given OpenCL implies Kernel, and Vulkan implies Shader, it seems to me we should be exposing OpenCL and Vulkan in the triple, but not necessarily Kernel/Shader as those are incomplete to generate usable SPIR-V module (even if valid in the SPIR-V spec world) https://github.com/llvm/llvm-project/pull/170297 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
