[Mlir-commits] [mlir] 0b7f03b - [NFC] Fix minor typos in comments and reuse concreteOp.

Rahul Joshi llvmlistbot at llvm.org
Fri Sep 25 08:16:33 PDT 2020


Author: Rahul Joshi
Date: 2020-09-25T08:16:20-07:00
New Revision: 0b7f03b98d82dac7224e00377329577634d92c17

URL: https://github.com/llvm/llvm-project/commit/0b7f03b98d82dac7224e00377329577634d92c17
DIFF: https://github.com/llvm/llvm-project/commit/0b7f03b98d82dac7224e00377329577634d92c17.diff

LOG: [NFC] Fix minor typos in comments and reuse concreteOp.

Differential Revision: https://reviews.llvm.org/D88242

Added: 
    

Modified: 
    mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td
    mlir/include/mlir/Dialect/Linalg/IR/LinalgTraits.h

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td b/mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td
index b5e7471d1e50..ed87689822e5 100644
--- a/mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td
+++ b/mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td
@@ -21,13 +21,13 @@ include "mlir/Interfaces/CopyOpInterface.td"
 
 // The Linalg `NInputs` trait provides the API for ops that are known
 // to have a specified number of inputs, all passed as operands.
-// See Linalg/LinalgTraits.h for implementation details an usage.
+// See Linalg/LinalgTraits.h for implementation details and usage.
 class NInputs<int args_in> :
   NativeOpTrait<"linalg::NInputs<" # !cast<string>(args_in) # ">::Impl"> {}
 
 // The Linalg `NOutputs` trait provides the API for ops that are known
 // to have a specified number of outputs, all passed as operands.
-// See Linalg/LinalgTraits.h for implementation details an usage.
+// See Linalg/LinalgTraits.h for implementation details and usage.
 class NOutputs<int args_out> :
   NativeOpTrait<"linalg::NOutputs<" # !cast<string>(args_out) # ">::Impl"> {}
 

diff  --git a/mlir/include/mlir/Dialect/Linalg/IR/LinalgTraits.h b/mlir/include/mlir/Dialect/Linalg/IR/LinalgTraits.h
index 1da936269e97..1df2b21bdade 100644
--- a/mlir/include/mlir/Dialect/Linalg/IR/LinalgTraits.h
+++ b/mlir/include/mlir/Dialect/Linalg/IR/LinalgTraits.h
@@ -62,7 +62,7 @@ class StructuredOpTraits
 public:
   static LogicalResult verifyTrait(Operation *op) {
     ConcreteType concreteOp = cast<ConcreteType>(op);
-    auto nOperands = cast<ConcreteType>(op).getNumInputsAndOutputBuffers();
+    auto nOperands = concreteOp.getNumInputsAndOutputBuffers();
     if (failed(OpTrait::impl::verifyAtLeastNOperands(op, nOperands)))
       return failure();
     if (op->getNumResults() > concreteOp.getNumOutputs())


        


More information about the Mlir-commits mailing list