MLIR  16.0.0git
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
mlir::sparse_tensor Namespace Reference

Namespaces

 detail
 

Classes

class  BufferizeDenseOpsPass
 A pass that bufferizes only dense tensor ops and ignores all sparse tensor ops. More...
 
struct  Children
 Children subexpressions of tensor operations. More...
 
struct  DimLevelFormat
 Per-dimension level format (type and properties). More...
 
struct  Element
 An element of a sparse tensor in coordinate-scheme representation (i.e., a pair of indices and value). More...
 
struct  ElementLT
 Closure object for operator< on Element with a given rank. More...
 
struct  LatPoint
 Lattice point. More...
 
class  Merger
 A class to handle all iteration lattice operations. More...
 
struct  SparseCompilerOptions
 Options for the "sparse-compiler" pipeline. More...
 
class  SparseTensorCOO
 A memory-resident sparse tensor in coordinate-scheme representation (a collection of Elements). More...
 
class  SparseTensorEnumerator
 
class  SparseTensorEnumeratorBase
 A (higher-order) function object for enumerating the elements of some SparseTensorStorage under a permutation. More...
 
class  SparseTensorFile
 This class abstracts over the information stored in file headers, as well as providing the buffers and methods for parsing those headers. More...
 
class  SparseTensorLoopEmitter
 
class  SparseTensorNNZ
 Statistics regarding the number of nonzero subtensors in a source tensor, for direct sparse=>sparse conversion a la https://arxiv.org/abs/2001.02609. More...
 
class  SparseTensorStorage
 A memory-resident sparse tensor using a storage scheme based on per-dimension sparse/dense annotations. More...
 
class  SparseTensorStorageBase
 Abstract base class for SparseTensorStorage<P,I,V>. More...
 
struct  TensorExp
 Tensor expression. Represents a MLIR expression in tensor index notation. More...
 

Typedefs

template<typename V >
using ElementConsumer = const std::function< void(const std::vector< uint64_t > &, V)> &
 The type of callback functions which receive an element. More...
 
using index_type = uint64_t
 This type is used in the public API at all places where MLIR expects values with the built-in type "index". More...
 
using complex64 = std::complex< double >
 
using complex32 = std::complex< float >
 

Enumerations

enum  DimLvlType { DimLvlType::kDense, DimLvlType::kCompressed, DimLvlType::kSingleton, DimLvlType::kUndef }
 Dimension level type for a tensor (undef means index does not appear). More...
 
enum  Kind {
  kTensor = 0, kInvariant, kIndex, kAbsF,
  kAbsC, kAbsI, kCeilF, kFloorF,
  kSqrtF, kSqrtC, kExpm1F, kExpm1C,
  kLog1pF, kLog1pC, kSinF, kSinC,
  kTanhF, kTanhC, kNegF, kNegC,
  kNegI, kTruncF, kExtF, kCastFS,
  kCastFU, kCastSF, kCastUF, kCastS,
  kCastU, kCastIdx, kTruncI, kCIm,
  kCRe, kBitCast, kBinaryBranch, kUnary,
  kSelect, kMulF, kMulC, kMulI,
  kDivF, kDivC, kDivS, kDivU,
  kAddF, kAddC, kAddI, kSubF,
  kSubC, kSubI, kAndI, kOrI,
  kXorI, kShrS, kShrU, kShlI,
  kBinary, kReduce
}
 Tensor expression kind. More...
 

Functions

SparseTensorEncodingAttr getSparseTensorEncoding (Type type)
 Convenience method to get a sparse encoding attribute from a type. More...
 
bool isDenseDim (SparseTensorEncodingAttr::DimLevelType dltp)
 
bool isCompressedDim (SparseTensorEncodingAttr::DimLevelType dltp)
 
bool isSingletonDim (SparseTensorEncodingAttr::DimLevelType dltp)
 
bool isDenseDim (RankedTensorType type, uint64_t d)
 Convenience method to test for dense dimension (0 <= d < rank). More...
 
bool isCompressedDim (RankedTensorType type, uint64_t d)
 Convenience method to test for compressed dimension (0 <= d < rank). More...
 
bool isSingletonDim (RankedTensorType type, uint64_t d)
 Convenience method to test for singleton dimension (0 <= d < rank). More...
 
bool isOrderedDim (SparseTensorEncodingAttr::DimLevelType dltp)
 
bool isUniqueDim (SparseTensorEncodingAttr::DimLevelType dltp)
 
bool isOrderedDim (RankedTensorType type, uint64_t d)
 Convenience method to test for ordered property in the given dimension (0 <= d < rank). More...
 
bool isUniqueDim (RankedTensorType type, uint64_t d)
 Convenience method to test for unique property in the given dimension (0 <= d < rank). More...
 
uint64_t toOrigDim (const SparseTensorEncodingAttr &enc, uint64_t d)
 
uint64_t toStoredDim (const SparseTensorEncodingAttr &enc, uint64_t d)
 
uint64_t toOrigDim (RankedTensorType type, uint64_t d)
 Convenience method to translate the given stored dimension to the original dimension (0 <= d < rank). More...
 
uint64_t toStoredDim (RankedTensorType type, uint64_t d)
 Convenience method to translate the given original dimension to the stored dimension (0 <= d < rank). More...
 
void buildSparseCompiler (OpPassManager &pm, const SparseCompilerOptions &options)
 Adds the "sparse-compiler" pipeline to the OpPassManager. More...
 
void registerSparseTensorPipelines ()
 Registers all pipelines for the sparse_tensor dialect. More...
 
void registerBufferizableOpInterfaceExternalModels (DialectRegistry &registry)
 
constexpr MLIR_SPARSETENSOR_EXPORT bool isFloatingPrimaryType (PrimaryType valTy)
 
constexpr MLIR_SPARSETENSOR_EXPORT bool isIntegralPrimaryType (PrimaryType valTy)
 
constexpr MLIR_SPARSETENSOR_EXPORT bool isRealPrimaryType (PrimaryType valTy)
 
constexpr MLIR_SPARSETENSOR_EXPORT bool isComplexPrimaryType (PrimaryType valTy)
 
enum MLIR_SPARSETENSOR_EXPORT enum MLIR_SPARSETENSOR_EXPORT constexpr MLIR_SPARSETENSOR_EXPORT bool isDenseDLT (DimLevelType dlt)
 Check if the DimLevelType is dense. More...
 
constexpr MLIR_SPARSETENSOR_EXPORT bool isCompressedDLT (DimLevelType dlt)
 Check if the DimLevelType is compressed (regardless of properties). More...
 
