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.38.1},
    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

If you're not sure about the file name format, learn more about wheel file names.

slangpy-0.38.1-cp313-cp313-win_amd64.whl (72.3 MB view details)

Uploaded CPython 3.13Windows x86-64

slangpy-0.38.1-cp313-cp313-manylinux_2_34_x86_64.whl (75.8 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

slangpy-0.38.1-cp313-cp313-macosx_15_0_arm64.whl (33.7 MB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

slangpy-0.38.1-cp312-cp312-win_amd64.whl (72.3 MB view details)

Uploaded CPython 3.12Windows x86-64

slangpy-0.38.1-cp312-cp312-manylinux_2_34_x86_64.whl (75.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

slangpy-0.38.1-cp312-cp312-macosx_15_0_arm64.whl (33.7 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

slangpy-0.38.1-cp311-cp311-win_amd64.whl (72.3 MB view details)

Uploaded CPython 3.11Windows x86-64

slangpy-0.38.1-cp311-cp311-manylinux_2_34_x86_64.whl (75.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

slangpy-0.38.1-cp311-cp311-macosx_15_0_arm64.whl (33.7 MB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

slangpy-0.38.1-cp310-cp310-win_amd64.whl (72.3 MB view details)

Uploaded CPython 3.10Windows x86-64

slangpy-0.38.1-cp310-cp310-manylinux_2_34_x86_64.whl (75.7 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

slangpy-0.38.1-cp310-cp310-macosx_15_0_arm64.whl (33.7 MB view details)

Uploaded CPython 3.10macOS 15.0+ ARM64

slangpy-0.38.1-cp39-cp39-win_amd64.whl (72.3 MB view details)

Uploaded CPython 3.9Windows x86-64

slangpy-0.38.1-cp39-cp39-manylinux_2_34_x86_64.whl (75.7 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.34+ x86-64

slangpy-0.38.1-cp39-cp39-macosx_15_0_arm64.whl (33.7 MB view details)

Uploaded CPython 3.9macOS 15.0+ ARM64

File details

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

File metadata

  • Download URL: slangpy-0.38.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 72.3 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for slangpy-0.38.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d5e3dc6e0aee101fc733de02ef911ebe55baadb443a0116eeccf6a189fb7b081
MD5 a28ccb55e6876db7d6cd98e73a8583bb
BLAKE2b-256 84819495e9d01cf3a12bbe1e01fdc2dd23f75a29fe2d511947c8b83e5d29f33e

See more details on using hashes here.

File details

Details for the file slangpy-0.38.1-cp313-cp313-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for slangpy-0.38.1-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 c25ab486185b1d5120118df412bfb7414a4f496b55e2f358d5615fab58533c61
MD5 257f3d23ad32369ab3495bd7dc80faa7
BLAKE2b-256 1441b65023fcb02100c097d0e0de3756da4954e3af1bad696e628d7c022c3f16

See more details on using hashes here.

File details

Details for the file slangpy-0.38.1-cp313-cp313-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for slangpy-0.38.1-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 fd46532c1690b9acd1e2d927f83a3243544083d16557fcf5636cb69fab0d9c29
MD5 b3715921cd424372f9617ad112919de0
BLAKE2b-256 bd1e78fbb8a02d8d04ec3606b34fddf0988d21238b4f936f2e85bc0ba5618107

See more details on using hashes here.

File details

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

File metadata

  • Download URL: slangpy-0.38.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 72.3 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for slangpy-0.38.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 4e9179cb77991989d5017a02c4df5e47aa381a014c0566084e5508af8bd1ba3c
MD5 4b4b687d80351c0cfda449cc784f73c1
BLAKE2b-256 0fe1d4fc989f902de7e6a0c66165520e68a848d23123c35b8aa481b5b60fac13

See more details on using hashes here.

File details

Details for the file slangpy-0.38.1-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for slangpy-0.38.1-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 32ccd0ae141486f398b7286dafe425c954bf3d242f583870c4456a50214be007
MD5 9e844aecd44070d6a614bd3a04a2315b
BLAKE2b-256 11c2ae0f8b01df66190a33b812dbcbfee8984cc55a223a8659abdcbe8889956f

See more details on using hashes here.

File details

Details for the file slangpy-0.38.1-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for slangpy-0.38.1-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 7a8b605e6dae7cf33ddf38762a7420c2fde991232679c8357ae5b4f67bbc1e17
MD5 11e710978be258713b3fae7902eab3ad
BLAKE2b-256 5ba58e4d5ae0014c3e95fb6dc8282f475f683b32b06e5e1e55d52816a6cd0ab8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: slangpy-0.38.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 72.3 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for slangpy-0.38.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 0dbe2e9d6a4fcbe990f0c47ea6f34d6cb9ff75db10fae50a92dec3f4ad875fb7
MD5 159a720e139336700f877aa5b8c2016d
BLAKE2b-256 c22ec8cecd21028327cf07a7ec8e58d362d40fdf629f622d0a8d8422dbbe29e2

See more details on using hashes here.

File details

Details for the file slangpy-0.38.1-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for slangpy-0.38.1-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 d16c2890e93ec4754215e4664cdc740b2af3262e91a1ac36b064d5d648a9d470
MD5 acbadf78db802fe05fbaadeb0ecbd04c
BLAKE2b-256 e9451908da0d5fac7cd47092af9c82280e200231add5399145ef6c17758fcdc6

See more details on using hashes here.

File details

Details for the file slangpy-0.38.1-cp311-cp311-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for slangpy-0.38.1-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 aa6e0bc2e22991cbedae90f8b300bb3015d8b7743ed3396544d13bf3ed0e36ee
MD5 753ea22c28817f382713078db05b3bb7
BLAKE2b-256 1f60bdcb566009d2ba514bbfc4855bd3248cf4021bd6e3bedcfa054b2bda2817

See more details on using hashes here.

File details

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

File metadata

  • Download URL: slangpy-0.38.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 72.3 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for slangpy-0.38.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 6e5c2cce733c0fea6f20052fdc942b0621b5bb146e1ba3f8c29d6cf74406913c
MD5 6962ee2d589cbc12ce23a7c015c221e4
BLAKE2b-256 dbf31a4f2c960bd4435e36b0cfb60faac8b8a23f558542599dbf49845e4a80a5

See more details on using hashes here.

File details

Details for the file slangpy-0.38.1-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for slangpy-0.38.1-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 63792331bcf8f9318e7a0f15f61248e7e45158968fdb1e249a44fb8e822a1a58
MD5 da6006a50f24bf49263e27d605861121
BLAKE2b-256 d520953e673314db9d5d3d0e5bd47ada7c2a0bad6640d7bf711f1622baac1024

See more details on using hashes here.

File details

Details for the file slangpy-0.38.1-cp310-cp310-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for slangpy-0.38.1-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 dd54b7ee03994f038a8decdf513fac3d43dff033c401099fa4773a293cdf42af
MD5 f61f3fbf71ccd9d289a4461e55b4c464
BLAKE2b-256 73708fd29acc1e266b4cfef02f4d9620fcb597f49e623b2929a6672921cd6888

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for slangpy-0.38.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 e9b80898c0d7bd6c2594de9eeaa9ae46fde3542249a24fc46a2df38756660f1d
MD5 e0fc4e884c2a0e202d32f618914847d3
BLAKE2b-256 97524b9e7d0a73945226dabda1f0c8cd83f97d9e133138b1c00bfaa031145f69

See more details on using hashes here.

File details

Details for the file slangpy-0.38.1-cp39-cp39-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for slangpy-0.38.1-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 efd135e21032e2cdf3e1b7d717604c3c17587bd3a7278318d2c82f63707043b0
MD5 64003b44f1d6305ed138d56f7d3c07da
BLAKE2b-256 6c7856e3fee93953c08cfa98ba8e8b405db3f07c095144951041d6c1e9cf13d6

See more details on using hashes here.

File details

Details for the file slangpy-0.38.1-cp39-cp39-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for slangpy-0.38.1-cp39-cp39-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 599ad935ab61dd6c415faed41627d1fbfd4f7d8f4ffccf0021ff2eba86741388
MD5 78ea0b353b8be20d3225a717df21bc6c
BLAKE2b-256 062ec25be315b843372bca7076824775f4c0b4c11cbeb739b901963ea8e4cd87

See more details on using hashes here.

Supported by

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