mirror of
https://github.com/intel/llvm.git
synced 2026-01-18 16:50:51 +08:00
[mlir][sparse] support sparse tensor element type conversion in codegen path
Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D144578
This commit is contained in:
@@ -135,6 +135,12 @@ SparseTensorEncodingAttr SparseTensorEncodingAttr::withoutOrdering() const {
|
||||
getPointerBitWidth(), getIndexBitWidth());
|
||||
}
|
||||
|
||||
SparseTensorEncodingAttr SparseTensorEncodingAttr::withoutBitWidths() const {
|
||||
return SparseTensorEncodingAttr::get(getContext(), getDimLevelType(),
|
||||
getDimOrdering(), getHigherOrdering(), 0,
|
||||
0);
|
||||
}
|
||||
|
||||
bool SparseTensorEncodingAttr::isAllDense() const {
|
||||
return !getImpl() || llvm::all_of(getDimLevelType(), isDenseDLT);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user