pytorch
e6a71405 - Let logical_xor support non-bool tensors (again) (#27248)

Commit
5 years ago
Let logical_xor support non-bool tensors (again) (#27248) Summary: f362a5a04b3708355b08e5c1285e46ca1b537ad6 reverted 5ca612b55ec1205f98e6bc5d5e64b1bf35f3b3cd due to build time conerns (also see https://github.com/pytorch/pytorch/issues/25254). Now we come back to this by reusing the underlying code in comparison operators: Logical operators on non-bool variables are essentially comparison operators that semantically output bool values. Compared with the previous implementation, we compromise by always applying XOR on the same input type, while output can be either the input type or the bool type. Pull Request resolved: https://github.com/pytorch/pytorch/pull/27248 Differential Revision: D17929356 Pulled By: ezyang fbshipit-source-id: dbac08c7614b36f05d24c69104fee9df9ca523d5
Author
Parents
Loading