-
Notifications
You must be signed in to change notification settings - Fork 353
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
Missing dlls when running executable without cargo #367
Comments
I would indeed think of the automated libtorch download as a convenient way to get started up when developing with
Exactly, |
Closing this for now, feel free to re-open if further issues. |
Ah I'm sorry for not responding last time, manually installing libtorch turned out to be a good solution, thanks! |
First of all thanks for this crate, it's been very useful and pretty convenient to use so far!
I'm trying to run (and eventually distribute) an executable with
tch
as a dependency, it should use either cuda or cpu depending on availability.Running it using
cargo run
works fine, although to get cuda working I had to adddummy_cuda_dependency()
somewhere in my code as per #291. The problem is that if I try to run the exe myself I get a bunch of missing dll errors, specifically fortorch_cuda_cpp.dll
,c10.dll
,torch_cuda_cpu
andtorch_cpu.dll
. That makes sense, the dll files are intarget\release\build\torch-sys-b2db2b9ea64c45bd\out\libtorch\libtorch\lib
which is not on the search path.What is the intended solution for this? For now I just manually copied the dll files into
target\release
, but that's a bit of a hack. Is there a better way to do this? And how do I set it up so I can actually ship this? Or should the automaticlibtorch
download be considered more as a small utility for developing with cargo but not something to actually use in the real world?As a small related question, what does this paragraph mean?
If I try to copy the dll files from
target/debug/...
next to the release executable it also works. Does that meantch
always downloads a release version of libtorch?The text was updated successfully, but these errors were encountered: