MLIR  19.0.0git
Namespaces | Macros | Typedefs | Functions
SparseTensor.h File Reference
#include "mlir/Bytecode/BytecodeOpInterface.h"
#include "mlir/Dialect/SparseTensor/IR/Enums.h"
#include "mlir/Dialect/SparseTensor/IR/SparseTensorInterfaces.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/Dialect.h"
#include "mlir/IR/OpDefinition.h"
#include "mlir/IR/OpImplementation.h"
#include "mlir/IR/TensorEncoding.h"
#include "mlir/Interfaces/InferTypeOpInterface.h"
#include "mlir/Interfaces/SideEffectInterfaces.h"
#include "mlir/Dialect/SparseTensor/IR/SparseTensorAttrEnums.h.inc"
#include "mlir/Dialect/SparseTensor/IR/SparseTensorAttrDefs.h.inc"
#include "mlir/Dialect/SparseTensor/IR/SparseTensorTypes.h.inc"
#include "mlir/Dialect/SparseTensor/IR/SparseTensorOps.h.inc"
#include "mlir/Dialect/SparseTensor/IR/SparseTensorOpsDialect.h.inc"

Go to the source code of this file.

Namespaces

 mlir
 Include the generated interface declarations.
 
 mlir::sparse_tensor
 

Macros

#define GET_ATTRDEF_CLASSES
 
#define GET_ATTRDEF_CLASSES
 
#define GET_TYPEDEF_CLASSES
 
#define GET_OP_CLASSES
 

Typedefs

using mlir::sparse_tensor::Dimension = uint64_t
 The type of dimension identifiers and dimension-ranks. More...
 
using mlir::sparse_tensor::Level = uint64_t
 The type of level identifiers and level-ranks. More...
 
using mlir::sparse_tensor::Size = int64_t
 The type for individual components of a compile-time shape, including the value ShapedType::kDynamic (for shapes). More...
 

Functions

template<typename T >
RankedTensorType mlir::sparse_tensor::getRankedTensorType (T &&t)
 Convenience method to abbreviate casting getType(). More...
 
template<typename T >
MemRefType mlir::sparse_tensor::getMemRefType (T &&t)
 Convenience method to abbreviate casting getType(). More...
 
SparseTensorEncodingAttr mlir::sparse_tensor::getSparseTensorEncoding (Type type)
 Convenience method to get a sparse encoding attribute from a type. More...
 
bool mlir::sparse_tensor::hasAnySparseOperand (Operation *op)
 Returns true iff MLIR operand has any sparse operand. More...
 
bool mlir::sparse_tensor::hasAnySparseResult (Operation *op)
 Returns true iff MLIR operand has any sparse result. More...
 
bool mlir::sparse_tensor::hasAnySparseOperandOrResult (Operation *op)
 Returns true iff MLIR operand has any sparse operand or result. More...
 
bool mlir::sparse_tensor::hasAnyNonIdentityOperandsOrResults (Operation *op)
 Returns true iff MLIR operation has any sparse tensor with non-identity dim2lvl maps. More...
 
AffineMap mlir::sparse_tensor::inferLvlToDim (AffineMap dimToLvl, MLIRContext *context)
 Given the dimToLvl map, infers the lvlToDim map, or returns empty Affine map when inference fails. More...
 
AffineMap mlir::sparse_tensor::inverseBlockSparsity (AffineMap dimToLvl, MLIRContext *context)
 Returns the lvlToDim map for the given dimToLvl map specific to the block sparse cases. More...
 
SmallVector< unsigned > mlir::sparse_tensor::getBlockSize (AffineMap dimToLvl)
 Given the dimToLvl map, returns the block sizes in a vector. More...
 
bool mlir::sparse_tensor::isBlockSparsity (AffineMap dimToLvl)
 Given the dimToLvl map, returns if it's block sparsity. More...
 
Dimension mlir::sparse_tensor::toDim (SparseTensorEncodingAttr enc, Level l)
 Convenience method to translate the given level to the corresponding dimension. More...
 
Level mlir::sparse_tensor::toLvl (SparseTensorEncodingAttr enc, Dimension d)
 Convenience method to translate the given dimension to the corresponding level. More...
 

Macro Definition Documentation

◆ GET_ATTRDEF_CLASSES [1/2]

#define GET_ATTRDEF_CLASSES

Definition at line 54 of file SparseTensor.h.

◆ GET_ATTRDEF_CLASSES [2/2]

#define GET_ATTRDEF_CLASSES

Definition at line 54 of file SparseTensor.h.

◆ GET_OP_CLASSES

#define GET_OP_CLASSES

Definition at line 60 of file SparseTensor.h.

◆ GET_TYPEDEF_CLASSES

#define GET_TYPEDEF_CLASSES

Definition at line 57 of file SparseTensor.h.