message: Implement XOR workaround for predicates too
diff: @@ -234,6 +234,20 @@ StatusOr<poplar::program::Program> CreateBinaryElementwiseOp(
  poplar::Tensor out;
  if (inst->opcode() == HloOpcode::kXor) {
  + if (inst->shape().element_type() == PRED) {
  + poplar::Tensor or_out =
  + popops::map(graph, popops::expr::BinaryOpType::LOGICAL_OR, in0, in1,
  + seq, GetDebugName(inst));
  + poplar::Tensor and_out =
  + popops::map(graph, popops::expr::BinaryOpType::LOGICAL_AND, in0, in1,
  + seq, GetDebugName(inst));
  + poplar::Tensor not_out =
  + popops::map(graph, popops::expr::UnaryOpType::LOGICAL_NOT, and_out,
  + seq, GetDebugName(inst));
  + out =
  + popops::map(graph, popops::expr::BinaryOpType::LOGICAL_AND, or_out,
  + not_out, seq, GetDebugName(inst));
  + } else {
  poplar::Tensor or_out =
  popops::map(graph, popops::expr::BinaryOpType::BITWISE_OR, in0, in1,
  seq, GetDebugName(inst));
  @@ -246,6 +260,7 @@ StatusOr<poplar::program::Program> CreateBinaryElementwiseOp(
  out =
  popops::map(graph, popops::expr::BinaryOpType::BITWISE_AND, or_out,
  not_out, seq, GetDebugName(inst));
  + }
  } else {
  popops::expr::BinaryOpType op;
  TF_ASSIGN_OR_RETURN(op, LookupBinaryFn(inst));
  