Skip to content

Commit

Permalink
Change a bitwise logical xor to logical wise (#18246)
Browse files Browse the repository at this point in the history
### Description
Change a bitwise logical xor to logical-wise

### Motivation and Context
For Boolean values we should not use bitwise operations.
  • Loading branch information
snnn authored Nov 3, 2023
1 parent 192caee commit 4c4d79a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion onnxruntime/core/providers/cpu/math/element_wise_ops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,7 @@ Status Xor::Compute(OpKernelContext* context) const {
},
[](BroadcastHelper& per_iter_bh) {
per_iter_bh.OutputEigen<bool>() =
per_iter_bh.EigenInput0<bool>().array() ^ per_iter_bh.EigenInput1<bool>().array();
per_iter_bh.EigenInput0<bool>().array() != per_iter_bh.EigenInput1<bool>().array();
}};

UntypedBroadcastTwo(*context, funcs, 1.0);
Expand Down

0 comments on commit 4c4d79a

Please sign in to comment.