diff --git a/mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.h b/mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.h --- a/mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.h +++ b/mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.h @@ -73,18 +73,18 @@ /// Examples: /// /// 1. linalg.fill(%f, %A) : f32, memref -/// name mangles into `linalg_fill_viewf32_f32_impl` +/// name mangles into `linalg_fill_f32_viewf32` /// /// 2. linalg.dot %A, %B, %C : /// (memref, /// memref, memref) -/// name mangles into `linalg_dot_viewxf32_viewxf32_viewf32_impl` +/// name mangles into `linalg_dot_viewxf32_viewxf32_viewf32` /// /// 3. linalg.matmul(...) : /// memref, /// memref, /// memref -/// name mangles into `linalg_matmul_viewxxf32_viewxxf32_viewxxf32_impl` +/// name mangles into `linalg_matmul_viewxxf32_viewxxf32_viewxxf32` std::string generateLibraryCallName(Operation *op); /// Returns `num` AffineDimExpr dimensions at positions diff --git a/mlir/lib/Conversion/LinalgToStandard/LinalgToStandard.cpp b/mlir/lib/Conversion/LinalgToStandard/LinalgToStandard.cpp --- a/mlir/lib/Conversion/LinalgToStandard/LinalgToStandard.cpp +++ b/mlir/lib/Conversion/LinalgToStandard/LinalgToStandard.cpp @@ -100,21 +100,9 @@ if (isa(op)) return failure(); - // Swap the operand order of the FillOp to maintain the pretty printed - // signature that takes an output buffer followed by the fill value. - SmallVector originalOperandOrder = op->getOperands(); - if (auto fillOp = dyn_cast(op.getOperation())) { - Value value = fillOp.value(); - Value output = fillOp.output(); - op->setOperands(ValueRange{output, value}); - } - auto libraryCallName = getLibraryCallSymbolRef(op, rewriter); - if (!libraryCallName) { - // Restore the operand order in case it has been modified. - op->setOperands(originalOperandOrder); + if (!libraryCallName) return failure(); - } // TODO: Add support for more complex library call signatures that include // indices or captured values.