Skip to content

Commit

Permalink
added test
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Manainen authored and Max Manainen committed Oct 15, 2024
1 parent 1418998 commit 0410875
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
%dim2 = "tensor.dim"(%t1, %i1) {"hello" = "world"}: (tensor<2x3xf32>, index) -> index
%cast1 = "tensor.cast"(%t1) : (tensor<2x3xf32>) -> tensor<?x?xf32>
%cast2 = "tensor.cast"(%t1) {"hello" = "world"} : (tensor<2x3xf32>) -> tensor<?x?xf32>
%big_tensor = tensor.empty() : tensor<2x3x2x3xf32>
%collapsed = tensor.collapse_shape %big_tensor [[0, 1], [2, 3]] : tensor<2x3x2x3xf32> into tensor<6x6xf32>


// CHECK: module {
Expand All @@ -29,4 +31,6 @@
// CHECK-NEXT: %{{.*}} = tensor.dim {hello = "world"} %{{.*}}, %{{.*}} : tensor<2x3xf32>
// CHECK-NEXT: %{{.*}} = tensor.cast %{{.*}} : tensor<2x3xf32> to tensor<?x?xf32>
// CHECK-NEXT: %{{.*}} = tensor.cast %{{.*}} {hello = "world"} : tensor<2x3xf32> to tensor<?x?xf32>
// CHECK-NEXT: %6 = tensor.empty() : tensor<2x3x2x3xf32>
// CHECK-NEXT: %collapsed = tensor.collapse_shape %6 [[0, 1], [2, 3]] : tensor<2x3x2x3xf32> into tensor<6x6xf32>
// CHECK-NEXT: }

0 comments on commit 0410875

Please sign in to comment.