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.30.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.30.0-cp313-cp313-win_amd64.whl (60.2 MB view details)

Uploaded CPython 3.13 Windows x86-64

slangpy-0.30.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (17.5 MB view details)

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

slangpy-0.30.0-cp313-cp313-macosx_14_0_arm64.whl (16.4 MB view details)

Uploaded CPython 3.13 macOS 14.0+ ARM64

slangpy-0.30.0-cp312-cp312-win_amd64.whl (60.2 MB view details)

Uploaded CPython 3.12 Windows x86-64

slangpy-0.30.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (17.5 MB view details)

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

slangpy-0.30.0-cp312-cp312-macosx_14_0_arm64.whl (16.4 MB view details)

Uploaded CPython 3.12 macOS 14.0+ ARM64

slangpy-0.30.0-cp311-cp311-win_amd64.whl (60.2 MB view details)

Uploaded CPython 3.11 Windows x86-64

slangpy-0.30.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (17.5 MB view details)

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

slangpy-0.30.0-cp311-cp311-macosx_14_0_arm64.whl (16.4 MB view details)

Uploaded CPython 3.11 macOS 14.0+ ARM64

slangpy-0.30.0-cp310-cp310-win_amd64.whl (60.2 MB view details)

Uploaded CPython 3.10 Windows x86-64

slangpy-0.30.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (17.5 MB view details)

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

slangpy-0.30.0-cp310-cp310-macosx_14_0_arm64.whl (16.4 MB view details)

Uploaded CPython 3.10 macOS 14.0+ ARM64

slangpy-0.30.0-cp39-cp39-win_amd64.whl (60.2 MB view details)

Uploaded CPython 3.9 Windows x86-64

slangpy-0.30.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (17.5 MB view details)

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

slangpy-0.30.0-cp39-cp39-macosx_14_0_arm64.whl (16.4 MB view details)

Uploaded CPython 3.9 macOS 14.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for slangpy-0.30.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d00c3674e6379b637242910bd542822caf7076bb3fba409762aa31c335940c06
MD5 f66e4834b7eb3ee9ce6b4ee30a61edec
BLAKE2b-256 bb747d39d21b99639d0d365ec950061fa999253641bd16e4fbbccf05d50fcc2d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.30.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5e871ece3e9bf6fc78882226c18618784121b765168f10010493f1ce8893480b
MD5 c19250f5e43a1f5666a1c2dbdf3fdee4
BLAKE2b-256 da883241079b2ecf000b16c0f3a592ee76f9008fa8b1f64e32ec542ceb60197e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.30.0-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 9029bb77ac2665f7b7f05b00047b980183967261abfe3e45fc7d276a3f4f026c
MD5 be083f4e28fb1ca7bc32a207d73cd492
BLAKE2b-256 5d21baa7bfdaf0a762808275eba941f903d58c32317075b76bfd74baf0b7a239

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for slangpy-0.30.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 597fe52a356a3157481e6a03fbcb0b415bef7115989a4ced6cd31ea6a5ad146c
MD5 3530bb2a0d0dc661b8f5e0df94737dfc
BLAKE2b-256 5010cc20469cd2baff76813081f82b6c94a6bbd6f3cc8dd489b5c9485b5e103d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.30.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c509742ef88a5ea75d0db909fc40c604bd333c274e3d048888cf08a76c6f9b7a
MD5 3cec17f8231a68e9f7d8f246c1998519
BLAKE2b-256 9295b63be83e6cc559abba49760a81a545ffb01a4784639074ee48d17fcbd53e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.30.0-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 391d308f1db8c4ccc461d0a65618f2fab05bf4e96a6016de53119b816ce49138
MD5 0f3fb32c7903b0391fa81bdefa1ed317
BLAKE2b-256 adb13d48308c21c3debf2e68649a7ed7f62b6c198e04adf85d38136f822fe457

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for slangpy-0.30.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 83486d37cc73d0b705f219590b690b2acf259c67d74286c7e78a8027f11f73a0
MD5 ed97a5e7f466e270f1c55fa90529eec1
BLAKE2b-256 3a52b459e007b8806b4e38dd09ea2a221f4a2530b201dc5cb7e9098d5607b41e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.30.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 639cbafbf0f9e8eaa9c3f3f9b1b2eb20c1f62d6770d304c18260892d9947d9c0
MD5 18dae3cec483227d337ee57a66625f31
BLAKE2b-256 36ddd89e1f8b9035aee14d60012af60c14b4dc87a3a5fb21bf52cf1a937ed615

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.30.0-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 fe42865d69b55497d34b110f44abe947d3e0553f93a12acfcac8bb58bad0df6f
MD5 26a300c554a64963653a1f3aed9564bf
BLAKE2b-256 e696bc21c2dd0457871a3b50b9cd47196b7912817fe0a9c3bc0e814ec354b433

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for slangpy-0.30.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b71418b97c1b8fdc74ef559d681ce8b023f792b7b7cd05ba8bb82f51f3239eec
MD5 f00fcdbf73024ff14dd44d589b44cab3
BLAKE2b-256 38a8b519c0cb7757899e07774ab85e06b06ae3699b1ea42fa784572e2a8eb1a7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.30.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1ff08046f023bd6758dfffcd4782074ebcd0cb05578988f2b5e165d484fb918c
MD5 bd85a418ac40f782d67a7e10532dd04c
BLAKE2b-256 462b03a9a61679580755374d34bd963bb86c3d3fa1ab97d7e05470904700f2a2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.30.0-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 4bed59dafd46a4fa0da8d7788ca25d735202972e565a73c1c635b4781430b5f0
MD5 0b90634b6d4cb290a706216083911831
BLAKE2b-256 865bf5cfcd92671bbd274f984eca60b37094677d768766d9a4adc53519980dac

See more details on using hashes here.

File details

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

File metadata

  • Download URL: slangpy-0.30.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 60.2 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.30.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 241478c89d1edf98e4bb815d300346910beb71149e3bfddb17eccfcfbb493438
MD5 d1ae39f3c30a392317d1b0ecf142f17e
BLAKE2b-256 3d6d61d12bb1c4de6e86ac5fbc29dbc84b97076295d3e11946875881f29d1727

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.30.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 928b710517d7bdcca5f633d84b68dba2a0ad7702de2104930752de81ec404dc5
MD5 b8985863c95650fa0ed7c47b78ee4cc1
BLAKE2b-256 d54ad76ef157a9ad8686beda82d3978b4a0cd0d7886b13968a853552bd6f6f65

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.30.0-cp39-cp39-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 e0a504f58696fdf29721cf7783c76113b2a72a1efee1e170134cc4df354e303d
MD5 30ee7e1fe0c33b4c1e0f36f7daba32d1
BLAKE2b-256 8a4291d61c31356be85bf0981f7ecf580215768ddd7e24c122d7e47b177c3946

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