-
Notifications
You must be signed in to change notification settings - Fork 6
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
Metal and Tensor::print() #1
Comments
Glad you found it useful. The symlink is how I'm managed to get the repo layout to work for both OSX and linux - just get it point to the appropriate place on both architectures. The env variable in the cargo/config.toml are not conditional on the architecture AFAIK. Note that the generated binaries will also need the DYLD_LIBRARY_PATH (or LD_LIBRARY_PATH on linux) to work. Not found an equivalent of |
Yep, I actually came up with the exact same method since I was working on Linux too. But I see what you mean, good point, I hadn't considered that the binaries need the env vars too. Nevertheless, I've never had a good reason not to use |
In any case, I wrote the issue to make you aware of these developments mostly so that the README can be updated. |
Finally updated the example to PyTorch 1.13. Tensor transfers to and from MPS with to_device() works. Print() works for CPU tensors but not for MPS tensors as it seems to assume they are based on doubles - while they seems to be backed by floats (more digging needed). |
Tensor::print()
doesn't seem to segfault any more on PyTorch 1.12.1 and tch 0.8.0.I did try Metal acceleration by applying your installation method with PyTorch nightly. At present it doesn't work mainly because
tch
is only compatible up to 1.12, but it sounds like we will get the Metal accelerated version working very soon: LaurentMazare/tch-rs#542PS: Thank you very much for publishing this, it's by far the cleanest method I've found.
The text was updated successfully, but these errors were encountered: