@@ -409,33 +409,6 @@ inline bool TensorType::classof(Type type) {
409409// Type Utilities
410410// ===----------------------------------------------------------------------===//
411411
412- // / Returns the strides of the MemRef if the layout map is in strided form.
413- // / MemRefs with a layout map in strided form include:
414- // / 1. empty or identity layout map, in which case the stride information is
415- // / the canonical form computed from sizes;
416- // / 2. a StridedLayoutAttr layout;
417- // / 3. any other layout that be converted into a single affine map layout of
418- // / the form `K + k0 * d0 + ... kn * dn`, where K and ki's are constants or
419- // / symbols.
420- // /
421- // / A stride specification is a list of integer values that are either static
422- // / or dynamic (encoded with ShapedType::kDynamic). Strides encode
423- // / the distance in the number of elements between successive entries along a
424- // / particular dimension.
425- LogicalResult getStridesAndOffset (MemRefType t,
426- SmallVectorImpl<int64_t > &strides,
427- int64_t &offset);
428-
429- // / Wrapper around getStridesAndOffset(MemRefType, SmallVectorImpl<int64_t>,
430- // / int64_t) that will assert if the logical result is not succeeded.
431- std::pair<SmallVector<int64_t >, int64_t > getStridesAndOffset (MemRefType t);
432-
433- // / Return a version of `t` with identity layout if it can be determined
434- // / statically that the layout is the canonical contiguous strided layout.
435- // / Otherwise pass `t`'s layout into `simplifyAffineMap` and return a copy of
436- // / `t` with simplified layout.
437- MemRefType canonicalizeStridedLayout (MemRefType t);
438-
439412// / Given MemRef `sizes` that are either static or dynamic, returns the
440413// / canonical "contiguous" strides AffineExpr. Strides are multiplicative and
441414// / once a dynamic dimension is encountered, all canonical strides become
@@ -458,24 +431,6 @@ AffineExpr makeCanonicalStridedLayoutExpr(ArrayRef<int64_t> sizes,
458431// / where `exprs` is {d0, d1, .., d_(sizes.size()-1)}
459432AffineExpr makeCanonicalStridedLayoutExpr (ArrayRef<int64_t > sizes,
460433 MLIRContext *context);
461-
462- // / Return "true" if the layout for `t` is compatible with strided semantics.
463- bool isStrided (MemRefType t);
464-
465- // / Return "true" if the last dimension of the given type has a static unit
466- // / stride. Also return "true" for types with no strides.
467- bool isLastMemrefDimUnitStride (MemRefType type);
468-
469- // / Return "true" if the last N dimensions of the given type are contiguous.
470- // /
471- // / Examples:
472- // / - memref<5x4x3x2xi8, strided<[24, 6, 2, 1]> is contiguous when
473- // / considering both _all_ and _only_ the trailing 3 dims,
474- // / - memref<5x4x3x2xi8, strided<[48, 6, 2, 1]> is _only_ contiguous when
475- // / considering the trailing 3 dims.
476- // /
477- bool trailingNDimsContiguous (MemRefType type, int64_t n);
478-
479434} // namespace mlir
480435
481436#endif // MLIR_IR_BUILTINTYPES_H
0 commit comments