No project description provided
Project description
Pytorch extension written in rust
A demo pytorch (2.3.0) package using maturin and tch.
Build in a venv
# Create and activate a venv
python -m venv .venv
source .venv/bin/activate
# Install maturin
pip install maturin
# Build the torch_lib_with_rust package with maturin
LIBTORCH_USE_PYTORCH=1 maturin develop
Run
import torch
import torch_lib_with_rust
a=torch.randn(16).to("cuda")
print(a)
print(torch_lib_with_rust.add_one(a))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file torch_lib_with_rust-0.1.1.tar.gz.
File metadata
- Download URL: torch_lib_with_rust-0.1.1.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1c3ee194db19e5e2fc843b6328ff6044d2bfe0058aeba6edd1b43293ad82a71
|
|
| MD5 |
d3b6e8173437dff117143872ac39e2e3
|
|
| BLAKE2b-256 |
41b8e0b07883dec41392e348c37eb28891bd762708e066d4cfa4198f53e3448b
|
File details
Details for the file torch_lib_with_rust-0.1.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: torch_lib_with_rust-0.1.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 329.6 kB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f42a90ff819f465f3d777067ed0ba2020cc69ce33c40839b849d79ed20601cf
|
|
| MD5 |
62297761d4e7c78ba8e64756a9a4c4c9
|
|
| BLAKE2b-256 |
21006197e8fda63225532eecac56dbf677d2380322d46cdb6d278783f615e86c
|