pytorch
06f874e2 - [MPS] Fix binary ops between int32 tensor with int64 scalar (#80220)

Commit
2 years ago
[MPS] Fix binary ops between int32 tensor with int64 scalar (#80220) For some reason, tensor *op* scalar does not follow the normal binary promotion rules So cast output tensor to expected type if needed It seems that one should have casted input tensors to expected output tensor type, but it does not really work for boolean binary ops, so... Add output tensor type/shape to cached graph key Extend `TestMPS. test_add_scalars` to test for this regression Fixes #79835 Pull Request resolved: https://github.com/pytorch/pytorch/pull/80220 Approved by: https://github.com/albanD
Author
Committer
Parents
Loading