[Mlir-commits] [mlir] [mlir][sparse] Treat high and 2OutOf4 as level formats (PR #67203)
Yinying Li
llvmlistbot at llvm.org
Mon Sep 25 08:04:42 PDT 2023
================
@@ -63,13 +63,11 @@ FailureOr<uint8_t> LvlTypeParser::parseLvlType(AsmParser &parser) const {
if (base.compare("dense") == 0) {
properties |= static_cast<uint8_t>(LevelFormat::Dense);
} else if (base.compare("compressed") == 0) {
- // TODO: Remove this condition once dimLvlType enum is refactored. Current
- // enum treats High and TwoOutOfFour as formats instead of properties.
- if (!(properties & static_cast<uint8_t>(LevelNondefaultProperty::High) ||
- properties &
- static_cast<uint8_t>(LevelNondefaultProperty::Block2_4))) {
- properties |= static_cast<uint8_t>(LevelFormat::Compressed);
- }
+ properties |= static_cast<uint8_t>(LevelFormat::Compressed);
+ } else if (base.compare("block2_4") == 0) {
+ properties |= static_cast<uint8_t>(LevelFormat::TwoOutOfFour);
+ } else if (base.compare("loose_compressed") == 0) {
+ properties |= static_cast<uint8_t>(LevelFormat::CompressedWithHi);
----------------
yinying-lisa-li wrote:
Sounds good. Will do it in another PR.
https://github.com/llvm/llvm-project/pull/67203
More information about the Mlir-commits
mailing list