SlangPy¶
SlangPy is a library designed to make calling GPU code written in Slang extremely simple and easy. Its core objectives are to:
Make it quick and simple to call Slang functions on the GPU from Python
Eradicate the boilerplate and bugs associated with writing compute kernels
Grant easy access to Slang’s auto-diff features
Provide optional PyTorch support out of the box
It is built upon 2 core technologies:
Slang shading language: A modern, platform agnostic shading language with full auto-diff support.
Slang graphics library (SGL): A powerful Python extension providing a thin wrapper around the graphics layer.
By bringing these 2 technologies together with a simple and flexible Python library, calling GPU code from Python is as simple and easy as calling a function.
Community¶
We actively encourage and maintain a community of users and developers, so if you have any questions, suggestions or want to participate, please join our Discord server.
Getting Started¶
SlangPy can be installed from pip using:
pip install slangpy
Or for more information on building from source, see the installation section.
A full set of examples can be found in the * examples directory in the SlangPy repo. Each example is also covered by an article in these docs, so we recommend downloading the lot and then working them, starting with the intros in the basics section.