MLIR
19.0.0git
|
#include "mlir-c/Dialect/SparseTensor.h"
#include "mlir-c/IR.h"
#include "mlir/CAPI/AffineMap.h"
#include "mlir/CAPI/Registration.h"
#include "mlir/Dialect/SparseTensor/IR/SparseTensor.h"
#include "mlir/Support/LLVM.h"
Go to the source code of this file.
Functions | |
MLIR_DEFINE_CAPI_DIALECT_REGISTRATION (SparseTensor, sparse_tensor, mlir::sparse_tensor::SparseTensorDialect) static_assert(static_cast< int >(MLIR_SPARSE_TENSOR_LEVEL_DENSE) | |
MlirSparseTensorLevelFormat (C-API) and LevelFormat(C++) mismatch") | |
bool | mlirAttributeIsASparseTensorEncodingAttr (MlirAttribute attr) |
Checks whether the given attribute is a sparse_tensor.encoding attribute. More... | |
MlirAttribute | mlirSparseTensorEncodingAttrGet (MlirContext ctx, intptr_t lvlRank, MlirSparseTensorLevelType const *lvlTypes, MlirAffineMap dimToLvl, MlirAffineMap lvlToDim, int posWidth, int crdWidth) |
Creates a sparse_tensor.encoding attribute with the given parameters. More... | |
MlirAffineMap | mlirSparseTensorEncodingAttrGetDimToLvl (MlirAttribute attr) |
Returns the dimension-to-level mapping of the sparse_tensor.encoding attribute. More... | |
MlirAffineMap | mlirSparseTensorEncodingAttrGetLvlToDim (MlirAttribute attr) |
Returns the level-to-dimension mapping of the sparse_tensor.encoding attribute. More... | |
intptr_t | mlirSparseTensorEncodingGetLvlRank (MlirAttribute attr) |
Returns the level-rank of the sparse_tensor.encoding attribute. More... | |
MlirSparseTensorLevelType | mlirSparseTensorEncodingAttrGetLvlType (MlirAttribute attr, intptr_t lvl) |
Returns a specified level-type of the sparse_tensor.encoding attribute. More... | |
enum MlirSparseTensorLevelFormat | mlirSparseTensorEncodingAttrGetLvlFmt (MlirAttribute attr, intptr_t lvl) |
Returns a specified level-format of the sparse_tensor.encoding attribute. More... | |
int | mlirSparseTensorEncodingAttrGetPosWidth (MlirAttribute attr) |
Returns the position bitwidth of the sparse_tensor.encoding attribute. More... | |
int | mlirSparseTensorEncodingAttrGetCrdWidth (MlirAttribute attr) |
Returns the coordinate bitwidth of the sparse_tensor.encoding attribute. More... | |
MlirSparseTensorLevelType | mlirSparseTensorEncodingAttrBuildLvlType (enum MlirSparseTensorLevelFormat lvlFmt, const enum MlirSparseTensorLevelPropertyNondefault *properties, unsigned size, unsigned n, unsigned m) |
unsigned | mlirSparseTensorEncodingAttrGetStructuredN (MlirSparseTensorLevelType lvlType) |
unsigned | mlirSparseTensorEncodingAttrGetStructuredM (MlirSparseTensorLevelType lvlType) |
MLIR_DEFINE_CAPI_DIALECT_REGISTRATION | ( | SparseTensor | , |
sparse_tensor | , | ||
mlir::sparse_tensor::SparseTensorDialect | |||
) |
bool mlirAttributeIsASparseTensorEncodingAttr | ( | MlirAttribute | attr | ) |
Checks whether the given attribute is a sparse_tensor.encoding
attribute.
Definition at line 43 of file SparseTensor.cpp.
References unwrap().
Referenced by populateDialectSparseTensorSubmodule().
MlirSparseTensorLevelType mlirSparseTensorEncodingAttrBuildLvlType | ( | enum MlirSparseTensorLevelFormat | lvlFmt, |
const enum MlirSparseTensorLevelPropertyNondefault * | properties, | ||
unsigned | size, | ||
unsigned | n, | ||
unsigned | m | ||
) |
Definition at line 94 of file SparseTensor.cpp.
References mlir::sparse_tensor::buildLevelType().
Referenced by populateDialectSparseTensorSubmodule().
MlirAttribute mlirSparseTensorEncodingAttrGet | ( | MlirContext | ctx, |
intptr_t | lvlRank, | ||
MlirSparseTensorLevelType const * | lvlTypes, | ||
MlirAffineMap | dimToLvl, | ||
MlirAffineMap | lvlToDim, | ||
int | posWidth, | ||
int | crdWidth | ||
) |
Creates a sparse_tensor.encoding
attribute with the given parameters.
Definition at line 48 of file SparseTensor.cpp.
References mlir::get(), unwrap(), and wrap().
Referenced by populateDialectSparseTensorSubmodule().
int mlirSparseTensorEncodingAttrGetCrdWidth | ( | MlirAttribute | attr | ) |
Returns the coordinate bitwidth of the sparse_tensor.encoding
attribute.
Definition at line 90 of file SparseTensor.cpp.
References unwrap().
Referenced by populateDialectSparseTensorSubmodule().
MlirAffineMap mlirSparseTensorEncodingAttrGetDimToLvl | ( | MlirAttribute | attr | ) |
Returns the dimension-to-level mapping of the sparse_tensor.encoding
attribute.
Definition at line 61 of file SparseTensor.cpp.
References unwrap(), and wrap().
Referenced by populateDialectSparseTensorSubmodule().
enum MlirSparseTensorLevelFormat mlirSparseTensorEncodingAttrGetLvlFmt | ( | MlirAttribute | attr, |
intptr_t | lvl | ||
) |
Returns a specified level-format of the sparse_tensor.encoding
attribute.
Definition at line 74 of file SparseTensor.cpp.
References unwrap().
Referenced by populateDialectSparseTensorSubmodule().
MlirAffineMap mlirSparseTensorEncodingAttrGetLvlToDim | ( | MlirAttribute | attr | ) |
Returns the level-to-dimension mapping of the sparse_tensor.encoding
attribute.
Definition at line 65 of file SparseTensor.cpp.
References unwrap(), and wrap().
Referenced by populateDialectSparseTensorSubmodule().
MlirSparseTensorLevelType mlirSparseTensorEncodingAttrGetLvlType | ( | MlirAttribute | attr, |
intptr_t | lvl | ||
) |
Returns a specified level-type of the sparse_tensor.encoding
attribute.
Definition at line 74 of file SparseTensor.cpp.
Referenced by populateDialectSparseTensorSubmodule().
int mlirSparseTensorEncodingAttrGetPosWidth | ( | MlirAttribute | attr | ) |
Returns the position bitwidth of the sparse_tensor.encoding
attribute.
Definition at line 86 of file SparseTensor.cpp.
References unwrap().
Referenced by populateDialectSparseTensorSubmodule().
unsigned mlirSparseTensorEncodingAttrGetStructuredM | ( | MlirSparseTensorLevelType | lvlType | ) |
Definition at line 113 of file SparseTensor.cpp.
References mlir::sparse_tensor::getM().
Referenced by populateDialectSparseTensorSubmodule().
unsigned mlirSparseTensorEncodingAttrGetStructuredN | ( | MlirSparseTensorLevelType | lvlType | ) |
Definition at line 108 of file SparseTensor.cpp.
References mlir::sparse_tensor::getN().
Referenced by populateDialectSparseTensorSubmodule().
intptr_t mlirSparseTensorEncodingGetLvlRank | ( | MlirAttribute | attr | ) |
Returns the level-rank of the sparse_tensor.encoding
attribute.
Definition at line 69 of file SparseTensor.cpp.
References unwrap().
Referenced by populateDialectSparseTensorSubmodule().
MlirSparseTensorLevelFormat | ( | C- | API | ) |