A Rust-native approach to deep learning.
Currently since there's no mature solution for n-dimensional array computing on gpu in rust, we temporarily use the Tensor
and other CUDA toolkit from tch
, which provides Rust bindings for libtorch
. But we won't use high-level parts of it.
This crate requires CUDA and libtorch
support. You need to:
- Install CUDA 11.3 from NVIDIA. After the installation, you need to set the
TORCH_CUDA_VERSION
environment variable to11.3
, orlibtorch
cannot find your CUDA. - Install
libtorch
. You can follow the instructions in tch-rs. - (On Windows) Check if your rust use a MSVC-based toolchain. The GNU toolchain could not successfully compile
torch-sys
. You can check the current toolchain by runningIf not, runrustup toolchain list
to switch the toolchain.rustup toolchain install nightly-x86_64-pc-windows-msvc rustup toolchain default nightly-x86_64-pc-windows-msvc
- You should now be able to run the project. Try
device_test
intests/tch_test.rs
to see if the all settings are correct.