constexpr MLIR_SPARSETENSOR_EXPORT bool isSingletonDLT (DimLevelType dlt)
 Check if the DimLevelType is singleton (regardless of properties). More...
 
constexpr MLIR_SPARSETENSOR_EXPORT bool isOrderedDLT (DimLevelType dlt)
 Check if the DimLevelType is ordered (regardless of storage format). More...
 
constexpr MLIR_SPARSETENSOR_EXPORT bool isUniqueDLT (DimLevelType dlt)
 Check if the DimLevelType is unique (regardless of storage format). More...
 
template<typename V >
SparseTensorCOO< V > * openSparseTensorCOO (const char *filename, uint64_t rank, const uint64_t *shape, const uint64_t *perm, PrimaryType valTp)
 Reads a sparse tensor with the given filename into a memory-resident sparse tensor in coordinate scheme. More...
 
template<typename V >
void writeExtFROSTT (const SparseTensorCOO< V > &coo, const char *filename)
 Writes the sparse tensor to filename in extended FROSTT format. More...
 
OverheadType overheadTypeEncoding (unsigned width)
 Converts an overhead storage bitwidth to its internal type-encoding. More...
 
OverheadType overheadTypeEncoding (Type tp)
 Converts an overhead storage type to its internal type-encoding. More...
 
Type getOverheadType (Builder &builder, OverheadType ot)
 Converts the internal type-encoding for overhead storage to an mlir::Type. More...
 
OverheadType pointerOverheadTypeEncoding (const SparseTensorEncodingAttr &enc)
 Returns the OverheadType for pointer overhead storage. More...
 
OverheadType indexOverheadTypeEncoding (const SparseTensorEncodingAttr &enc)
 Returns the OverheadType for index overhead storage. More...
 
Type getPointerOverheadType (Builder &builder, const SparseTensorEncodingAttr &enc)
 Returns the mlir::Type for pointer overhead storage. More...
 
Type getIndexOverheadType (Builder &builder, const SparseTensorEncodingAttr &enc)
 Returns the mlir::Type for index overhead storage. More...
 
StringRef overheadTypeFunctionSuffix (OverheadType ot)
 Convert OverheadType to its function-name suffix. More...
 
StringRef overheadTypeFunctionSuffix (Type overheadTp)
 Converts an overhead storage type to its function-name suffix. More...
 
PrimaryType primaryTypeEncoding (Type elemTp)
 Converts a primary storage type to its internal type-encoding. More...
 
StringRef primaryTypeFunctionSuffix (PrimaryType pt)
 Convert PrimaryType to its function-name suffix. More...
 
StringRef primaryTypeFunctionSuffix (Type elemTp)
 Converts a primary storage type to its function-name suffix. More...
 
DimLevelType dimLevelTypeEncoding (SparseTensorEncodingAttr::DimLevelType dlt)
 Converts the IR's dimension level type to its internal type-encoding. More...
 
Attribute getOneAttr (Builder &builder, Type tp)
 Generates a 1-valued attribute of the given type. More...
 
Value genIsNonzero (OpBuilder &builder, Location loc, Value v)
 Generates the comparison v != 0 where v is of numeric type. More...
 
Value constantZero (OpBuilder &builder, Location loc, Type tp)
 Generates a 0-valued constant of the given type. More...
 
Value constantOne (OpBuilder &builder, Location loc, Type tp)
 Generates a 1-valued constant of the given type. More...
 
Value constantIndex (OpBuilder &builder, Location loc, int64_t i)
 Generates a constant of index type. More...
 
Value constantI32 (OpBuilder &builder, Location loc, int32_t i)
 Generates a constant of i32 type. More...
 
Value constantI16 (OpBuilder &builder, Location loc, int16_t i)
 Generates a constant of i16 type. More...
 
Value constantI8 (OpBuilder &builder, Location loc, int8_t i)
 Generates a constant of i8 type. More...
 
Value constantI1 (OpBuilder &builder, Location loc, bool b)
 Generates a constant of i1 type. More...
 
Value constantAction (OpBuilder &builder, Location loc, Action action)
 Generates a constant of the given Action. More...
 
Value constantOverheadTypeEncoding (OpBuilder &builder, Location loc, unsigned width)
 Generates a constant of the internal type-encoding for overhead storage. More...
 
Value constantPointerTypeEncoding (OpBuilder &builder, Location loc, const SparseTensorEncodingAttr &enc)
 Generates a constant of the internal type-encoding for pointer overhead storage. More...
 
Value constantIndexTypeEncoding (OpBuilder &builder, Location loc, const SparseTensorEncodingAttr &enc)
 Generates a constant of the internal type-encoding for index overhead storage. More...
 
Value constantPrimaryTypeEncoding (OpBuilder &builder, Location loc, Type elemTp)
 Generates a constant of the internal type-encoding for primary storage. More...
 
Value constantDimLevelTypeEncoding (OpBuilder &builder, Location loc, SparseTensorEncodingAttr::DimLevelType dlt)
 Generates a constant of the internal dimension level type encoding. More...
 
void genReshapeDstShape (Location loc, PatternRewriter &rewriter, SmallVector< Value, 4 > &dstShape, ArrayRef< Value > srcShape, ArrayRef< int64_t > staticDstShape, ArrayRef< ReassociationIndices > reassociation)
 Computes the shape of destination tensor of a reshape operator. More...
 
void translateIndicesArray (OpBuilder &builder, Location loc, ArrayRef< ReassociationIndices > reassociation, ValueRange srcIndices, ArrayRef< Value > srcShape, ArrayRef< Value > dstShape, SmallVectorImpl< Value > &dstIndices)
 Helper method to translate indices during a reshaping operation. More...
 
static bool containsSparseTensor (TypeRange types)
 Return true if one of the given types is a sparse tensor type. More...
 
static const char * kindToOpSymbol (Kind kind)
 
static bool isAdmissableBranchExp (Operation *op, Block *block, Value v)
 Ensures that sparse compiler can generate code for expression. More...
 
static bool isAdmissableBranch (Operation *op, Region &region)
 Ensures that sparse compiler can generate code for branch. More...
 
static Value insertYieldOp (RewriterBase &rewriter, Location loc, Region &region, ValueRange vals)
 
static Value buildUnaryPresent (RewriterBase &rewriter, Location loc, Operation *op, Value v0)
 
static Value buildBinaryOverlap (RewriterBase &rewriter, Location loc, Operation *op, Value v0, Value v1)
 

Variables

