tensor __setitem__ incorrect on mps when dtypes mismatch #95417
Labels
module: advanced indexing
Related to x[i] = y, index functions
module: mps
Related to Apple Metal Performance Shaders framework
module: type promotion
Related to semantics of type promotion
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
馃悰 Describe the bug
On my M1 Macbook,
torch.Tensor.__setitem__
yields incorrect result when using mps and when the dtype of the assigned elements is not the same as the dtype of the tensor on which__setitem__
is called.Output:
tensor([1., 1., 0., 0., 0.], device='mps:0')
Expected:
tensor([0., 0., 1., 1., 0.], device='mps:0')
Versions
cc @nairbv @mruberry @kulinseth @albanD @malfet @DenisVieriu97 @razarmehr @abhudev
The text was updated successfully, but these errors were encountered: