-
Notifications
You must be signed in to change notification settings - Fork 196
Trouble loading TorchSharp Linux CUDA into F# Interactive #345
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
Labels
enhancement
New feature or request
Comments
Typical failure:
|
To turn on tracing of the load process we used this:
To test out one of the load-native-library probes we used this:
|
This was referenced Sep 13, 2021
2 tasks
@dsyme -- is this still a problem for DiffSharp? |
Solved by #1461 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@gbaydin spotted problems with dynamic loading TorchSharp for Linux + CUDA into F# Interactive. This will also hit .NET Notebooks
If there is a
#I
include-path directive that includes LibTorchSharp and libtorch-cpu-* CPU binaries then they will be preferred and the CUDA load will failThe TorchSharp native component loader for F#/.NET Interactive has an explicit version number wired into it for matching libtorch packages to look for, this version number hasn't been updated and we should pick it up from the TorchProperties build instead of hard-wiring it into the source
TorchSharp/src/TorchSharp/Torch.cs
Line 17 in decd474
The diagnostic given when a libtorch CPU backend is loaded during CUDA initialization could be much more detailed. Currently it fails with "System.InvalidOperationException: Torch device type CUDA did not initialise on the current machine.". Instead it could add that a CPU libtorch was loaded, give the location of the native DLLs loaded etc.
We think these together will solve the problem
The text was updated successfully, but these errors were encountered: