|
MLIR 22.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. | |
| MlirAttribute | mlirSparseTensorEncodingAttrGet (MlirContext ctx, intptr_t lvlRank, MlirSparseTensorLevelType const *lvlTypes, MlirAffineMap dimToLvl, MlirAffineMap lvlToDim, int posWidth, int crdWidth, MlirAttribute explicitVal, MlirAttribute implicitVal) |
| Creates a sparse_tensor.encoding attribute with the given parameters. | |
| MlirAffineMap | mlirSparseTensorEncodingAttrGetDimToLvl (MlirAttribute attr) |
| Returns the dimension-to-level mapping of the sparse_tensor.encoding attribute. | |
| MlirAffineMap | mlirSparseTensorEncodingAttrGetLvlToDim (MlirAttribute attr) |
| Returns the level-to-dimension mapping of the sparse_tensor.encoding attribute. | |
| intptr_t | mlirSparseTensorEncodingGetLvlRank (MlirAttribute attr) |
| Returns the level-rank of the sparse_tensor.encoding attribute. | |
| MlirSparseTensorLevelType | mlirSparseTensorEncodingAttrGetLvlType (MlirAttribute attr, intptr_t lvl) |
| Returns a specified level-type of the sparse_tensor.encoding attribute. | |
| enum MlirSparseTensorLevelFormat | mlirSparseTensorEncodingAttrGetLvlFmt (MlirAttribute attr, intptr_t lvl) |
| Returns a specified level-format of the sparse_tensor.encoding attribute. | |
| int | mlirSparseTensorEncodingAttrGetPosWidth (MlirAttribute attr) |
| Returns the position bitwidth of the sparse_tensor.encoding attribute. | |
| int | mlirSparseTensorEncodingAttrGetCrdWidth (MlirAttribute attr) |
| Returns the coordinate bitwidth of the sparse_tensor.encoding attribute. | |
| MlirAttribute | mlirSparseTensorEncodingAttrGetExplicitVal (MlirAttribute attr) |
| Returns the explicit value of the sparse_tensor.encoding attribute. | |
| MlirAttribute | mlirSparseTensorEncodingAttrGetImplicitVal (MlirAttribute attr) |
| Returns the implicit value of the sparse_tensor.encoding attribute. | |
| 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 | ) |
References mlir::sparse_tensor::Compressed, mlir::sparse_tensor::Dense, mlir::sparse_tensor::LooseCompressed, MLIR_SPARSE_TENSOR_LEVEL_COMPRESSED, MLIR_SPARSE_TENSOR_LEVEL_DENSE, MLIR_SPARSE_TENSOR_LEVEL_LOOSE_COMPRESSED, MLIR_SPARSE_TENSOR_LEVEL_N_OUT_OF_M, MLIR_SPARSE_TENSOR_LEVEL_SINGLETON, mlir::sparse_tensor::NOutOfM, and mlir::sparse_tensor::Singleton.
| bool mlirAttributeIsASparseTensorEncodingAttr | ( | MlirAttribute | attr | ) |
Checks whether the given attribute is a sparse_tensor.encoding attribute.
Definition at line 45 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 106 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, | ||
| MlirAttribute | explicitVal, | ||
| MlirAttribute | implicitVal ) |
Creates a sparse_tensor.encoding attribute with the given parameters.
Definition at line 49 of file SparseTensor.cpp.
References unwrap(), and wrap().
Referenced by populateDialectSparseTensorSubmodule().
| int mlirSparseTensorEncodingAttrGetCrdWidth | ( | MlirAttribute | attr | ) |
Returns the coordinate bitwidth of the sparse_tensor.encoding attribute.
Definition at line 94 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 65 of file SparseTensor.cpp.
References unwrap(), and wrap().
Referenced by populateDialectSparseTensorSubmodule().
| MlirAttribute mlirSparseTensorEncodingAttrGetExplicitVal | ( | MlirAttribute | attr | ) |
Returns the explicit value of the sparse_tensor.encoding attribute.
Definition at line 98 of file SparseTensor.cpp.
References unwrap(), and wrap().
Referenced by populateDialectSparseTensorSubmodule().
| MlirAttribute mlirSparseTensorEncodingAttrGetImplicitVal | ( | MlirAttribute | attr | ) |
Returns the implicit value of the sparse_tensor.encoding attribute.
Definition at line 102 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 84 of file SparseTensor.cpp.
References mlir::sparse_tensor::LevelType::getLvlFmt(), and mlirSparseTensorEncodingAttrGetLvlType().
Referenced by populateDialectSparseTensorSubmodule().
| MlirAffineMap mlirSparseTensorEncodingAttrGetLvlToDim | ( | MlirAttribute | attr | ) |
Returns the level-to-dimension mapping of the sparse_tensor.encoding attribute.
Definition at line 69 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 78 of file SparseTensor.cpp.
References unwrap().
Referenced by mlirSparseTensorEncodingAttrGetLvlFmt(), and populateDialectSparseTensorSubmodule().
| int mlirSparseTensorEncodingAttrGetPosWidth | ( | MlirAttribute | attr | ) |
Returns the position bitwidth of the sparse_tensor.encoding attribute.
Definition at line 90 of file SparseTensor.cpp.
References unwrap().
Referenced by populateDialectSparseTensorSubmodule().
| unsigned mlirSparseTensorEncodingAttrGetStructuredM | ( | MlirSparseTensorLevelType | lvlType | ) |
Definition at line 126 of file SparseTensor.cpp.
References mlir::sparse_tensor::getM().
Referenced by populateDialectSparseTensorSubmodule().
| unsigned mlirSparseTensorEncodingAttrGetStructuredN | ( | MlirSparseTensorLevelType | lvlType | ) |
Definition at line 121 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 73 of file SparseTensor.cpp.
References unwrap().
Referenced by populateDialectSparseTensorSubmodule().