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 1a6f454
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ func.func @generic_op_i1_packed() {
// CHECK-DAG: %[[ADD:.+]] = arith.addi %[[ARG0]], %[[ARG0]] : i1
// CHECK: linalg.yield %[[ADD]]
// CHECK: -> tensor<?xi1, #iree_encoding.packed_storage>
// CHECK: flow.dispatch.tensor.store %[[GENERIC]], %[[OUT]]
// CHECK: flow.dispatch.tensor.store %[[GENERIC]], %[[OUT]]
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 1a6f454

Please sign in to comment.