3 ms·
Does this mean I can write shaders in Rust for use with WGPU or Vulkan?
by salsa_catsup 2mo ago
Does this mean I can write shaders in Rust for use with WGPU or Vulkan?
- ivanjermakov 2mo agoWGPU/Vulkan don't work with PTX shaders by default, additional translation would be needed. On a side note, Vulkan has extension to launch CUDA kernels: https://docs.vulkan.org/refpages/latest/refpages/source/VK_NV_cuda_kernel_launch.html https://docs.vulkan.org/refpages/latest/refpages/source/VK_N...
- berkes 2mo agoThe way I understood it, rust would become an option next to Vulkan, WGPU (and opengl etc?). But only for compute tasks. So, practically an alternative language to write compute shaders in.
- PudgePacket 2mo agoYou have been able to for a while with rust-gpu https://github.com/Rust-GPU/rust-gpu https://github.com/Rust-GPU/rust-gpu.
- laggui 2mo agoFor compute shaders, you can already do this with CubeCL: https://github.com/tracel-ai/cubecl https://github.com/tracel-ai/cubecl You write kernels in a Rust DSL using #[cube], it supports WebGPU through WGSL and Vulkan through SPIR-V, along with CUDA, AMD via ROCm, and Metal. (disclosure: I am a contributor)