|
MLIR
22.0.0git
|
#include "mlir/Dialect/Tensor/IR/TensorInferTypeOpInterfaceImpl.h"#include "mlir/Dialect/Affine/IR/AffineOps.h"#include "mlir/Dialect/Arith/Utils/Utils.h"#include "mlir/Dialect/Tensor/IR/Tensor.h"#include "mlir/Interfaces/InferTypeOpInterface.h"Go to the source code of this file.
Classes | |
| struct | ReifyCollapseShapeOp |
Functions | |
| static OpFoldResult | getCollapsedOutputDimFromInputShape (OpBuilder &builder, Location loc, int64_t dimIndex, Value src, ArrayRef< int64_t > dstStaticShape, ArrayRef< AffineMap > reassociationMap) |
For reshape op compute the shape at dimension dimIndex of the output in terms of shape of the src, when the reshape op is a collapsing operation. More... | |
| static SmallVector< OpFoldResult, 4 > | getCollapsedOutputShapeFromInputShape (OpBuilder &builder, Location loc, Value src, ArrayRef< int64_t > dstStaticShape, ArrayRef< AffineMap > reassociation) |
Given the src of a collapsing reshape op and its reassociation maps, compute the shape of the result of the reshape. More... | |
|
static |
For reshape op compute the shape at dimension dimIndex of the output in terms of shape of the src, when the reshape op is a collapsing operation.
It is the product of the shape of the collapsed dimensions of the src.
Definition at line 22 of file TensorInferTypeOpInterfaceImpl.cpp.
References mlir::OpBuilder::createOrFold(), mlir::AffineMap::get(), mlir::Builder::getAffineSymbolExpr(), mlir::Builder::getIndexAttr(), mlir::AffineMap::getResults(), and mlir::affine::makeComposedAffineApply().
|
static |
Given the src of a collapsing reshape op and its reassociation maps, compute the shape of the result of the reshape.
Definition at line 50 of file TensorInferTypeOpInterfaceImpl.cpp.
Referenced by ReifyCollapseShapeOp::reifyResultShapes().