MLIR
17.0.0git
|
#include "mlir-c/AffineMap.h"
#include "mlir-c/IR.h"
#include "mlir/Dialect/SparseTensor/Transforms/Passes.capi.h.inc"
Go to the source code of this file.
Enumerations | |
enum | MlirSparseTensorDimLevelType { MLIR_SPARSE_TENSOR_DIM_LEVEL_DENSE = 4 , MLIR_SPARSE_TENSOR_DIM_LEVEL_COMPRESSED = 8 , MLIR_SPARSE_TENSOR_DIM_LEVEL_COMPRESSED_NU = 9 , MLIR_SPARSE_TENSOR_DIM_LEVEL_COMPRESSED_NO = 10 , MLIR_SPARSE_TENSOR_DIM_LEVEL_COMPRESSED_NU_NO = 11 , MLIR_SPARSE_TENSOR_DIM_LEVEL_SINGLETON = 16 , MLIR_SPARSE_TENSOR_DIM_LEVEL_SINGLETON_NU = 17 , MLIR_SPARSE_TENSOR_DIM_LEVEL_SINGLETON_NO = 18 , MLIR_SPARSE_TENSOR_DIM_LEVEL_SINGLETON_NU_NO = 19 } |
Dimension level types (and properties) that define sparse tensors. More... | |
Functions | |
MLIR_DECLARE_CAPI_DIALECT_REGISTRATION (SparseTensor, sparse_tensor) | |
MLIR_CAPI_EXPORTED bool | mlirAttributeIsASparseTensorEncodingAttr (MlirAttribute attr) |
Checks whether the given attribute is a sparse_tensor.encoding attribute. More... | |
MLIR_CAPI_EXPORTED MlirAttribute | mlirSparseTensorEncodingAttrGet (MlirContext ctx, intptr_t lvlRank, enum MlirSparseTensorDimLevelType const *dimLevelTypes, MlirAffineMap dimOrdering, MlirAffineMap higherOrdering, int posWidth, int crdWidth) |
Creates a sparse_tensor.encoding attribute with the given parameters. More... | |
MLIR_CAPI_EXPORTED intptr_t | mlirSparseTensorEncodingGetLvlRank (MlirAttribute attr) |
Returns the level-rank of the sparse_tensor.encoding attribute. More... | |
MLIR_CAPI_EXPORTED enum MlirSparseTensorDimLevelType | mlirSparseTensorEncodingAttrGetDimLevelType (MlirAttribute attr, intptr_t lvl) |
Returns a specified level-type of the sparse_tensor.encoding attribute. More... | |
MLIR_CAPI_EXPORTED MlirAffineMap | mlirSparseTensorEncodingAttrGetDimOrdering (MlirAttribute attr) |
Returns the dimension-ordering of the sparse_tensor.encoding attribute. More... | |
MLIR_CAPI_EXPORTED MlirAffineMap | mlirSparseTensorEncodingAttrGetHigherOrdering (MlirAttribute attr) |
Returns the higher-ordering of the sparse_tensor.encoding attribute. More... | |
MLIR_CAPI_EXPORTED int | mlirSparseTensorEncodingAttrGetPosWidth (MlirAttribute attr) |
Returns the position bitwidth of the sparse_tensor.encoding attribute. More... | |
MLIR_CAPI_EXPORTED int | mlirSparseTensorEncodingAttrGetCrdWidth (MlirAttribute attr) |
Returns the coordinate bitwidth of the sparse_tensor.encoding attribute. More... | |
Dimension level types (and properties) that define sparse tensors.
See the documentation in SparseTensorAttrDefs.td for their meaning.
These correspond to SparseTensorEncodingAttr::DimLevelType in the C++ API. If updating, keep them in sync and update the static_assert in the impl file.
Definition at line 28 of file SparseTensor.h.
MLIR_DECLARE_CAPI_DIALECT_REGISTRATION | ( | SparseTensor | , |
sparse_tensor | |||
) |
MLIR_CAPI_EXPORTED bool mlirAttributeIsASparseTensorEncodingAttr | ( | MlirAttribute | attr | ) |
Checks whether the given attribute is a sparse_tensor.encoding
attribute.
Definition at line 44 of file SparseTensor.cpp.
References unwrap().
Referenced by populateDialectSparseTensorSubmodule().
MLIR_CAPI_EXPORTED MlirAttribute mlirSparseTensorEncodingAttrGet | ( | MlirContext | ctx, |
intptr_t | lvlRank, | ||
enum MlirSparseTensorDimLevelType const * | dimLevelTypes, | ||
MlirAffineMap | dimOrdering, | ||
MlirAffineMap | higherOrdering, | ||
int | posWidth, | ||
int | crdWidth | ||
) |
Creates a sparse_tensor.encoding
attribute with the given parameters.
Referenced by populateDialectSparseTensorSubmodule().
MLIR_CAPI_EXPORTED int mlirSparseTensorEncodingAttrGetCrdWidth | ( | MlirAttribute | attr | ) |
Returns the coordinate bitwidth of the sparse_tensor.encoding
attribute.
Definition at line 86 of file SparseTensor.cpp.
References unwrap().
Referenced by populateDialectSparseTensorSubmodule().
MLIR_CAPI_EXPORTED enum MlirSparseTensorDimLevelType mlirSparseTensorEncodingAttrGetDimLevelType | ( | MlirAttribute | attr, |
intptr_t | lvl | ||
) |
Returns a specified level-type of the sparse_tensor.encoding
attribute.
Definition at line 77 of file SparseTensor.cpp.
References unwrap().
Referenced by populateDialectSparseTensorSubmodule().
MLIR_CAPI_EXPORTED MlirAffineMap mlirSparseTensorEncodingAttrGetDimOrdering | ( | MlirAttribute | attr | ) |
Returns the dimension-ordering of the sparse_tensor.encoding
attribute.
Definition at line 62 of file SparseTensor.cpp.
References unwrap(), and wrap().
Referenced by populateDialectSparseTensorSubmodule().
MLIR_CAPI_EXPORTED MlirAffineMap mlirSparseTensorEncodingAttrGetHigherOrdering | ( | MlirAttribute | attr | ) |
Returns the higher-ordering of the sparse_tensor.encoding
attribute.
Definition at line 67 of file SparseTensor.cpp.
References unwrap(), and wrap().
Referenced by populateDialectSparseTensorSubmodule().
MLIR_CAPI_EXPORTED int mlirSparseTensorEncodingAttrGetPosWidth | ( | MlirAttribute | attr | ) |
Returns the position bitwidth of the sparse_tensor.encoding
attribute.
Definition at line 82 of file SparseTensor.cpp.
References unwrap().
Referenced by populateDialectSparseTensorSubmodule().
MLIR_CAPI_EXPORTED intptr_t mlirSparseTensorEncodingGetLvlRank | ( | MlirAttribute | attr | ) |
Returns the level-rank of the sparse_tensor.encoding
attribute.
Definition at line 72 of file SparseTensor.cpp.
References unwrap().
Referenced by populateDialectSparseTensorSubmodule().