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.31.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.31.0-cp313-cp313-win_amd64.whl (62.2 MB view details)

Uploaded CPython 3.13Windows x86-64

slangpy-0.31.0-cp313-cp313-manylinux_2_34_x86_64.whl (19.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

slangpy-0.31.0-cp313-cp313-macosx_14_0_arm64.whl (18.3 MB view details)

Uploaded CPython 3.13macOS 14.0+ ARM64

slangpy-0.31.0-cp312-cp312-win_amd64.whl (62.2 MB view details)

Uploaded CPython 3.12Windows x86-64

slangpy-0.31.0-cp312-cp312-manylinux_2_34_x86_64.whl (19.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

slangpy-0.31.0-cp312-cp312-macosx_14_0_arm64.whl (18.3 MB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

slangpy-0.31.0-cp311-cp311-win_amd64.whl (62.2 MB view details)

Uploaded CPython 3.11Windows x86-64

slangpy-0.31.0-cp311-cp311-manylinux_2_34_x86_64.whl (19.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

slangpy-0.31.0-cp311-cp311-macosx_14_0_arm64.whl (18.3 MB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

slangpy-0.31.0-cp310-cp310-win_amd64.whl (62.2 MB view details)

Uploaded CPython 3.10Windows x86-64

slangpy-0.31.0-cp310-cp310-manylinux_2_34_x86_64.whl (19.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

slangpy-0.31.0-cp310-cp310-macosx_14_0_arm64.whl (18.3 MB view details)

Uploaded CPython 3.10macOS 14.0+ ARM64

slangpy-0.31.0-cp39-cp39-win_amd64.whl (62.2 MB view details)

Uploaded CPython 3.9Windows x86-64

slangpy-0.31.0-cp39-cp39-manylinux_2_34_x86_64.whl (19.5 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.34+ x86-64

slangpy-0.31.0-cp39-cp39-macosx_14_0_arm64.whl (18.3 MB view details)

Uploaded CPython 3.9macOS 14.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for slangpy-0.31.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 00b0f6bd977d1785dd05da1710c5ffc3232e4037e395bd9ce0f3a2dd07b56cf7
MD5 f8ebf0a58bb5ce3aa4c9a6032bc1daae
BLAKE2b-256 9f8ca8e3a51c209642e0483babb5d8a9273e670f065c4709943fe1289e91489a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.31.0-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 b08c7cef58dab774a8ca86d3c5a9b516176c7b2ada5c67751534f6db4d9f0903
MD5 ab9849ab3a91bcee00fa4796e5585981
BLAKE2b-256 4cac232e562f7d92fe2f207b6b819bd1fe5b12ba4b81bad858832f7c1bef1f5b

See more details on using hashes here.

File details

Details for the file slangpy-0.31.0-cp313-cp313-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for slangpy-0.31.0-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 2822e03d8bfc2dc389933c2753e405b546176c91e70466b65bc7b1ec76769a7e
MD5 b758928e66235d272346497cfbdf4d5c
BLAKE2b-256 13b9bdff339013fea2a7b5e1131b115d6b369dcb880e3900a755728422498480

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for slangpy-0.31.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 8f559ab309fd82f54ef29ef0b25b3cf1f34dab3800faa60b87027b2ff5b7a133
MD5 0bbbc4d94dd4289e750998c51bee1ed1
BLAKE2b-256 eb9e55ab0e6f557dcb1a3b315db9e30efc5f2ea1d43386abf156bdf202dca041

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.31.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 860036e5444ab0440b2b2270aceb45ea081f029db998dccf41e96341f0702ad9
MD5 eedefca3d7c8db2ea9253f2fe0f1b24c
BLAKE2b-256 1e9259ebf371e6700b83da7a99d9e4ca0a97c0e6a34a56bbbf223a88e7fd87ae

See more details on using hashes here.

File details

Details for the file slangpy-0.31.0-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for slangpy-0.31.0-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 14fbcf1e34f6716ac3e7df4c9a773f05d6a5a70c8be7264c17f3f3bc2afdc432
MD5 7abb2348f867cfb9e9794b2f79ebb83d
BLAKE2b-256 c699495aa36b7312779ec4c3d4c9584bd9e69977f5b6178ac4ad82b0cbc5a7e3

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for slangpy-0.31.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c19b172521e723ce224051280ba2e6337e583203863fdc72eb8683255f0ad743
MD5 bec15ce0429f1837f61f50e23ae3cbfc
BLAKE2b-256 234e38dc0082344215a1513c659f9216676316a906124ba34397b1c264d47dd3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.31.0-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 a406ab907af2f9e40a5a5579f472061f250cff5e4e8795f671e3ffce6bda11e4
MD5 e54ea8fd532c49729e5c2373c49b0a9c
BLAKE2b-256 e9026572a44009b44cf2f7215bd90bffab24e465c4fcecbdd3bd4400e128224d

See more details on using hashes here.

File details

Details for the file slangpy-0.31.0-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for slangpy-0.31.0-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 5252a5431864b8df2fd82f7fa8e281cbb9cc2a061b7bdc8a1c9f09ee69c06872
MD5 e344d2edec21ab7ce8203506177cb018
BLAKE2b-256 56cd9fed14a66f736d41b5d07915e6dc3d580c2598acdaece72e7a7280d654e9

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for slangpy-0.31.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 ed8ece5caf6c943dcc47a80398f9b1a8241ea972c6819cce7fb2fcbab3d179c4
MD5 b7ffd130e2c2a864fd41b48f140b6270
BLAKE2b-256 a5108f853cce84a01b01f75957988a1f961caaa8107d1ea3bd9a1e8a038fb4fa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.31.0-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 9db854a9c925533f2bcfd058a9cb1e2ce96d0a94149ae5263230cdcea36db431
MD5 38d54293b6edec4e97ef87d0c216c933
BLAKE2b-256 d0ea4404623fd3702bd6a9ec580c5c9668d94d1b5b2ae13d6eeef7c1e564bda3

See more details on using hashes here.

File details

Details for the file slangpy-0.31.0-cp310-cp310-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for slangpy-0.31.0-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 77d509e4956bfe1cd2ef3a8a83a4fa31c14fad479319291ea294582b4a7ff623
MD5 14f4b391016375b48a8c4b9fd560513e
BLAKE2b-256 110a6ca1e96c8364137287a51804789c24703bb83c279dd20ac252b93c117d12

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for slangpy-0.31.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 4caa52924f5cebde12cc43c16dee4f91cdce9522030bb08382eada5f5d04996d
MD5 b693e813379acdf14e74d4e172b3edfa
BLAKE2b-256 0cf57f575c3d6ac1e46f07e2846b1952a3d43bc7ccaeb404bf15563f15311e2f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.31.0-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 76531ed2215e24dc647070923ed39f870daf9b9fb32ca4183c4acc759c1d1cc5
MD5 4c14447269b02c4faf306015d821ab50
BLAKE2b-256 315ad4a6fc05eaf8eb54cc7b2d833f0205f060ccdc717742ad6321560e64c5ae

See more details on using hashes here.

File details

Details for the file slangpy-0.31.0-cp39-cp39-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for slangpy-0.31.0-cp39-cp39-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 a8193ec2ca210b2401efcde2c46132ec0e59e627ff0bd88d9b8c44e2af781578
MD5 c265680af825375733144f379d37fb5e
BLAKE2b-256 a74811f76b76ae8595b2ae06fb671174a4ea223ca9f810fca58d821b2a503854

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