Getting Started

Installation

SlangPy is available as pre-compiled wheels via PyPi. Installing SlangPy is as simple as running:

pip install slangpy

To enable PyTorch integration, simply pip install pytorch as usual and it will be detected automatically by SlangPy.

You can also compile SlangPy from source:

git clone https://github.com/shader-slang/slangpy.git --recursive
cd slangpy
pip install -r requirements-dev.txt
pip install .

See developer guide for more detailed information on how to compile from source.

Requirements

  • python >= 3.9

Citation

If you use SlangPy in a research project leading to a publication, please cite the project. The BibTex entry is:

@software{slangpy,
    title = {SlangPy},
    author = {Simon Kallweit and Chris Cummings and Benedikt Bitterli and Sai Bangaru and Yong He},
    note = {https://github.com/shader-slang/slangpy},
    version = {0.27.0},
    year = 2025
}