enum MLIR_SPARSETENSOR_EXPORT OverheadType
 Encoding of overhead types (both pointer overhead and indices overhead), for "overloading" . More...
 
enum MLIR_SPARSETENSOR_EXPORT kU64 = 1
 
enum MLIR_SPARSETENSOR_EXPORT kU32 = 2
 
enum MLIR_SPARSETENSOR_EXPORT kU16 = 3
 
enum MLIR_SPARSETENSOR_EXPORT kU8
 
enum MLIR_SPARSETENSOR_EXPORT PrimaryType
 Encoding of the elemental type, for "overloading" . More...
 
enum MLIR_SPARSETENSOR_EXPORT kF32 = 2
 
enum MLIR_SPARSETENSOR_EXPORT kF16 = 3
 
enum MLIR_SPARSETENSOR_EXPORT kBF16 = 4
 
enum MLIR_SPARSETENSOR_EXPORT kI64 = 5
 
enum MLIR_SPARSETENSOR_EXPORT kI32 = 6
 
enum MLIR_SPARSETENSOR_EXPORT kI16 = 7
 
enum MLIR_SPARSETENSOR_EXPORT kI8 = 8
 
enum MLIR_SPARSETENSOR_EXPORT kC64 = 9
 
enum MLIR_SPARSETENSOR_EXPORT kC32
 
enum MLIR_SPARSETENSOR_EXPORT Action
 The actions performed by . More...
 
enum MLIR_SPARSETENSOR_EXPORT kFromFile = 1
 
enum MLIR_SPARSETENSOR_EXPORT kFromCOO = 2
 
enum MLIR_SPARSETENSOR_EXPORT kSparseToSparse = 3
 
enum MLIR_SPARSETENSOR_EXPORT kEmptyCOO = 4
 
enum MLIR_SPARSETENSOR_EXPORT kToCOO = 5
 
enum MLIR_SPARSETENSOR_EXPORT kToIterator = 6
 
enum MLIR_SPARSETENSOR_EXPORT enum MLIR_SPARSETENSOR_EXPORT DimLevelType
 This enum mimics SparseTensorEncodingAttr::DimLevelType for breaking dependency cycles. More...
 
enum MLIR_SPARSETENSOR_EXPORT enum MLIR_SPARSETENSOR_EXPORT kCompressed = 1
 
enum MLIR_SPARSETENSOR_EXPORT enum MLIR_SPARSETENSOR_EXPORT kCompressedNu = 2
 
enum MLIR_SPARSETENSOR_EXPORT enum MLIR_SPARSETENSOR_EXPORT kCompressedNo = 3
 
enum MLIR_SPARSETENSOR_EXPORT enum MLIR_SPARSETENSOR_EXPORT kCompressedNuNo = 4
 
enum MLIR_SPARSETENSOR_EXPORT enum MLIR_SPARSETENSOR_EXPORT kSingleton = 5
 
enum MLIR_SPARSETENSOR_EXPORT enum MLIR_SPARSETENSOR_EXPORT kSingletonNu = 6
 
enum MLIR_SPARSETENSOR_EXPORT enum MLIR_SPARSETENSOR_EXPORT kSingletonNo = 7
 
enum MLIR_SPARSETENSOR_EXPORT enum MLIR_SPARSETENSOR_EXPORT kSingletonNuNo = 8
 

Typedef Documentation

◆ complex32

using mlir::sparse_tensor::complex32 = typedef std::complex<float>

Definition at line 86 of file Enums.h.

◆ complex64

using mlir::sparse_tensor::complex64 = typedef std::complex<double>

Definition at line 85 of file Enums.h.

◆ ElementConsumer

template<typename V >
using mlir::sparse_tensor::ElementConsumer = typedef const std::function<void(const std::vector<uint64_t> &, V)> &

The type of callback functions which receive an element.

We avoid packaging the coordinates and value together as an Element object because this helps keep code somewhat cleaner.

Definition at line 76 of file COO.h.

◆ index_type

using mlir::sparse_tensor::index_type = typedef uint64_t

This type is used in the public API at all places where MLIR expects values with the built-in type "index".

For now, we simply assume that type is 64-bit, but targets with different "index" bit widths should link with an alternatively built runtime support library.

Definition at line 54 of file Enums.h.

Enumeration Type Documentation

◆ DimLvlType

Dimension level type for a tensor (undef means index does not appear).

Enumerator
kDense 
kCompressed 
kSingleton 
kUndef 

Definition at line 24 of file Merger.h.

◆ Kind

Tensor expression kind.

Enumerator
kTensor 
kInvariant 
kIndex 
kAbsF 
kAbsC 
kAbsI 
kCeilF 
kFloorF 
kSqrtF 
kSqrtC 
kExpm1F 
kExpm1C 
kLog1pF 
kLog1pC 
kSinF 
kSinC 
kTanhF 
kTanhC 
kNegF 
kNegC 
kNegI 
kTruncF 
kExtF 
kCastFS 
kCastFU 
kCastSF 
kCastUF 
kCastS 
kCastU 
kCastIdx 
kTruncI 
kCIm 
kCRe 
kBitCast 
kBinaryBranch 
kUnary 
kSelect 
kMulF 
kMulC 
kMulI 
kDivF 
kDivC 
kDivS 
kDivU 
kAddF 
kAddC 
kAddI 
kSubF 
kSubC 
kSubI 
kAndI 
kOrI 
kXorI 
kShrS 
kShrU 
kShlI 
kBinary 
kReduce 

Definition at line 40 of file Merger.h.

Function Documentation

◆ buildBinaryOverlap()

static Value mlir::sparse_tensor::buildBinaryOverlap ( RewriterBase rewriter,
Location  loc,
Operation op,
Value  v0,
Value  v1 
)
static

Definition at line 1098 of file Merger.cpp.

References insertYieldOp().

◆ buildSparseCompiler()

void mlir::sparse_tensor::buildSparseCompiler ( OpPassManager pm,
const SparseCompilerOptions options 
)

Adds the "sparse-compiler" pipeline to the OpPassManager.

This is the standard pipeline for taking sparsity-agnostic IR using the sparse-tensor type and lowering it to LLVM IR with concrete representations and algorithms for sparse tensors.

Definition at line 53 of file SparseTensorPipelines.cpp.

