Fast PyTorch tensor access for slangpy
Project description
slangpy-torch
Minimal PyTorch native extension providing fast (~28ns) tensor metadata access from native code without Python API overhead (~350ns).
Prerequisites
- Python 3.9+
- PyTorch 2.0+ installed
- C++ compiler
Windows
Install Visual Studio 2019 or 2022 with the "Desktop development with C++" workload.
Linux
# Ubuntu/Debian
sudo apt-get install build-essential
Install
This extension must be installed with --no-build-isolation to ensure ABI compatibility
with your installed PyTorch version:
pip install slangpy-torch --no-build-isolation
Verify Installation
import torch # Before slangpy_torch
import slangpy_torch
print(slangpy_torch.get_api_ptr()) # Should print a non-zero integer
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
slangpy_torch-0.7.0.tar.gz
(9.8 kB
view details)
File details
Details for the file slangpy_torch-0.7.0.tar.gz.
File metadata
- Download URL: slangpy_torch-0.7.0.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c14c9cc3074349ad5f019d8b8a06e14031662a60d493448a86563db3e888ae45
|
|
| MD5 |
c9a79867777b1e2d005b4cc2ec89ac1c
|
|
| BLAKE2b-256 |
273e20e0edb6fd6fa95af0e966f9408226e0dae8f90a07ceda043dd4aa2eb3b1
|