MLIR
20.0.0git
|
#include "Utils/CodegenUtils.h"
#include "Utils/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/SparseTensorStorageLayout.h"
#include "mlir/Dialect/SparseTensor/IR/SparseTensorType.h"
#include "mlir/Dialect/SparseTensor/Transforms/Passes.h"
#include "mlir/Dialect/Tensor/IR/Tensor.h"
#include "mlir/Dialect/Vector/IR/VectorOps.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 185 of file SparseTensorRewriting.cpp.
References mlir::sparse_tensor::constantIndex(), mlir::OpBuilder::create(), mlir::linalg::createOrFoldDimOp(), and mlir::sparse_tensor::sizesFromSrc().
|
static |
Definition at line 154 of file SparseTensorRewriting.cpp.
References mlir::OpBuilder::clone(), mlir::RewriterBase::eraseOp(), mlir::sparse_tensor::foreachInSparseConstant(), mlir::RewriterBase::inlineBlockBefore(), and mlir::RewriterBase::replaceOp().
|
static |
Definition at line 137 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 146 of file SparseTensorRewriting.cpp.
References mlir::detail::enumerate().
|
static |
Definition at line 56 of file SparseTensorRewriting.cpp.
References copy(), mlir::IROperand< DerivedT, IRValueT >::get(), mlir::Value::getDefiningOp(), and isZeroValue().
Definition at line 88 of file SparseTensorRewriting.cpp.
References mlir::Value::getDefiningOp().
Referenced by isSumOfMul().
|
static |
Definition at line 73 of file SparseTensorRewriting.cpp.
|
static |
Definition at line 53 of file SparseTensorRewriting.cpp.
References mlir::IROperand< DerivedT, IRValueT >::get(), and isSparseTensor().
|
static |
Definition at line 48 of file SparseTensorRewriting.cpp.
References mlir::sparse_tensor::getSparseTensorEncoding(), and mlir::Value::getType().
Referenced by isSparseTensor().
|
static |
Definition at line 100 of file SparseTensorRewriting.cpp.
References isMulChain().
|
static |
Definition at line 43 of file SparseTensorRewriting.cpp.
References mlir::m_AnyZeroFloat(), mlir::m_Zero(), and mlir::matchPattern().
Referenced by isMaterializing(), and isZeroYield().
|
static |
Definition at line 113 of file SparseTensorRewriting.cpp.
References isZeroValue().
|
static |
Populates given sizes array from type (for static sizes) and from the tensor (for dynamic sizes).
Definition at line 125 of file SparseTensorRewriting.cpp.
References mlir::sparse_tensor::constantIndex(), mlir::OpBuilder::create(), and mlir::detail::enumerate().