References mlir::OpPassManager::addNestedPass(), mlir::OpPassManager::addPass(), mlir::arith::createArithExpandOpsPass(), mlir::createCanonicalizerPass(), mlir::createConvertComplexToLibmPass(), mlir::createConvertComplexToLLVMPass(), mlir::createConvertComplexToStandardPass(), mlir::createConvertFuncToLLVMPass(), mlir::createConvertLinalgToLoopsPass(), mlir::createConvertMathToLibmPass(), mlir::createConvertMathToLLVMPass(), mlir::createConvertSCFToCFPass(), mlir::createConvertVectorToLLVMPass(), mlir::createConvertVectorToSCFPass(), mlir::createDenseBufferizationPass(), mlir::bufferization::createFinalizingBufferizePass(), mlir::createLinalgGeneralizationPass(), mlir::createLowerAffinePass(), mlir::createReconcileUnrealizedCastsPass(), mlir::createSparseBufferRewritePass(), mlir::createSparseTensorCodegenPass(), mlir::createSparseTensorConversionPass(), mlir::createSparsificationPass(), mlir::bufferization::createTensorCopyInsertionPass(), mlir::sparse_tensor::SparseCompilerOptions::enableRuntimeLibrary, getBufferizationOptions(), mlir::sparse_tensor::SparseCompilerOptions::lowerVectorToLLVMOptions(), mlir::sparse_tensor::SparseCompilerOptions::sparseTensorConversionOptions(), mlir::sparse_tensor::SparseCompilerOptions::sparsificationOptions(), and mlir::sparse_tensor::SparseCompilerOptions::testBufferizationAnalysisOnly.

Referenced by mlir::sparse_tensor::SparseCompilerOptions::lowerVectorToLLVMOptions(), and registerSparseTensorPipelines().

◆ buildUnaryPresent()

static Value mlir::sparse_tensor::buildUnaryPresent ( RewriterBase rewriter,
Location  loc,
Operation op,
Value  v0 
)
static

Definition at line 1084 of file Merger.cpp.

References insertYieldOp().

◆ constantAction()

Value mlir::sparse_tensor::constantAction ( OpBuilder builder,
Location  loc,
Action  action 
)
inline

Generates a constant of the given Action.

Definition at line 278 of file CodegenUtils.h.

References constantI32().

◆ constantDimLevelTypeEncoding()

Value mlir::sparse_tensor::constantDimLevelTypeEncoding ( OpBuilder builder,
Location  loc,
SparseTensorEncodingAttr::DimLevelType  dlt 
)
inline

Generates a constant of the internal dimension level type encoding.

Definition at line 312 of file CodegenUtils.h.

References constantI8(), dimLevelTypeEncoding(), genReshapeDstShape(), and translateIndicesArray().

◆ constantI1()

Value mlir::sparse_tensor::constantI1 ( OpBuilder builder,
Location  loc,
bool  b 
)
inline

Generates a constant of i1 type.

Definition at line 273 of file CodegenUtils.h.

References mlir::OpBuilder::create().

Referenced by createLessThanCompare(), genIf(), and genVectorMask().

◆ constantI16()

Value mlir::sparse_tensor::constantI16 ( OpBuilder builder,
Location  loc,
int16_t  i 
)
inline

Generates a constant of i16 type.

Definition at line 263 of file CodegenUtils.h.

References mlir::OpBuilder::create().

◆ constantI32()

Value mlir::sparse_tensor::constantI32 ( OpBuilder builder,
Location  loc,
int32_t  i 
)
inline

Generates a constant of i32 type.

Definition at line 258 of file CodegenUtils.h.

References mlir::OpBuilder::create().

Referenced by constantAction(), constantOverheadTypeEncoding(), and constantPrimaryTypeEncoding().

◆ constantI8()

Value mlir::sparse_tensor::constantI8 ( OpBuilder builder,
Location  loc,
int8_t  i 
)
inline

Generates a constant of i8 type.

Definition at line 268 of file CodegenUtils.h.

References mlir::OpBuilder::create().

Referenced by constantDimLevelTypeEncoding().

◆ constantIndex()

Value mlir::sparse_tensor::constantIndex ( OpBuilder builder,
Location  loc,
int64_t  i 
)
inline

◆ constantIndexTypeEncoding()

Value mlir::sparse_tensor::constantIndexTypeEncoding ( OpBuilder builder,
Location  loc,
const SparseTensorEncodingAttr &  enc 
)
inline

Generates a constant of the internal type-encoding for index overhead storage.

Definition at line 298 of file CodegenUtils.h.

References constantOverheadTypeEncoding().

◆ constantOne()

Value mlir::sparse_tensor::constantOne ( OpBuilder builder,
Location  loc,
Type  tp 
)
inline

Generates a 1-valued constant of the given type.

This supports all the same types as constantZero.

Definition at line 242 of file CodegenUtils.h.

References mlir::OpBuilder::create(), mlir::Type::dyn_cast(), mlir::Builder::getArrayAttr(), getOneAttr(), and mlir::Builder::getZeroAttr().

Referenced by genVectorReducInit(), and processParallelLoop().

◆ constantOverheadTypeEncoding()

Value mlir::sparse_tensor::constantOverheadTypeEncoding ( OpBuilder builder,
Location  loc,
unsigned  width 
)
inline

Generates a constant of the internal type-encoding for overhead storage.

Definition at line 283 of file CodegenUtils.h.

References constantI32(), and overheadTypeEncoding().

Referenced by constantIndexTypeEncoding(), and constantPointerTypeEncoding().

◆ constantPointerTypeEncoding()

Value mlir::sparse_tensor::constantPointerTypeEncoding ( OpBuilder builder,
Location  loc,
const SparseTensorEncodingAttr &  enc 
)
inline

Generates a constant of the internal type-encoding for pointer overhead storage.

Definition at line 291 of file CodegenUtils.h.

References constantOverheadTypeEncoding().

◆ constantPrimaryTypeEncoding()

Value mlir::sparse_tensor::constantPrimaryTypeEncoding ( OpBuilder builder,
Location  loc,
Type  elemTp 
)
inline

Generates a constant of the internal type-encoding for primary storage.

Definition at line 304 of file CodegenUtils.h.

References constantI32(), and primaryTypeEncoding().

◆ constantZero()

Value mlir::sparse_tensor::constantZero ( OpBuilder builder,
Location  loc,
Type  tp 
)
inline

Generates a 0-valued constant of the given type.

