MLIR
20.0.0git
|
#include "mlir/IR/BuiltinTypes.h"
#include "TypeDetail.h"
#include "mlir/IR/AffineExpr.h"
#include "mlir/IR/AffineMap.h"
#include "mlir/IR/BuiltinAttributes.h"
#include "mlir/IR/BuiltinDialect.h"
#include "mlir/IR/Diagnostics.h"
#include "mlir/IR/Dialect.h"
#include "mlir/IR/TensorEncoding.h"
#include "mlir/IR/TypeUtilities.h"
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/BitVector.h"
#include "llvm/ADT/Sequence.h"
#include "llvm/ADT/Twine.h"
#include "llvm/ADT/TypeSwitch.h"
#include "mlir/IR/BuiltinTypes.cpp.inc"
#include "mlir/IR/BuiltinTypeConstraints.cpp.inc"
Go to the source code of this file.
Namespaces | |
mlir | |
Include the generated interface declarations. | |
Macros | |
#define | GET_TYPEDEF_CLASSES |
Tablegen Type Definitions. More... | |
#define | GET_TYPEDEF_LIST |
Functions | |
static LogicalResult | checkTensorElementType (function_ref< InFlightDiagnostic()> emitError, Type elementType) |
static void | extractStridesFromTerm (AffineExpr e, AffineExpr multiplicativeFactor, MutableArrayRef< AffineExpr > strides, AffineExpr &offset) |
static LogicalResult | extractStrides (AffineExpr e, AffineExpr multiplicativeFactor, MutableArrayRef< AffineExpr > strides, AffineExpr &offset) |
Takes a single AffineExpr e and populates the strides array with the strides expressions for each dim position. More... | |
static LogicalResult | getStridesAndOffset (MemRefType t, SmallVectorImpl< AffineExpr > &strides, AffineExpr &offset) |
A stride specification is a list of integer values that are either static or dynamic (encoded with ShapedType::kDynamic). More... | |
#define GET_TYPEDEF_CLASSES |
Tablegen Type Definitions.
Definition at line 32 of file BuiltinTypes.cpp.
#define GET_TYPEDEF_LIST |
|
static |
Definition at line 318 of file BuiltinTypes.cpp.
References mlir::emitError(), and mlir::TensorType::isValidElementType().
|
static |
Takes a single AffineExpr e
and populates the strides
array with the strides expressions for each dim position.
The convention is that the strides for dimensions d0, .. dn appear in order to make indexing intuitive into the result.
Definition at line 703 of file BuiltinTypes.cpp.
References mlir::Add, mlir::CeilDiv, extractStridesFromTerm(), mlir::FloorDiv, mlir::Mod, and mlir::Mul.
Referenced by foldExtractStridedOpFromInsertChain().
|
static |
Definition at line 688 of file BuiltinTypes.cpp.
Referenced by extractStrides().
|
static |
A stride specification is a list of integer values that are either static or dynamic (encoded with ShapedType::kDynamic).
Strides encode the distance in the number of elements between successive entries along a particular dimension.
For example, memref<42x16xf32, (64 * d0 + d1)>
specifies a view into a non-contiguous memory region of 42
by 16
f32
elements in which the distance between two consecutive elements along the outer dimension is 1
and the distance between two consecutive elements along the inner dimension is 64
.
The convention is that the strides for dimensions d0, .. dn appear in order to make indexing intuitive into the result.
Definition at line 760 of file BuiltinTypes.cpp.