-
Notifications
You must be signed in to change notification settings - Fork 343
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
tch::utils unavailable / how to detect MPS? #644
Comments
Are you using the github version or some crates.io one? Maybe you should try using the github tip if that's not already the case. |
After finding this comment, I followed the directions as shown at ssoudan/tch-m1. Looking at the Cargo.toml there, it looks like it installs tip:
|
Two more datapoints:
compiles and runs like:
...which shows that [The unhandled errors for
fails to build with a long string of errors that includes:
...replicating ssoudan's method in repo is just a way to obtain a version of libtorch that compiles on the M1 The above may be telling us that there's something happening in the way |
Closing this as version |
I've installed tch-rs on an M1 Mac using ssoudan's repo.
Adding this line to the
main.rs
there:causes a compilation error:
That line is also present in examples/basics.rs in the
tch-rs
repo.Is
tch::utils
intended to be public? It appears so, as it's marked:in src/lib.rs.
If not, how do we detect if MPS is available? The Python way is to use
torch.backends.mps.is_available()
. However,backends
isn't exposed intch
either, even though it's a 1.13.0 feature: MPS Backend.The text was updated successfully, but these errors were encountered: