diff --git a/mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td b/mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td --- a/mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td +++ b/mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td @@ -21,13 +21,13 @@ // 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 : NativeOpTrait<"linalg::NInputs<" # !cast(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 : NativeOpTrait<"linalg::NOutputs<" # !cast(args_out) # ">::Impl"> {} diff --git a/mlir/include/mlir/Dialect/Linalg/IR/LinalgTraits.h b/mlir/include/mlir/Dialect/Linalg/IR/LinalgTraits.h --- a/mlir/include/mlir/Dialect/Linalg/IR/LinalgTraits.h +++ b/mlir/include/mlir/Dialect/Linalg/IR/LinalgTraits.h @@ -62,7 +62,7 @@ public: static LogicalResult verifyTrait(Operation *op) { ConcreteType concreteOp = cast(op); - auto nOperands = cast(op).getNumInputsAndOutputBuffers(); + auto nOperands = concreteOp.getNumInputsAndOutputBuffers(); if (failed(OpTrait::impl::verifyAtLeastNOperands(op, nOperands))) return failure(); if (op->getNumResults() > concreteOp.getNumOutputs())