Skip to main content

Easily call Slang functions and integrate with PyTorch auto diff directly from Python.

Project description

docs ci pypi

SlangPy

Introduction

SlangPy is a cross-platform library designed to make calling GPU code written in Slang extremely simple and easy. It's 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

Documentation

See the documentation for more detailed information and examples.

More information about Slang in general can be found here.

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 .

License

SlangPy source code is licensed under the Apache-2.0 License - see the LICENSE.txt file for details.

SlangPy depends on the following third-party libraries, which have their own license:

SlangPy releases additionally include pre-built binaries of the following third-party components, which have their own license:

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.25.0},
    year = 2025
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

slangpy-0.25.0-cp313-cp313-win_amd64.whl (59.8 MB view details)

Uploaded CPython 3.13 Windows x86-64

slangpy-0.25.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (18.4 MB view details)

Uploaded CPython 3.13 manylinux: glibc 2.27+ x86-64 manylinux: glibc 2.28+ x86-64

slangpy-0.25.0-cp312-cp312-win_amd64.whl (59.8 MB view details)

Uploaded CPython 3.12 Windows x86-64

slangpy-0.25.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (18.4 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.27+ x86-64 manylinux: glibc 2.28+ x86-64

slangpy-0.25.0-cp311-cp311-win_amd64.whl (59.8 MB view details)

Uploaded CPython 3.11 Windows x86-64

slangpy-0.25.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (18.4 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.27+ x86-64 manylinux: glibc 2.28+ x86-64

slangpy-0.25.0-cp310-cp310-win_amd64.whl (59.8 MB view details)

Uploaded CPython 3.10 Windows x86-64

slangpy-0.25.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (18.4 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.27+ x86-64 manylinux: glibc 2.28+ x86-64

slangpy-0.25.0-cp39-cp39-win_amd64.whl (59.8 MB view details)

Uploaded CPython 3.9 Windows x86-64

slangpy-0.25.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (18.4 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.27+ x86-64 manylinux: glibc 2.28+ x86-64

File details

Details for the file slangpy-0.25.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for slangpy-0.25.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 cd901b9905ba61d34ac2dd90613491f8b3b63f6ffdac8fdb7ee02af54f01d9f8
MD5 6771a770a01571e5fd5124816bca3592
BLAKE2b-256 925cb8fe7d4d99f59f9f3b8d01ecf3383cbbf49d022c5a3904550ff62c0606a0

See more details on using hashes here.

File details

Details for the file slangpy-0.25.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for slangpy-0.25.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a7daf152bb32ca7160255516374b04471c89fc50a6a3c42b72460b8a4baa8a2e
MD5 acf916141c2005fefe45f1069bc13f05
BLAKE2b-256 fef826f6365eca588a6d932627f1914ce9b6c8ecbcc90a88dafb76e2aee1fa96

See more details on using hashes here.

File details

Details for the file slangpy-0.25.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for slangpy-0.25.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 cd6e340bcfd9d9139e26be0128910ac3310b39aaba5379eeda29247b11e775c8
MD5 c864b2e3cdad2c06e4612087c4624bcc
BLAKE2b-256 8d44ce6e68ea5b61960888489a6c1dac485aabf2b209837f47e3db7b4a5b0e98

See more details on using hashes here.

File details

Details for the file slangpy-0.25.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for slangpy-0.25.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5426c8e417061ebad8cd6c61d8f303bba57d4527f0540955ea1ccedea3d074fc
MD5 7f74c2d88a33f49c615c097487d1ed2a
BLAKE2b-256 e3c0858ce5b44f3f45bd2a503dddd2f9b802024d29f57f7e09362387d6aacecf

See more details on using hashes here.

File details

Details for the file slangpy-0.25.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for slangpy-0.25.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e1b150b9fdd0c3c62998e0c645f9c0a056b7fd949580388ae2e8076c2d488769
MD5 a50ba7b0e1388e9503484f1353a6818b
BLAKE2b-256 6a63ba914571efa4362c3fbbbb5a8c97807a313850cad469387df7da08ea954e

See more details on using hashes here.

File details

Details for the file slangpy-0.25.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for slangpy-0.25.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 399b4732131ff6791e751a3aced04d50a49f3514cecbe47f0ea3013256d5c07e
MD5 433914120beadd3d90813d2b956d0f64
BLAKE2b-256 b39221386dbfb40550803e2146e9016a8dab2c2c38ceb9165cf986d39e466692

See more details on using hashes here.

File details

Details for the file slangpy-0.25.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for slangpy-0.25.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b0c484eaa4b0b64c33bf7c18ce3562b4e55f8d126f23904311c13f3634dbc6e7
MD5 794576ad649c77b507591ea967535696
BLAKE2b-256 c8c680d0a07e9ac6cb2097895dc2890e23bfe8bb2c2a269db85452879edcdf5c

See more details on using hashes here.

File details

Details for the file slangpy-0.25.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for slangpy-0.25.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6d56d9383889bed1f180d57635fa89103110ccc66f253adb7909c816101fa708
MD5 9329052dcd94ef92e38bdbc7aee74688
BLAKE2b-256 eee1f3d56f522f7e9acfdb65bee9d39c51762363218bc70a0d30c9c189d7c727

See more details on using hashes here.

File details

Details for the file slangpy-0.25.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: slangpy-0.25.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 59.8 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.22

File hashes

Hashes for slangpy-0.25.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 082eb8777ae31a387a2c8d6e00f465d011e0fa4c1c6d68a297d47b0abc5a91f2
MD5 dd07aed684bb2ad11d8f0dc6d3f97691
BLAKE2b-256 94519b0e59599847eaa07839faab4c5fd12a103daba32b4f3fac5c158bc37f5a

See more details on using hashes here.

File details

Details for the file slangpy-0.25.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for slangpy-0.25.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ee7215b759c58fcd962781720a744a9b11847eebac704f30aab46193bda15d68
MD5 19c22df59d5295561c7790de61622173
BLAKE2b-256 febe9d67ba3fb1bd68e8ff7b6a2c0e0793d8ffd29a5a9a980e634b0b45e85a6f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page