Skip to content

Commit

Permalink
refactor again
Browse files Browse the repository at this point in the history
  • Loading branch information
lialan committed Feb 5, 2025
1 parent 0e60383 commit 428e658
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,8 @@ EncodingAttr getEncodingAttr(RankedTensorType type) {

bool hasPackedStorageAttr(Type type) {
if (auto tensorType = dyn_cast<RankedTensorType>(type)) {
auto encoding = tensorType.getEncoding();
if (!encoding) {
return false;
}
return dyn_cast_or_null<PackedStorageAttr>(encoding) != nullptr;
return dyn_cast_or_null<PackedStorageAttr>(tensorType.getEncoding()) !=
nullptr;
}
return false;
}
Expand Down
1 change: 1 addition & 0 deletions compiler/src/iree/compiler/Dialect/Util/IR/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ iree_compiler_cc_library(
":UtilInterfacesGen",
":UtilOpsGen",
":UtilTypesGen",
"//compiler/src/iree/compiler/Dialect/Encoding/IR",
"@llvm-project//llvm:Support",
"@llvm-project//mlir:AffineDialect",
"@llvm-project//mlir:ArithDialect",
Expand Down

0 comments on commit 428e658

Please sign in to comment.