Skip to content

Commit

Permalink
Fix convert and bitcast-convert for unsigned types.
Browse files Browse the repository at this point in the history
Also fix ClampIndex function to handle unsigned dynamic indices.
Finally also convert to signless in ProvideParameter().
This allows to enable support for unsigned ops.

PiperOrigin-RevId: 612362148
  • Loading branch information
akuegel authored and TensorFlow MLIR Team committed Mar 4, 2024
1 parent fc9d004 commit 1e1832e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions mhlo/transforms/map_mhlo_to_scalar_op.h
Original file line number Diff line number Diff line change
Expand Up @@ -1339,6 +1339,15 @@ struct MhloOpToStdScalarOp {
return impl::mapMhloOpToStdScalarOp<MhloOpTy>(loc, resultTypes, argTypes,
adaptor, b);
}

static Value mapConvertOpToStdScalarOp(Location loc,
ArrayRef<Type> targetTypes,
ArrayRef<Type> resultTypes,
ArrayRef<Type> argTypes,
ValueRange args, OpBuilder* b) {
return impl::mapConvertOpToStdScalarOp(loc, targetTypes, resultTypes,
argTypes, args, b);
}
};

} // namespace mhlo
Expand Down

0 comments on commit 1e1832e

Please sign in to comment.