WGPU/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: <a href="https://docs.vulkan.org/refpages/latest/refpages/source/VK_NV_cuda_kernel_launch.html" rel="nofollow">https://docs.vulkan.org/refpages/latest/refpages/source/VK_N...
You have been able to for a while with rust-gpu <a href="https://github.com/Rust-GPU/rust-gpu" rel="nofollow">https://github.com/Rust-GPU/rust-gpu.
For compute shaders, you can already do this with CubeCL: <a href="https://github.com/tracel-ai/cubecl" rel="nofollow">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)
salsa_catsup · · focus · HN ↗
ivanjermakov · · focus · HN ↗
On a side note, Vulkan has extension to launch CUDA kernels: <a href="https://docs.vulkan.org/refpages/latest/refpages/source/VK_NV_cuda_kernel_launch.html" rel="nofollow">https://docs.vulkan.org/refpages/latest/refpages/source/VK_N...
berkes · · focus · HN ↗
But only for compute tasks. So, practically an alternative language to write compute shaders in.
PudgePacket · · focus · HN ↗
laggui · · focus · HN ↗
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)