In addition to the scalar types (ComplexType, `FloatType, IndexType, IntegerType), this also works for RankedTensorType and VectorType (for which it generates a constant DenseElementsAttr of zeros).

Definition at line 231 of file CodegenUtils.h.

References mlir::OpBuilder::create(), mlir::Type::dyn_cast(), mlir::Builder::getArrayAttr(), and mlir::Builder::getZeroAttr().

Referenced by genInsertionLoad(), genIsNonzero(), genVectorLoad(), genVectorReducInit(), and getUnorderedCOOFromType().

◆ containsSparseTensor()

static bool mlir::sparse_tensor::containsSparseTensor ( TypeRange  types)
static

Return true if one of the given types is a sparse tensor type.

Definition at line 24 of file DenseBufferizationPass.cpp.

References getSparseTensorEncoding().

Referenced by mlir::sparse_tensor::BufferizeDenseOpsPass::runOnOperation().

◆ dimLevelTypeEncoding()

DimLevelType mlir::sparse_tensor::dimLevelTypeEncoding ( SparseTensorEncodingAttr::DimLevelType  dlt)

Converts the IR's dimension level type to its internal type-encoding.

Definition at line 391 of file CodegenUtils.cpp.

References kCompressed, kCompressedNo, kCompressedNu, kCompressedNuNo, kDense, kSingleton, kSingletonNo, kSingletonNu, and kSingletonNuNo.

Referenced by constantDimLevelTypeEncoding(), and mlir::sparse_tensor::SparseTensorLoopEmitter::getLastLevelTensorPointerIndex().

◆ genIsNonzero()

Value mlir::sparse_tensor::genIsNonzero ( OpBuilder builder,
mlir::Location  loc,
Value  v 
)

Generates the comparison v != 0 where v is of numeric type.

For floating types, we use the "unordered" comparator (i.e., returns true if v is NaN).

Definition at line 435 of file CodegenUtils.cpp.

References constantZero(), mlir::OpBuilder::create(), mlir::Type::dyn_cast(), mlir::Value::getType(), mlir::Type::isa(), and mlir::Type::isIntOrIndex().

Referenced by mlir::sparse_tensor::SparseTensorLoopEmitter::getLastLevelTensorPointerIndex().

◆ genReshapeDstShape()

void mlir::sparse_tensor::genReshapeDstShape ( Location  loc,
PatternRewriter rewriter,
SmallVector< Value, 4 > &  dstShape,
ArrayRef< Value srcShape,
ArrayRef< int64_t >  staticDstShape,
ArrayRef< ReassociationIndices reassociation 
)

Computes the shape of destination tensor of a reshape operator.

This is only used when operands have dynamic shape. The shape of the destination is stored into dstShape.

Definition at line 450 of file CodegenUtils.cpp.

References constantIndex(), mlir::OpBuilder::create(), and mlir::detail::enumerate().

Referenced by constantDimLevelTypeEncoding().

◆ getIndexOverheadType()

Type mlir::sparse_tensor::getIndexOverheadType ( Builder builder,
const SparseTensorEncodingAttr &  enc 
)

◆ getOneAttr()

mlir::Attribute mlir::sparse_tensor::getOneAttr ( Builder builder,
Type  tp 
)

Generates a 1-valued attribute of the given type.

This supports all the same types as getZeroAttr; however, unlike getZeroAttr, for unsupported types we raise llvm_unreachable rather than returning a null attribute.

Definition at line 420 of file CodegenUtils.cpp.

References mlir::Type::cast(), mlir::Type::dyn_cast(), mlir::DenseElementsAttr::get(), mlir::Builder::getFloatAttr(), mlir::Builder::getIndexAttr(), mlir::Builder::getIntegerAttr(), and mlir::Type::isa().

Referenced by constantOne(), and mlir::sparse_tensor::SparseTensorLoopEmitter::getLastLevelTensorPointerIndex().

◆ getOverheadType()

Type mlir::sparse_tensor::getOverheadType ( Builder builder,
OverheadType  ot 
)

◆ getPointerOverheadType()

Type mlir::sparse_tensor::getPointerOverheadType ( Builder builder,
const SparseTensorEncodingAttr &  enc 
)

◆ getSparseTensorEncoding()

SparseTensorEncodingAttr mlir::sparse_tensor::getSparseTensorEncoding ( Type  type)

◆ indexOverheadTypeEncoding()

OverheadType mlir::sparse_tensor::indexOverheadTypeEncoding ( const SparseTensorEncodingAttr &  enc)

Returns the OverheadType for index overhead storage.

Definition at line 313 of file CodegenUtils.cpp.

References overheadTypeEncoding().

Referenced by getIndexOverheadType(), and mlir::sparse_tensor::SparseTensorLoopEmitter::getLastLevelTensorPointerIndex().

◆ insertYieldOp()

static Value mlir::sparse_tensor::insertYieldOp ( RewriterBase rewriter,
Location  loc,
Region region,
ValueRange  vals 
)
static

◆ isAdmissableBranch()

static bool mlir::sparse_tensor::isAdmissableBranch ( Operation op,
Region region 
)
static

◆ isAdmissableBranchExp()

static bool mlir::sparse_tensor::isAdmissableBranchExp ( Operation op,
Block block,
Value  v 
)
static

Ensures that sparse compiler can generate code for expression.

Definition at line 862 of file Merger.cpp.

References mlir::Value::dyn_cast(), mlir::Operation::getBlock(), mlir::Value::getDefiningOp(), mlir::Operation::getNumOperands(), and mlir::Operation::getOperand().

Referenced by isAdmissableBranch().

◆ isComplexPrimaryType()

constexpr MLIR_SPARSETENSOR_EXPORT bool mlir::sparse_tensor::isComplexPrimaryType ( PrimaryType  valTy)

Definition at line 130 of file Enums.h.

References kC32, and kC64.

Referenced by mlir::sparse_tensor::SparseTensorFile::canReadAs().

◆ isCompressedDim() [1/2]

bool mlir::sparse_tensor::isCompressedDim ( SparseTensorEncodingAttr::DimLevelType  dltp)

◆ isCompressedDim() [2/2]

bool mlir::sparse_tensor::isCompressedDim ( RankedTensorType  type,
uint64_t  d 
)

Convenience method to test for compressed dimension (0 <= d < rank).

Definition at line 268 of file SparseTensorDialect.cpp.

References getSparseTensorEncoding(), and isCompressedDim().

◆ isCompressedDLT()

constexpr MLIR_SPARSETENSOR_EXPORT bool mlir::sparse_tensor::isCompressedDLT ( DimLevelType  dlt)

Check if the DimLevelType is compressed (regardless of properties).

Definition at line 166 of file Enums.h.

References kCompressed, kCompressedNo, kCompressedNu, and kCompressedNuNo.

Referenced by mlir::sparse_tensor::SparseTensorStorageBase::isCompressedDim().

◆ isDenseDim() [1/2]

bool mlir::sparse_tensor::isDenseDim ( SparseTensorEncodingAttr::DimLevelType  dltp)

◆ isDenseDim() [2/2]

bool mlir::sparse_tensor::isDenseDim ( RankedTensorType  type,
uint64_t  d 
)

Convenience method to test for dense dimension (0 <= d < rank).

Definition at line 261 of file SparseTensorDialect.cpp.

References getSparseTensorEncoding(), and isDenseDim().

◆ isDenseDLT()

enum MLIR_SPARSETENSOR_EXPORT enum MLIR_SPARSETENSOR_EXPORT constexpr MLIR_SPARSETENSOR_EXPORT bool mlir::sparse_tensor::isDenseDLT ( DimLevelType  dlt)
strong

Check if the DimLevelType is dense.

Definition at line 161 of file Enums.h.

References kDense.

Referenced by mlir::sparse_tensor::SparseTensorStorageBase::isDenseDim().

◆ isFloatingPrimaryType()

constexpr MLIR_SPARSETENSOR_EXPORT bool mlir::sparse_tensor::isFloatingPrimaryType ( PrimaryType  valTy)

Definition at line 116 of file Enums.h.

References kBF16, and MLIR_SPARSETENSOR_EXPORT.

Referenced by mlir::sparse_tensor::SparseTensorFile::canReadAs().

◆ isIntegralPrimaryType()

constexpr MLIR_SPARSETENSOR_EXPORT bool mlir::sparse_tensor::isIntegralPrimaryType ( PrimaryType  valTy)

Definition at line 121 of file Enums.h.

References kI64, and kI8.

◆ isOrderedDim() [1/2]

bool mlir::sparse_tensor::isOrderedDim ( SparseTensorEncodingAttr::DimLevelType  dltp)

Definition at line 282 of file SparseTensorDialect.cpp.

Referenced by isOrderedDim().

◆ isOrderedDim() [2/2]

bool mlir::sparse_tensor::isOrderedDim ( RankedTensorType  type,
uint64_t  d 
)

Convenience method to test for ordered property in the given dimension (0 <= d < rank).

Definition at line 308 of file SparseTensorDialect.cpp.

References getSparseTensorEncoding(), and isOrderedDim().

◆ isOrderedDLT()

constexpr MLIR_SPARSETENSOR_EXPORT bool mlir::sparse_tensor::isOrderedDLT ( DimLevelType  dlt)

Check if the DimLevelType is ordered (regardless of storage format).

Definition at line 192 of file Enums.h.

References kCompressedNo, kCompressedNuNo, kSingletonNo, and kSingletonNuNo.

Referenced by mlir::sparse_tensor::SparseTensorStorageBase::isOrderedDim().

◆ isRealPrimaryType()

constexpr MLIR_SPARSETENSOR_EXPORT bool mlir::sparse_tensor::isRealPrimaryType ( PrimaryType  valTy)

Definition at line 125 of file Enums.h.

References kI8, and MLIR_SPARSETENSOR_EXPORT.

Referenced by mlir::sparse_tensor::SparseTensorFile::canReadAs().

◆ isSingletonDim() [1/2]

bool mlir::sparse_tensor::isSingletonDim ( SparseTensorEncodingAttr::DimLevelType  dltp)

◆ isSingletonDim() [2/2]

bool mlir::sparse_tensor::isSingletonDim ( RankedTensorType  type,
uint64_t  d 
)

Convenience method to test for singleton dimension (0 <= d < rank).

Definition at line 275 of file SparseTensorDialect.cpp.

References getSparseTensorEncoding(), and isSingletonDim().

◆ isSingletonDLT()

constexpr MLIR_SPARSETENSOR_EXPORT bool mlir::sparse_tensor::isSingletonDLT ( DimLevelType  dlt)

Check if the DimLevelType is singleton (regardless of properties).

Definition at line 179 of file Enums.h.

References kSingleton, kSingletonNo, kSingletonNu, and kSingletonNuNo.

Referenced by mlir::sparse_tensor::SparseTensorStorageBase::isSingletonDim().

◆ isUniqueDim() [1/2]

bool mlir::sparse_tensor::isUniqueDim ( SparseTensorEncodingAttr::DimLevelType  dltp)

Definition at line 295 of file SparseTensorDialect.cpp.

Referenced by isUniqueDim().

◆ isUniqueDim() [2/2]

bool mlir::sparse_tensor::isUniqueDim ( RankedTensorType  type,
uint64_t  d 
)

Convenience method to test for unique property in the given dimension (0 <= d < rank).

Definition at line 315 of file SparseTensorDialect.cpp.

References getSparseTensorEncoding(), and isUniqueDim().

◆ isUniqueDLT()

constexpr MLIR_SPARSETENSOR_EXPORT bool mlir::sparse_tensor::isUniqueDLT ( DimLevelType  dlt)

Check if the DimLevelType is unique (regardless of storage format).

Definition at line 205 of file Enums.h.

References kCompressedNu, kCompressedNuNo, kSingletonNu, and kSingletonNuNo.

Referenced by mlir::sparse_tensor::SparseTensorStorageBase::isUniqueDim().

◆ kindToOpSymbol()

static const char* mlir::sparse_tensor::kindToOpSymbol ( Kind  kind)
static

Definition at line 396 of file Merger.cpp.

◆ openSparseTensorCOO()

template<typename V >
SparseTensorCOO<V>* mlir::sparse_tensor::openSparseTensorCOO ( const char *  filename,
uint64_t  rank,
const uint64_t *  shape,
const uint64_t *  perm,
PrimaryType  valTp 
)
inline

◆ overheadTypeEncoding() [1/2]

OverheadType mlir::sparse_tensor::overheadTypeEncoding ( unsigned  width)

◆ overheadTypeEncoding() [2/2]

OverheadType mlir::sparse_tensor::overheadTypeEncoding ( Type  tp)

Converts an overhead storage type to its internal type-encoding.

Definition at line 284 of file CodegenUtils.cpp.

References mlir::Type::dyn_cast(), mlir::Type::isIndex(), kIndex, and overheadTypeEncoding().

◆ overheadTypeFunctionSuffix() [1/2]

StringRef mlir::sparse_tensor::overheadTypeFunctionSuffix ( OverheadType  ot)

Convert OverheadType to its function-name suffix.

Definition at line 332 of file CodegenUtils.cpp.

References CASE, kIndex, and MLIR_SPARSETENSOR_FOREVERY_FIXED_O.

Referenced by mlir::sparse_tensor::SparseTensorLoopEmitter::getLastLevelTensorPointerIndex(), and overheadTypeFunctionSuffix().

◆ overheadTypeFunctionSuffix() [2/2]

StringRef mlir::sparse_tensor::overheadTypeFunctionSuffix ( Type  overheadTp)

Converts an overhead storage type to its function-name suffix.

Definition at line 345 of file CodegenUtils.cpp.

References overheadTypeEncoding(), and overheadTypeFunctionSuffix().

◆ pointerOverheadTypeEncoding()

OverheadType mlir::sparse_tensor::pointerOverheadTypeEncoding ( const SparseTensorEncodingAttr &  enc)

Returns the OverheadType for pointer overhead storage.

Definition at line 308 of file CodegenUtils.cpp.

References overheadTypeEncoding().

Referenced by mlir::sparse_tensor::SparseTensorLoopEmitter::getLastLevelTensorPointerIndex(), and getPointerOverheadType().

◆ primaryTypeEncoding()

PrimaryType mlir::sparse_tensor::primaryTypeEncoding ( Type  elemTp)

◆ primaryTypeFunctionSuffix() [1/2]

StringRef mlir::sparse_tensor::primaryTypeFunctionSuffix ( PrimaryType  pt)

Convert PrimaryType to its function-name suffix.

Definition at line 376 of file CodegenUtils.cpp.

References CASE, and MLIR_SPARSETENSOR_FOREVERY_V.

Referenced by mlir::sparse_tensor::SparseTensorLoopEmitter::getLastLevelTensorPointerIndex(), and primaryTypeFunctionSuffix().

◆ primaryTypeFunctionSuffix() [2/2]

StringRef mlir::sparse_tensor::primaryTypeFunctionSuffix ( Type  elemTp)

Converts a primary storage type to its function-name suffix.

Definition at line 387 of file CodegenUtils.cpp.

References primaryTypeEncoding(), and primaryTypeFunctionSuffix().

◆ registerBufferizableOpInterfaceExternalModels()

void mlir::sparse_tensor::registerBufferizableOpInterfaceExternalModels ( DialectRegistry registry)

◆ registerSparseTensorPipelines()

void mlir::sparse_tensor::registerSparseTensorPipelines ( )

Registers all pipelines for the sparse_tensor dialect.

At present, this includes only "sparse-compiler".

Definition at line 95 of file SparseTensorPipelines.cpp.

References buildSparseCompiler().

Referenced by mlir::sparse_tensor::SparseCompilerOptions::lowerVectorToLLVMOptions(), and mlir::registerAllPasses().

◆ toOrigDim() [1/2]

uint64_t mlir::sparse_tensor::toOrigDim ( const SparseTensorEncodingAttr &  enc,
uint64_t  d 
)

◆ toOrigDim() [2/2]

uint64_t mlir::sparse_tensor::toOrigDim ( RankedTensorType  type,
uint64_t  d 
)

Convenience method to translate the given stored dimension to the original dimension (0 <= d < rank).

Definition at line 346 of file SparseTensorDialect.cpp.

References getSparseTensorEncoding(), and toOrigDim().

◆ toStoredDim() [1/2]

uint64_t mlir::sparse_tensor::toStoredDim ( const SparseTensorEncodingAttr &  enc,
uint64_t  d 
)

Definition at line 334 of file SparseTensorDialect.cpp.

Referenced by getUnorderedCOOFromType(), and toStoredDim().

◆ toStoredDim() [2/2]

uint64_t mlir::sparse_tensor::toStoredDim ( RankedTensorType  type,
uint64_t  d 
)

Convenience method to translate the given original dimension to the stored dimension (0 <= d < rank).

Definition at line 351 of file SparseTensorDialect.cpp.

References getSparseTensorEncoding(), and toStoredDim().

◆ translateIndicesArray()

void mlir::sparse_tensor::translateIndicesArray ( OpBuilder builder,
Location  loc,
ArrayRef< ReassociationIndices reassociation,
ValueRange  srcIndices,
ArrayRef< Value srcShape,
ArrayRef< Value dstShape,
SmallVectorImpl< Value > &  dstIndices 
)

Helper method to translate indices during a reshaping operation.

Definition at line 505 of file CodegenUtils.cpp.

References constantIndex(), mlir::OpBuilder::create(), and mlir::detail::enumerate().

Referenced by constantDimLevelTypeEncoding().

◆ writeExtFROSTT()

template<typename V >
void mlir::sparse_tensor::writeExtFROSTT ( const SparseTensorCOO< V > &  coo,
const char *  filename 
)
inline

Writes the sparse tensor to filename in extended FROSTT format.

Definition at line 237 of file File.h.

References mlir::sparse_tensor::SparseTensorCOO< V >::getDimSizes(), mlir::sparse_tensor::SparseTensorCOO< V >::getElements(), and mlir::sparse_tensor::SparseTensorCOO< V >::getRank().

Variable Documentation

◆ Action

enum MLIR_SPARSETENSOR_EXPORT mlir::sparse_tensor::Action
strong

The actions performed by .

Definition at line 135 of file Enums.h.

◆ DimLevelType

enum MLIR_SPARSETENSOR_EXPORT enum MLIR_SPARSETENSOR_EXPORT mlir::sparse_tensor::DimLevelType
strong

This enum mimics SparseTensorEncodingAttr::DimLevelType for breaking dependency cycles.

SparseTensorEncodingAttr::DimLevelType is the source of truth and this enum should be kept consistent with it.

Definition at line 148 of file Enums.h.

Referenced by mlir::sparse_tensor::SparseTensorLoopEmitter::getLastLevelTensorPointerIndex().

◆ kBF16

enum MLIR_SPARSETENSOR_EXPORT mlir::sparse_tensor::kBF16 = 4
strong

Definition at line 93 of file Enums.h.

Referenced by isFloatingPrimaryType(), and primaryTypeEncoding().

◆ kC32

enum MLIR_SPARSETENSOR_EXPORT mlir::sparse_tensor::kC32
strong
Initial value:
= 10
}

Definition at line 99 of file Enums.h.

Referenced by isComplexPrimaryType(), and primaryTypeEncoding().

◆ kC64

enum MLIR_SPARSETENSOR_EXPORT mlir::sparse_tensor::kC64 = 9
strong

Definition at line 98 of file Enums.h.

Referenced by isComplexPrimaryType(), and primaryTypeEncoding().

◆ kCompressed

enum MLIR_SPARSETENSOR_EXPORT enum MLIR_SPARSETENSOR_EXPORT mlir::sparse_tensor::kCompressed = 1
strong

Definition at line 150 of file Enums.h.

◆ kCompressedNo

enum MLIR_SPARSETENSOR_EXPORT enum MLIR_SPARSETENSOR_EXPORT mlir::sparse_tensor::kCompressedNo = 3
strong

Definition at line 152 of file Enums.h.

Referenced by dimLevelTypeEncoding(), isCompressedDLT(), and isOrderedDLT().

◆ kCompressedNu

enum MLIR_SPARSETENSOR_EXPORT enum MLIR_SPARSETENSOR_EXPORT mlir::sparse_tensor::kCompressedNu = 2
strong

Definition at line 151 of file Enums.h.

Referenced by dimLevelTypeEncoding(), isCompressedDLT(), and isUniqueDLT().

◆ kCompressedNuNo

enum MLIR_SPARSETENSOR_EXPORT enum MLIR_SPARSETENSOR_EXPORT mlir::sparse_tensor::kCompressedNuNo = 4
strong

Definition at line 153 of file Enums.h.

Referenced by dimLevelTypeEncoding(), isCompressedDLT(), isOrderedDLT(), and isUniqueDLT().

◆ kEmptyCOO

enum MLIR_SPARSETENSOR_EXPORT mlir::sparse_tensor::kEmptyCOO = 4
strong

Definition at line 140 of file Enums.h.

◆ kF16

enum MLIR_SPARSETENSOR_EXPORT mlir::sparse_tensor::kF16 = 3
strong

Definition at line 92 of file Enums.h.

Referenced by primaryTypeEncoding().

◆ kF32

enum MLIR_SPARSETENSOR_EXPORT mlir::sparse_tensor::kF32 = 2
strong

Definition at line 91 of file Enums.h.

Referenced by primaryTypeEncoding().

◆ kFromCOO

enum MLIR_SPARSETENSOR_EXPORT mlir::sparse_tensor::kFromCOO = 2
strong

Definition at line 138 of file Enums.h.

◆ kFromFile

enum MLIR_SPARSETENSOR_EXPORT mlir::sparse_tensor::kFromFile = 1
strong

Definition at line 137 of file Enums.h.

◆ kI16

enum MLIR_SPARSETENSOR_EXPORT mlir::sparse_tensor::kI16 = 7
strong

Definition at line 96 of file Enums.h.

Referenced by primaryTypeEncoding().

◆ kI32

enum MLIR_SPARSETENSOR_EXPORT mlir::sparse_tensor::kI32 = 6
strong

Definition at line 95 of file Enums.h.

Referenced by primaryTypeEncoding().

◆ kI64

enum MLIR_SPARSETENSOR_EXPORT mlir::sparse_tensor::kI64 = 5
strong

Definition at line 94 of file Enums.h.

Referenced by isIntegralPrimaryType(), and primaryTypeEncoding().

◆ kI8

enum MLIR_SPARSETENSOR_EXPORT mlir::sparse_tensor::kI8 = 8
strong

Definition at line 97 of file Enums.h.

Referenced by isIntegralPrimaryType(), isRealPrimaryType(), and primaryTypeEncoding().

◆ kSingleton

enum MLIR_SPARSETENSOR_EXPORT enum MLIR_SPARSETENSOR_EXPORT mlir::sparse_tensor::kSingleton = 5
strong

Definition at line 154 of file Enums.h.

◆ kSingletonNo

enum MLIR_SPARSETENSOR_EXPORT enum MLIR_SPARSETENSOR_EXPORT mlir::sparse_tensor::kSingletonNo = 7
strong

Definition at line 156 of file Enums.h.

Referenced by dimLevelTypeEncoding(), isOrderedDLT(), and isSingletonDLT().

◆ kSingletonNu

enum MLIR_SPARSETENSOR_EXPORT enum MLIR_SPARSETENSOR_EXPORT mlir::sparse_tensor::kSingletonNu = 6
strong

Definition at line 155 of file Enums.h.

Referenced by dimLevelTypeEncoding(), isSingletonDLT(), and isUniqueDLT().

◆ kSingletonNuNo

enum MLIR_SPARSETENSOR_EXPORT enum MLIR_SPARSETENSOR_EXPORT mlir::sparse_tensor::kSingletonNuNo = 8
strong

Definition at line 157 of file Enums.h.

Referenced by dimLevelTypeEncoding(), isOrderedDLT(), isSingletonDLT(), and isUniqueDLT().

◆ kSparseToSparse

enum MLIR_SPARSETENSOR_EXPORT mlir::sparse_tensor::kSparseToSparse = 3
strong

Definition at line 139 of file Enums.h.

◆ kToCOO

enum MLIR_SPARSETENSOR_EXPORT mlir::sparse_tensor::kToCOO = 5
strong

Definition at line 141 of file Enums.h.

◆ kToIterator

enum MLIR_SPARSETENSOR_EXPORT mlir::sparse_tensor::kToIterator = 6
strong

Definition at line 142 of file Enums.h.

◆ kU16

enum MLIR_SPARSETENSOR_EXPORT mlir::sparse_tensor::kU16 = 3
strong

Definition at line 62 of file Enums.h.

Referenced by getOverheadType(), and overheadTypeEncoding().

◆ kU32

enum MLIR_SPARSETENSOR_EXPORT mlir::sparse_tensor::kU32 = 2
strong

Definition at line 61 of file Enums.h.

Referenced by getOverheadType(), and overheadTypeEncoding().

◆ kU64

enum MLIR_SPARSETENSOR_EXPORT mlir::sparse_tensor::kU64 = 1
strong

Definition at line 60 of file Enums.h.

Referenced by getOverheadType(), and overheadTypeEncoding().

◆ kU8

enum MLIR_SPARSETENSOR_EXPORT mlir::sparse_tensor::kU8
strong
Initial value:
= 4
}

Definition at line 63 of file Enums.h.

Referenced by getOverheadType(), and overheadTypeEncoding().

◆ OverheadType

enum MLIR_SPARSETENSOR_EXPORT mlir::sparse_tensor::OverheadType
strong

Encoding of overhead types (both pointer overhead and indices overhead), for "overloading" .

Definition at line 58 of file Enums.h.

Referenced by mlir::sparse_tensor::SparseTensorLoopEmitter::getLastLevelTensorPointerIndex().

◆ PrimaryType

enum MLIR_SPARSETENSOR_EXPORT mlir::sparse_tensor::PrimaryType
strong

Encoding of the elemental type, for "overloading" .

Definition at line 89 of file Enums.h.

Referenced by mlir::sparse_tensor::SparseTensorLoopEmitter::getLastLevelTensorPointerIndex(), and mlir::sparse_tensor::SparseTensorFile::isValid().