jgbit / vuda

VUDA is a header-only library based on Vulkan that provides a CUDA Runtime API interface for writing GPU-accelerated applications.
MIT License
867 stars 35 forks source link

CUDA C kernels directly to SPIR-V #25

Open klwin523 opened 2 years ago

klwin523 commented 2 years ago

The notes say: VUDA does not provide any support for compiling CUDA C kernels directly to SPIR-V (yet) Is there a roadmap or technical approach you're planning to support that? Maybe we can help implement that based on what you already have in mind.

jgbit commented 2 years ago

Hi and thanks for posting.

The notes are referring to the general state of existing compilers, e.g. GLSL to SPIR-V, HLSL to SPIR-V, and prototypes for Rust to SPIR-V or OpenCL C to SPIR-V.

That said, it would of course be very useful and beneficial to have support for something like that. However, it is somewhat of an undertaking to develop and support a full CUDA C to SPIR-V compiler (not to mention CUDA C++).

From VUDA's point of view, only some very preliminary development has been done - building on LLVM, and I greatly encourage anyone to put work into such a project.

ib00 commented 1 year ago

There's a project that does something similar: https://github.com/seanbaxter/shaders