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.42.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

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

slangpy-0.42.0-cp313-cp313-win_amd64.whl (78.3 MB view details)

Uploaded CPython 3.13Windows x86-64

slangpy-0.42.0-cp313-cp313-manylinux_2_34_x86_64.whl (83.7 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

slangpy-0.42.0-cp313-cp313-manylinux_2_34_aarch64.whl (82.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ ARM64

slangpy-0.42.0-cp313-cp313-macosx_15_0_arm64.whl (37.7 MB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

slangpy-0.42.0-cp312-cp312-win_amd64.whl (78.3 MB view details)

Uploaded CPython 3.12Windows x86-64

slangpy-0.42.0-cp312-cp312-manylinux_2_34_x86_64.whl (83.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

slangpy-0.42.0-cp312-cp312-manylinux_2_34_aarch64.whl (82.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ ARM64

slangpy-0.42.0-cp312-cp312-macosx_15_0_arm64.whl (37.7 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

slangpy-0.42.0-cp311-cp311-win_amd64.whl (78.3 MB view details)

Uploaded CPython 3.11Windows x86-64

slangpy-0.42.0-cp311-cp311-manylinux_2_34_x86_64.whl (83.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

slangpy-0.42.0-cp311-cp311-manylinux_2_34_aarch64.whl (82.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ ARM64

slangpy-0.42.0-cp311-cp311-macosx_15_0_arm64.whl (37.7 MB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

slangpy-0.42.0-cp310-cp310-win_amd64.whl (78.3 MB view details)

Uploaded CPython 3.10Windows x86-64

slangpy-0.42.0-cp310-cp310-manylinux_2_34_x86_64.whl (83.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

slangpy-0.42.0-cp310-cp310-manylinux_2_34_aarch64.whl (82.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ ARM64

slangpy-0.42.0-cp310-cp310-macosx_15_0_arm64.whl (37.7 MB view details)

Uploaded CPython 3.10macOS 15.0+ ARM64

slangpy-0.42.0-cp39-cp39-win_amd64.whl (78.3 MB view details)

Uploaded CPython 3.9Windows x86-64

slangpy-0.42.0-cp39-cp39-manylinux_2_34_x86_64.whl (83.6 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.34+ x86-64

slangpy-0.42.0-cp39-cp39-manylinux_2_34_aarch64.whl (82.0 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.34+ ARM64

slangpy-0.42.0-cp39-cp39-macosx_15_0_arm64.whl (37.7 MB view details)

Uploaded CPython 3.9macOS 15.0+ ARM64

File details

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

File metadata

  • Download URL: slangpy-0.42.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 78.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.42.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 dd0a32184bce8a8c507adbfedf5b49694f55543223c019a3c540ffe4a7df1730
MD5 46a15317582a877c8e194c29e160dfec
BLAKE2b-256 839ee57c578d8a576ddfea74f2f11d561d2ceca6b4fd92fa1341dc3d93a6b7f8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.42.0-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 4c26022765a414925efde972e26ca3f99458435879c1133c6bbe2e962a6c2c16
MD5 a41857358768f37aeee8dd46fef04645
BLAKE2b-256 9fb1cbde95d04d94d2c3f0241b54354f5e792e64a1c1643b4424a2ccb80f2788

See more details on using hashes here.

File details

Details for the file slangpy-0.42.0-cp313-cp313-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for slangpy-0.42.0-cp313-cp313-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 07a8a5bb32e5644ea0226e40db5c773f1218c901883e70d2f7b20ceef433f724
MD5 70fe685c60806107f3f61a40182e4f76
BLAKE2b-256 da236427597cd186477c6020124883eb1f5d7e15ae4e46bb7ee60125fbc30979

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.42.0-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 c070359285acf177fb7f4ca6cbd29c6c7f37a9b036f42f436353aa773c08e665
MD5 d7f1e322178a194b7b76742b3895f5d1
BLAKE2b-256 153c44f8d8c20b83e10dc2dffc45d9a93adc3e6d037ec1b72756e8dfeec9cd7d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: slangpy-0.42.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 78.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.42.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 82e212b7b195aeafb23ab43a43069980e3be0952f91869b65b5b4288bad9129d
MD5 7a33e24c3d96ae2f2c19060e6e0cd199
BLAKE2b-256 b7b894d067236898b5bec62a7ae682c296ba2310ebf9aa894bb32de9a4cfd478

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.42.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 8dbc36b32c1c1fc8dffa70d63ddf0ab538c473ba072f802c8d7730530bea7a7c
MD5 d5dbec4c59c9393c8b8b387ba2854a65
BLAKE2b-256 cdd1d9822a2c38dc583850608650e6d3304f6cf6e03a1335ba21078440790a68

See more details on using hashes here.

File details

Details for the file slangpy-0.42.0-cp312-cp312-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for slangpy-0.42.0-cp312-cp312-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 4e2f76d3709ee2152f54620a27ab45fbb459db392c03b2d492382f675bfccc2a
MD5 13b6c2e00cbd1189f1aaa75180da53b4
BLAKE2b-256 20bc446357c229692f51885f4c5f3894af3aff37ccaafebc4f24066c2b9b5b80

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.42.0-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 e2ed4b31f5f9bff32294bc832ff895b3562b5972c462c8d6d86bc169911b7373
MD5 eae430799fa5f57fcfb4ee448aafe219
BLAKE2b-256 835f18503807e8f5503b69bbf6503c92e0e2a1529a0a142d793a1872f5066adc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: slangpy-0.42.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 78.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.42.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b9c016a300935c5f5c145e006bc2f4c39d2cdb14066b940c9176b74dbd032e64
MD5 74d16fd0dfc5741c5e27fee4b5823ac3
BLAKE2b-256 a40a599a9fdc3d97e09dc27cd59ecaa470a74e916e4ccfa54d3d16fbee7e5d7e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.42.0-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 c7b979bea1e30c8e2ab513fb6a012e1c1928cc4bc1f147f82717fd1c92cf716c
MD5 a37de9821403ea658a3fa5bc8c21e560
BLAKE2b-256 cd3287c9f00fdac276bb3d84578b73905fd509e65bda0287dee743ed4cf5565e

See more details on using hashes here.

File details

Details for the file slangpy-0.42.0-cp311-cp311-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for slangpy-0.42.0-cp311-cp311-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 c74b5769b85c8dbf103d816649bf5a50555ef9fbcba3557fada428e175ac8907
MD5 b1f56f3d400246395138ef6809748abf
BLAKE2b-256 924ff58d3d33435a3a4f3ac17b8e4b5912b29e74e5244a47d797c389e4b805e2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.42.0-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 c2a213e3e154e180b496d6c07a60d3cc1edf22c5ccd2cd551f4225e2f8f5683e
MD5 cffe50eedbdb03701b86e525bbdaa568
BLAKE2b-256 d2ffa8f0f0eb9545a1f45911236e212856e216ededc697b51c04a451a7c7070d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: slangpy-0.42.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 78.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.42.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b9b5276cbb9f18fe22254d7ee06e6f586011d5c1fa7d906b69a747b92e1b50c2
MD5 c18a46bc5913d6959e75d7ea0b67069d
BLAKE2b-256 686d9e5835439d6f00f97df0e3ec11c070e120953a41908deef890f3084659a7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.42.0-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 3beacf6a94d6a4fc788e2f1f8abad8d97ba80f5434ac6f61d699068764dde1ca
MD5 31bf4c7d5f5cac79c79ba4729d29e19d
BLAKE2b-256 bdaed28d01bafe6a222a700fa7e78398065d93791f68637aeea989547e2591e2

See more details on using hashes here.

File details

Details for the file slangpy-0.42.0-cp310-cp310-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for slangpy-0.42.0-cp310-cp310-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 ff9360a76d31d12865aa80af98640f9342f456b71d24d848adcafcdb51fbe615
MD5 7ce42a4ffd703ac1577aa9c3a55ceee8
BLAKE2b-256 feaedfccdcd8d9c496e5612182181171ea412c496efcc72d42fba3bfd0d45c89

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.42.0-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 710c68048a505792d58e9a9e1d8d4800b1dcb8d398d5dfd8302975e081528377
MD5 55c57368e7b66e8df458b7fd8b1b68c6
BLAKE2b-256 33d10314d9a1818eb3862c80de42ced589ab50fae31e51c6eb2ff19e141eddf9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: slangpy-0.42.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 78.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.42.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 782e9695739671d722cb41fff7fcdc040e5d787fb73349ba3357175f8593205a
MD5 2d4871f3d64303e47ee9ca298f5a554a
BLAKE2b-256 b24e9fef5059f18b4e67b9d0ff2c1ce1ee785a4e3cc21358f8060be7202b3727

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.42.0-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 8ce109e1ead385441eafa7b20348b7bf98e697d9d5e05fab2bdd61262c7fb906
MD5 39bdd6de1aebed6f27eca937254374ba
BLAKE2b-256 3052eb50ccec62a4ad275451bb96f02187b2184b7825905ea37924a8419494df

See more details on using hashes here.

File details

Details for the file slangpy-0.42.0-cp39-cp39-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for slangpy-0.42.0-cp39-cp39-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 591c99bb205c44fb9211df639ea91b95fcb727d1dedd0f6687966ecf196f8c8c
MD5 c701ddaac0709b07d841311728a95421
BLAKE2b-256 85232224bde32d9ff47f05bda4b933af7542a99672cc7ce10e6833c2b1cc2c40

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.42.0-cp39-cp39-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 c8481f9f6bdc58e139389abbc64eee09be1dcba99ac962336079b5f4b7235389
MD5 dee90114ef7a137c690671c00ac9aa02
BLAKE2b-256 27032d8e4323756b608e00d7526dee947c9bac4e6bffeeb65e3a27dcf1510311

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