MLIR
18.0.0git
|
#include "CodegenUtils.h"
#include "LoopEmitter.h"
#include "mlir/Dialect/Affine/IR/AffineOps.h"
#include "mlir/Dialect/Arith/IR/Arith.h"
#include "mlir/Dialect/Bufferization/IR/Bufferization.h"
#include "mlir/Dialect/Linalg/IR/Linalg.h"
#include "mlir/Dialect/Linalg/Utils/Utils.h"
#include "mlir/Dialect/MemRef/IR/MemRef.h"
#include "mlir/Dialect/SCF/IR/SCF.h"
#include "mlir/Dialect/SparseTensor/IR/SparseTensor.h"
#include "mlir/Dialect/SparseTensor/IR/SparseTensorType.h"
#include "mlir/Dialect/SparseTensor/Transforms/Passes.h"
#include "mlir/Dialect/Tensor/IR/Tensor.h"
#include "mlir/IR/AffineMap.h"
#include "mlir/IR/Matchers.h"
#include "mlir/Support/LLVM.h"
Go to the source code of this file.
Functions | |
static bool | isZeroValue (Value val) |
static bool | isSparseTensor (Value v) |
static bool | isSparseTensor (OpOperand *op) |
static bool | isMaterializing (OpOperand *op, bool isZero) |
static bool | isSampling (GenericOp op) |
static bool | isMulChain (Value val, Value x) |
static bool | isSumOfMul (GenericOp op) |
static bool | isZeroYield (GenericOp op) |
static void | sizesForTensor (OpBuilder &builder, SmallVectorImpl< Value > &sizes, Location loc, ShapedType stp, Value tensor) |
Populates given sizes array from type (for static sizes) and from the tensor (for dynamic sizes). More... | |
static RankedTensorType | getBufferType (const SparseTensorType &stt, bool needTmpCOO) |
static void | getDynamicSizes (RankedTensorType tp, ValueRange sizes, SmallVectorImpl< Value > &dynSizes) |
Collects the dynamic dimension sizes for tp with the assumption that sizes are the dimension sizes for the type. More... | |
static LogicalResult | genForeachOnSparseConstant (ForeachOp op, RewriterBase &rewriter, SparseElementsAttr attr) |
static void | concatSizesFromInputs (OpBuilder &builder, SmallVectorImpl< Value > &sizes, Location loc, ShapedType dstTp, ValueRange srcs, unsigned dim) |
Populates the given sizes array for concatenation from types (for static sizes) and from the source tensors (for dynamic sizes). More... | |
|
static |
Populates the given sizes array for concatenation from types (for static sizes) and from the source tensors (for dynamic sizes).
Definition at line 183 of file SparseTensorRewriting.cpp.
References mlir::sparse_tensor::constantIndex(), mlir::OpBuilder::create(), mlir::linalg::createOrFoldDimOp(), and mlir::sparse_tensor::sizesFromSrc().
|
static |
Definition at line 152 of file SparseTensorRewriting.cpp.
|
static |
Definition at line 135 of file SparseTensorRewriting.cpp.
References mlir::sparse_tensor::SparseTensorType::getCOOType(), and mlir::sparse_tensor::SparseTensorType::getRankedTensorType().
|
static |
Collects the dynamic dimension sizes for tp
with the assumption that sizes
are the dimension sizes for the type.
Stores the dynamic dimension sizes to dynSizes.
Definition at line 144 of file SparseTensorRewriting.cpp.
References mlir::detail::enumerate().
|
static |
Definition at line 54 of file SparseTensorRewriting.cpp.
Definition at line 86 of file SparseTensorRewriting.cpp.
References mlir::Value::getDefiningOp().
|
static |
Definition at line 71 of file SparseTensorRewriting.cpp.
|
static |
Definition at line 51 of file SparseTensorRewriting.cpp.
|
static |
Definition at line 46 of file SparseTensorRewriting.cpp.
References mlir::sparse_tensor::getSparseTensorEncoding(), and mlir::Value::getType().
|
static |
Definition at line 98 of file SparseTensorRewriting.cpp.
|
static |
Definition at line 41 of file SparseTensorRewriting.cpp.
References mlir::m_AnyZeroFloat(), mlir::m_Zero(), and mlir::matchPattern().
|
static |
Definition at line 111 of file SparseTensorRewriting.cpp.
|
static |
Populates given sizes array from type (for static sizes) and from the tensor (for dynamic sizes).
Definition at line 123 of file SparseTensorRewriting.cpp.
References mlir::sparse_tensor::constantIndex(), mlir::OpBuilder::create(), and mlir::detail::enumerate().