Re:The Slang Shading Language
by jacobgorm on Sunday December 01, 2024 @06:04AM
(#42287712)
Will Slang support compute shaders too, or is it just for graphics.
[ Parent
| on HN ]
It's compute also, though that may depend on the target language.
It does!
Both platform-specific compute shaders as well as cross-compilation to CUDA. The authors even provide some basic PyTorch bindings to help use existing shader code for gradient computation and backpropagation in ML and differentiable programming of graphics-adjacent tasks: https://github.com/shader-slang/slang-torch
(Disclaimer: this is the work of my colleagues, and I helped test-drive differentiable Slang and wrote one of the example applications/use-cases)