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.41.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.41.0-cp313-cp313-win_amd64.whl (78.0 MB view details)

Uploaded CPython 3.13Windows x86-64

slangpy-0.41.0-cp313-cp313-manylinux_2_34_x86_64.whl (81.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

slangpy-0.41.0-cp313-cp313-manylinux_2_34_aarch64.whl (79.7 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ ARM64

slangpy-0.41.0-cp313-cp313-macosx_15_0_arm64.whl (36.0 MB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

slangpy-0.41.0-cp312-cp312-win_amd64.whl (78.0 MB view details)

Uploaded CPython 3.12Windows x86-64

slangpy-0.41.0-cp312-cp312-manylinux_2_34_x86_64.whl (81.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

slangpy-0.41.0-cp312-cp312-manylinux_2_34_aarch64.whl (79.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ ARM64

slangpy-0.41.0-cp312-cp312-macosx_15_0_arm64.whl (36.0 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

slangpy-0.41.0-cp311-cp311-win_amd64.whl (78.0 MB view details)

Uploaded CPython 3.11Windows x86-64

slangpy-0.41.0-cp311-cp311-manylinux_2_34_x86_64.whl (81.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

slangpy-0.41.0-cp311-cp311-manylinux_2_34_aarch64.whl (79.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ ARM64

slangpy-0.41.0-cp311-cp311-macosx_15_0_arm64.whl (36.0 MB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

slangpy-0.41.0-cp310-cp310-win_amd64.whl (78.0 MB view details)

Uploaded CPython 3.10Windows x86-64

slangpy-0.41.0-cp310-cp310-manylinux_2_34_x86_64.whl (81.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

slangpy-0.41.0-cp310-cp310-manylinux_2_34_aarch64.whl (79.7 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ ARM64

slangpy-0.41.0-cp310-cp310-macosx_15_0_arm64.whl (36.0 MB view details)

Uploaded CPython 3.10macOS 15.0+ ARM64

slangpy-0.41.0-cp39-cp39-win_amd64.whl (78.0 MB view details)

Uploaded CPython 3.9Windows x86-64

slangpy-0.41.0-cp39-cp39-manylinux_2_34_x86_64.whl (81.2 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.34+ x86-64

slangpy-0.41.0-cp39-cp39-manylinux_2_34_aarch64.whl (79.7 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.34+ ARM64

slangpy-0.41.0-cp39-cp39-macosx_15_0_arm64.whl (36.0 MB view details)

Uploaded CPython 3.9macOS 15.0+ ARM64

File details

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

File metadata

  • Download URL: slangpy-0.41.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 78.0 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.41.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 fa976fd85ee4a14168f2b8e9a59954502284488bf84e5acc6416775114dcb427
MD5 66bebf75c5f307c7c8312db7a5a8f5b2
BLAKE2b-256 8048422ed01a936756dee6a6de5858a77c1907c9f341fe23a2b8ce063512e388

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.41.0-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 8ad68f4459b0e56aec3d7efce8439d498259f2219d41e4aa396a53f3660eb45b
MD5 882276fc920179b3295d22a4a3d6ad25
BLAKE2b-256 0e7c5c732fb5bb504922e3f5919b8608cc9fd0e6d95fc36371b14f9812a18261

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.41.0-cp313-cp313-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 209ee833654510b6077f99ab588d64110d16b5a8c5a49262ed9a25895f9152c2
MD5 b7620ae478397776e710aa8599fe5e95
BLAKE2b-256 95436e78c3ed40e2b13b88c01cc3b5d1430f2360fa80b6f47746689482d29ec3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.41.0-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 c4cee3bb5c2ab82d5a8e3a36a0a50725873de4f28fe501d5deb2cd0fee44efd3
MD5 403dc56a150ef49a321197175ac96a78
BLAKE2b-256 00733118556a741733b8ff6d936564b685655a44ef401806f0eb9bd6b6142149

See more details on using hashes here.

File details

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

File metadata

  • Download URL: slangpy-0.41.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 78.0 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.41.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 84ce78b28b77c53423adac8096624351bafffbe9d967369121bc3166e5a41109
MD5 e3c4271ea7de7dd54b6ac3688d4e3043
BLAKE2b-256 205df42b8bc17e75d488699a0ffb5ec0c92d0e09dd0faa76507b84f37338a2ff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.41.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 7bdcfed10bd36b4a6a780aeb1fafee66e69f04f549c419d44bb6f4264fdaff23
MD5 cf64a809370d2d76db63d08d31e0355d
BLAKE2b-256 505f4b56a11ea85c8c6f1900ee28b7089d05e287ce29b2dbbb8617314aaee4ac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.41.0-cp312-cp312-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 dbbc984e8e819270f7eba52083807bcfeabce25d19ea4048341fe59977799751
MD5 f74f50e221def103d240be033f52fd67
BLAKE2b-256 471264fceb1e98ec0cc55bfb2411cd9cc10a541c3fbbc2c1a7da8c873016d1d9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.41.0-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 8b88c38ea5a00421bdf8eccce9dd3bb6395c4d183b257649d62497fe76a540dc
MD5 3b94e2a46ba00cf6fb1c69c438d53e5e
BLAKE2b-256 d884f8fad9695885030e4a9fbfde6106ef9fc669787d4edfdd8e9f1e5ddf410e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: slangpy-0.41.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 78.0 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.41.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 1b9719c599070c4b191eba36e887a9c57433140e8885abf51decf41577ba3090
MD5 9aeaf23a89646b519144df0217df57f7
BLAKE2b-256 cea14e67c75dba632a207241726ee910a9b3f0d8af03cd01c333e0107f4c8f7d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.41.0-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 575d130686c6ac9fbfd6802b5e4ef6f273196c9389144c38754ad18cb08a5a00
MD5 482dcf6a442a68d2f0086bf393fb604b
BLAKE2b-256 cb3e0a0b8496872c1c8984f697b7684552e5ec06cf770ee8448e379fc5a88a66

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.41.0-cp311-cp311-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 e7e053eb3dc3b4beb109363e575c812ac984100a5c84cd80b909aee55737d1ff
MD5 28fe6172d9df483b24d0223db729f03c
BLAKE2b-256 387116a77e20cb6791dfa9435e71322abdc5295d1584f541a0eb4c0c0d98dc24

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.41.0-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 8b31a54325ce4ae73bbb969172f1d489cf0ee8189aabad1b2179219ecbd173df
MD5 2e7d005d2b9147cb75b24bf5a8a8bc24
BLAKE2b-256 1fb7eede6900fee662407cbe5d04bfb111bc01054ac25a4e316af4c986452e9b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: slangpy-0.41.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 78.0 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.41.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 08bc9bcfaa6298b48ea7b64168261d4d7b5c25f831a0a6aa50efcd419a7b9bfa
MD5 e7698bf1429297129e4f79c0fb11f335
BLAKE2b-256 129d2cca789ce12d620c80d54333c0afea8a38f08d36ecb382829c0669cf32ba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.41.0-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 69e80ea96105713d5676f23b9082e6bc62d6c1128d6d9184cf609da26bb35b94
MD5 22417bbc7cbb7c02c5568967188124e2
BLAKE2b-256 43dc6be56a168d96c07dfce117d05b082bbfacf19fa93755ff2357cd8b3cd358

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.41.0-cp310-cp310-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 6bf161bd1894a829e1e2c3f8cbbcfc73f5e3878d3a00ebfdf75225ba23f9668f
MD5 6697fac7f23533e98de1d8e9827c9800
BLAKE2b-256 a62713604411ffcec033d8f485a7235c0377d283ff54a17232ea327c9a00a287

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.41.0-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 dc36d82ff57753ef16f094c25c1566c88252adfe279528a2658da3f0cd279cca
MD5 f4c1ec9e63981472a3ccd5d70e45628d
BLAKE2b-256 152306eccc4ba324eea35781622a81ddd04ae5ffde3ed25faf75f81c9cc76ead

See more details on using hashes here.

File details

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

File metadata

  • Download URL: slangpy-0.41.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 78.0 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.41.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 aedeb213e2c5564d48e6314e5df98868859d8d2d77fcfd81dae6b45d727c3135
MD5 410be79fd04d062d8a4ec90ce819a905
BLAKE2b-256 89785e0e61d5327ecf57a845a10d29dd3e4fa70aa3b0133087c55f3fa4c796eb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.41.0-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 9216bbf1b4f5d57de78f8939f8d72cf11bfdc420f9310f6873dbe6978e91bc56
MD5 9985e5f238e88a70be76594feb326aff
BLAKE2b-256 984d934c704c593f69f3f80c2527f9a6867ac2e12474ff86ad1939b5c02f0091

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.41.0-cp39-cp39-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 1f7b1046b553543e0f96096d75835ff7089ee4218b66607f70bc34776087ce4a
MD5 70a5b5e70259cc8dea5636f81e19b270
BLAKE2b-256 7eb91897284b1c5f75912a9e2ac534105cfad996f9435492877f5b373f49dab3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slangpy-0.41.0-cp39-cp39-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 49dc149b69077bf39ea9d3e2ebe3cd0bf54c565bf01a93e02336ba6bc1e05407
MD5 cc8aad912a59986c03427ff2278d2df0
BLAKE2b-256 63b82ede95568e38c1b7206a8164a73bd8c298f72436ce5c61862ebcae9e267b

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