Skip to content

Commit

Permalink
Another commit
Browse files Browse the repository at this point in the history
  • Loading branch information
lialan committed Jan 17, 2025
1 parent f9476e0 commit 51d3f0f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -291,11 +291,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
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ namespace mlir::iree_compiler::IREE::Encoding {
/// Otherwise, returns null.
EncodingAttr getEncodingAttr(RankedTensorType type);

/// Returns true if the type contains packed_storage attribute.
/// Returns true if the type is a RankedTensorType type and it contains
/// packed_storage attribute.
bool hasPackedStorageAttr(Type type);

/// Returns the ContractionDimensions for the encoding user_indexing_maps.
Expand Down

0 comments on commit 51d3f0f

Please sign in to comment.