Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lang] Fix MPS / other torch backend
from_torch
(#8298)
Issue: #6861 ### Brief Summary <!-- copilot:summary --> ### <samp>🤖 Generated by Copilot at fd38fea</samp> Fix a bug that prevents using torch tensors on non-CPU devices other than CUDA in Taichi kernels. Update the condition in `kernel_impl.py` to copy tensors to the correct device before and after kernel execution. ### Walkthrough <!-- copilot:walkthrough --> ### <samp>🤖 Generated by Copilot at fd38fea</samp> * Fix a bug that prevents using torch tensors on non-CPU devices other than CUDA ([link](https://github.com/taichi-dev/taichi/pull/8298/files?diff=unified&w=0#diff-a157043b38542c8145447ff342fda65fe4d54fb777fe514daa70007e83e20dc1L752-R752)) --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information