MLIR
17.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_DIM_LEVEL_DENSE) | |
MlirSparseTensorDimLevelType (C-API) and DimLevelType(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, MlirSparseTensorDimLevelType const *dimLevelTypes, MlirAffineMap dimOrdering, MlirAffineMap higherOrdering, int posWidth, int crdWidth) |
MlirAffineMap | mlirSparseTensorEncodingAttrGetDimOrdering (MlirAttribute attr) |
Returns the dimension-ordering of the sparse_tensor.encoding attribute. More... | |
MlirAffineMap | mlirSparseTensorEncodingAttrGetHigherOrdering (MlirAttribute attr) |
Returns the higher-ordering of the sparse_tensor.encoding attribute. More... | |
intptr_t | mlirSparseTensorEncodingGetLvlRank (MlirAttribute attr) |
Returns the level-rank of the sparse_tensor.encoding attribute. More... | |
MlirSparseTensorDimLevelType | mlirSparseTensorEncodingAttrGetDimLevelType (MlirAttribute attr, intptr_t lvl) |
Returns a specified level-type 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... | |
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 44 of file SparseTensor.cpp.
References unwrap().
Referenced by populateDialectSparseTensorSubmodule().
MlirSparseTensorDimLevelType | ( | C- | API | ) |
MlirAttribute mlirSparseTensorEncodingAttrGet | ( | MlirContext | ctx, |
intptr_t | lvlRank, | ||
MlirSparseTensorDimLevelType const * | dimLevelTypes, | ||
MlirAffineMap | dimOrdering, | ||
MlirAffineMap | higherOrdering, | ||
int | posWidth, | ||
int | crdWidth | ||
) |
Definition at line 48 of file SparseTensor.cpp.
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().
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().
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().
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().
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().
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().