[Mlir-commits] [mlir] [mlir][Math][SPIRV] fix `math.round` conversion for unit-dim vectors (PR #182067)
Kunwar Grover
llvmlistbot at llvm.org
Wed Feb 18 09:11:28 PST 2026
================
@@ -449,8 +449,13 @@ struct RoundOpPattern final : public OpConversionPattern<math::RoundOp> {
return res;
Location loc = roundOp.getLoc();
- Value operand = roundOp.getOperand();
- Type ty = operand.getType();
+ auto ty = getTypeConverter()->convertType(adaptor.getOperand().getType());
+ if (!ty)
+ return rewriter.notifyMatchFailure(
+ roundOp->getLoc(),
+ llvm::formatv("failed to convert type {0} for SPIR-V",
+ roundOp.getType()));
----------------
Groverkss wrote:
nit: use braces for multi line
https://github.com/llvm/llvm-project/pull/182067
More information about the Mlir-commits
mailing list