15 int64_t expectedCount = type.getNumDynamicDims();
16 int64_t actualCount = dynamicSizes.size();
17 if (expectedCount != actualCount) {
18 return op->
emitOpError(
"incorrect number of dynamic sizes, has ")
19 << actualCount <<
", expected " << expectedCount;
Operation is the basic unit of execution within MLIR.
InFlightDiagnostic emitOpError(const Twine &message={})
Emit an error with the op name prefixed, like "'dim' op " which is convenient for verifiers.
This class provides an abstraction over the different types of ranges over Values.
Include the generated interface declarations.
LogicalResult verifyDynamicDimensionCount(Operation *op, ShapedType type, ValueRange dynamicSizes)
Verify that the number of dynamic size operands matches the number of dynamic dimensions in the shape...