-
Notifications
You must be signed in to change notification settings - Fork 347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is cuda avaliable: false in Rust but true in C++ #904
Comments
omg guys i'am downgrade to tch-rs version:
and torch_cuda.dll in deps!
and if i started it But version tch-rs |
The answer in this link worked for me. |
@Davidos533 Thank you very much for sharing. I used your suggestion to install and successfully used CUDA for calculation. The entire process only took half an hour. My environment variable configuration is more concise. Here is the complete configuration: On windows:
This is my test code: use tch::Tensor;
fn main() {
println!("Cuda available: {}", tch::Cuda::is_available());
println!("Has cuda: {}", tch::utils::has_cuda());
println!("Cudnn available: {}", tch::Cuda::cudnn_is_available());
let t = Tensor::from_slice(&[3, 1, 4, 1, 5]);
let t = t * 2;
t.print();
} output:
|
Hello
I have problem a long time can't fix it
PyTorch 2.5.0 C++ Libtorch version cu118
dowloaded from here:
all variables set for user and as system:
(path to libtorch) PATH:
i'am trying to use this example https://github.com/LaurentMazare/tch-rs/tree/main/examples/char-rnn
.cargo/config.toml
with one addition at line 42:
println!("{}", device.is_cuda());
and i when start i'am getting:
AND Most intresing thing!
When i build it by C++ by this instruction
my code like:
my
CMakeLists.txt
likeit's compiles and i get:
Please help me
Edit:
I'am compared Rust compiled app with C++ compiled app by
Dependency Walker
In Rust app no TORCH_CUDA.dll dep
C++ app deps:
Rust app deps:
The text was updated successfully, but these errors were encountered: