[Mlir-commits] [mlir] [MLIR][NVVM] Add missing rounding modes in fp16x2 conversions (PR #169005)
Durgadoss R
llvmlistbot at llvm.org
Fri Nov 21 04:50:44 PST 2025
================
@@ -404,16 +391,40 @@ LogicalResult ConvertF4x2ToF16x2Op::verify() {
//===----------------------------------------------------------------------===//
LogicalResult ConvertF32x2ToF16x2Op::verify() {
- if (getRnd() != FPRoundingMode::RS)
- return emitOpError("Only RS rounding mode is supported for "
+ switch (getRnd()) {
+ case FPRoundingMode::RN:
+ case FPRoundingMode::RZ:
+ if (getRbits())
+ return emitOpError("rbits not supported for RN and RZ rounding modes.");
+ break;
+ case FPRoundingMode::RS:
+ if (!getRbits())
+ return emitOpError("rbits is required for RS rounding mode.");
+ break;
+ default:
+ return emitOpError("Only RN, RZ, and RS rounding modes are supported for "
"conversions from f32x2 to f16x2.");
----------------
durga4github wrote:
In that case, I think we will add that round-mode to the list in the first `if` check. Only that should suffice, right?
https://github.com/llvm/llvm-project/pull/169005
More information about the Mlir-commits
mailing list