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.40.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.40.1-cp313-cp313-win_amd64.whl (76.5 MB view details)

Uploaded CPython 3.13Windows x86-64

slangpy-0.40.1-cp313-cp313-manylinux_2_34_x86_64.whl (76.6 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

slangpy-0.40.1-cp313-cp313-macosx_15_0_arm64.whl (34.2 MB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

slangpy-0.40.1-cp312-cp312-win_amd64.whl (76.5 MB view details)

Uploaded CPython 3.12Windows x86-64

slangpy-0.40.1-cp312-cp312-manylinux_2_34_x86_64.whl (76.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

slangpy-0.40.1-cp312-cp312-macosx_15_0_arm64.whl (34.2 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

slangpy-0.40.1-cp311-cp311-win_amd64.whl (76.5 MB view details)

Uploaded CPython 3.11Windows x86-64

slangpy-0.40.1-cp311-cp311-manylinux_2_34_x86_64.whl (76.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

slangpy-0.40.1-cp311-cp311-macosx_15_0_arm64.whl (34.2 MB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

slangpy-0.40.1-cp310-cp310-win_amd64.whl (76.5 MB view details)

Uploaded CPython 3.10Windows x86-64

slangpy-0.40.1-cp310-cp310-manylinux_2_34_x86_64.whl (76.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

slangpy-0.40.1-cp310-cp310-macosx_15_0_arm64.whl (34.1 MB view details)

Uploaded CPython 3.10macOS 15.0+ ARM64

slangpy-0.40.1-cp39-cp39-win_amd64.whl (76.5 MB view details)

Uploaded CPython 3.9Windows x86-64

slangpy-0.40.1-cp39-cp39-manylinux_2_34_x86_64.whl (76.5 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.34+ x86-64

slangpy-0.40.1-cp39-cp39-macosx_15_0_arm64.whl (34.1 MB view details)

Uploaded CPython 3.9macOS 15.0+ ARM64

File details

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

File metadata

  • Download URL: slangpy-0.40.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 76.5 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.40.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 85259d1d197760aea8a0a8450b926455c1d9efcc4caf84cc8cc4e7777f1dbf46
MD5 c5f1d03d1bd67094bef6daf23833167e
BLAKE2b-256 3bff8e54434c70fdb9fc7523e64b37423d3794d19962a2a8a1006f385dc35d07

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.40.1-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 a5f6873e50dc15e89ce173aedca8c0601ff1ae6a3665be031fa8ea31172a98ad
MD5 74a2df8c2df70a0146b1c4bf62347f29
BLAKE2b-256 c71602b15c3f0ab603a854991538df72a8cae3f80581499d3e8d9256e9e793da

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.40.1-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 a711988819d53827c66c2128c6357705c7e242224149d59cf66617aba72ccb7c
MD5 1a7e6a9c81ef84332cdd1a5bd9d1784d
BLAKE2b-256 c92fe494d44ccd6ff8efb320f0527c3ef150a247a52af03e15c8f70094ccee11

See more details on using hashes here.

File details

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

File metadata

  • Download URL: slangpy-0.40.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 76.5 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.40.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5893968c3350d5103736fe7e0209eb2673e2b223f84529f9a8efd507205d7171
MD5 be43a58ed8a3d79f237cf47570749e9b
BLAKE2b-256 714fa577a87002b02800efc8210d4dbb6f43eb91cb8e42dfee9d22c3bbeaf9f1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.40.1-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 a9701ff079bc14ae0dc15462f8000d1361c6e529535b326dd86f489e63522e52
MD5 52ca12c3e2b9b55ff2eb6b054930f1d9
BLAKE2b-256 96c05811d0751f4ef16973759094d7ef8e0f7333d4cffda9534751f53456978e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.40.1-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 100eb2116e95bb3aec7760fd05dd8bf42ecf8f7accb6ddf0009529d6515a01e6
MD5 c2658a2a64b62e2d9d2b15c57b123623
BLAKE2b-256 8ba0507511347660ca5e74ed65e019e1d2152cd139675dad8e07b91fe25e9e70

See more details on using hashes here.

File details

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

File metadata

  • Download URL: slangpy-0.40.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 76.5 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.40.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 01aec0bf344e872d1a5d188df723ce0266a8c77ed6c5e44c760a9f2be515c747
MD5 5819a60fa8f49d490b022fe63e66295e
BLAKE2b-256 032085f80392ced9d25980d30a3150e95c065e287204e61b54af1bd3cef099d8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.40.1-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 13bb73c096f9e87746220775e7cdd3563bba76b31b763739213699f8e4bf8493
MD5 d4b92474b8b383d4ed7e415cbbf82c69
BLAKE2b-256 56586507c15b827b997abbfe36961b2caae8a083142eabe530040f849beebf52

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.40.1-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 372d5cd1eebd6e078304a3935c60c42192eb0d0767c7797e9e934af67a45f76d
MD5 279e7249f6d6d69afc39b2ac564be13f
BLAKE2b-256 fc871e88eade86b2c6256585561ec4adf439ca33ed0e731057efcd4474b53693

See more details on using hashes here.

File details

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

File metadata

  • Download URL: slangpy-0.40.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 76.5 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.40.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c3882aa6b61a147d44bbb445dcd8a77285f5ae820235e031f889dcbc74cafd7c
MD5 497d101c1546d98644a9652e89bbce5d
BLAKE2b-256 f7b35536d473151f199086481493e84de8042b729a9d00fb4108578962790419

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.40.1-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 1c926887480cd3dd9de5c1733582ea79b5310867b035e24e502ca52a9db219f9
MD5 cc3ccf6ea2e737e92060768fa4208f1b
BLAKE2b-256 b1ebf62fff295dc7ce5c953c7b3379399765cd1fab156f72a5708d095eb0c332

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.40.1-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 e8a560eebe20a275eaf894ca5e14862f8976e6da699528eb841b784a7c854280
MD5 21c7554004832d7246e7829f89440ce1
BLAKE2b-256 8f888b2370d18744e0d5770bb7e0a7d40ed778e2926e77fd20cf8944d48df1f5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: slangpy-0.40.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 76.5 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.40.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 65270c47aa66a3e8d5544be5ac69e9dfe7ca021d40fb875df7330be47f054628
MD5 7cfb61a2b5543b4038918268dd9ff56f
BLAKE2b-256 734bc0de2c06d1542bf796ddf1e4980a1e5e016573f56a3dba3bb47e84bd2f60

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.40.1-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 130d0f90673007f172f82d5dcec234e4800752cecdd96472b9a830c429905aa7
MD5 140f748ec9a0ec4bbb780a57f6c1f75a
BLAKE2b-256 21489b0bb6eb05e7fce71bed2af1fdb43d8c01f21995a6b2bde4eeb1637c0e6f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.40.1-cp39-cp39-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 9824df2915ede76fc4c7c6551fa833301428290da8936b7a9df20da6cad41d5d
MD5 9a4853ad565e99cd2971d740fc17aeb4
BLAKE2b-256 457a17cf29a457efbe163a16ce78071a1bd308574f4c7a12d5a25f4f81a22bfb

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