Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
Signed-off-by: Max Dawkins <[email protected]>
  • Loading branch information
Max191 committed Jan 20, 2025
1 parent a415184 commit 0986ee7
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ module {

// THREAD-LABEL: func.func @swap_expand_shape_with_extract_slice
// THREAD: scf.forall (%[[X:[A-Za-z0-9]+]], %[[Y:[A-Za-z0-9]+]], %[[Z:[A-Za-z0-9]+]])
// THREAD: %[[LINEAR_IDX:.+]] = affine.linearize_index [%[[X]], %[[Y]], %[[Z]]] by (2, 3, 10)
// THREAD: %[[LINEAR_IDX:.+]] = affine.linearize_index disjoint [%[[X]], %[[Y]], %[[Z]]] by (2, 3, 10)
// THREAD: %[[SLICE:.+]] = tensor.extract_slice %{{.*}}[%[[LINEAR_IDX]]] [5] [1] : tensor<60xf32> to tensor<5xf32>
// THREAD: %[[EXPAND:.+]] = tensor.expand_shape %[[SLICE]] {{\[\[}}0, 1, 2]] output_shape [1, 1, 5]
// THREAD: linalg.exp {{.*}} ins(%[[EXPAND]]
Expand All @@ -453,7 +453,7 @@ module {
// THREAD-LABEL: func.func @swap_expand_shape_with_extract_slice_full_inner_dim
// THREAD: %[[C0:.+]] = arith.constant 0 : index
// THREAD: scf.forall (%[[X:[A-Za-z0-9]+]], %[[Y:[A-Za-z0-9]+]])
// THREAD: %[[LINEAR_IDX:.+]] = affine.linearize_index [%[[X]], %[[Y]], %[[C0]]] by (3, 4, 10)
// THREAD: %[[LINEAR_IDX:.+]] = affine.linearize_index disjoint [%[[X]], %[[Y]], %[[C0]]] by (3, 4, 10)
// THREAD: %[[SLICE:.+]] = tensor.extract_slice %{{.*}}[%[[LINEAR_IDX]]] [20] [1] : tensor<120xf32> to tensor<20xf32>
// THREAD: %[[EXPAND:.+]] = tensor.expand_shape %[[SLICE]] {{\[\[}}0, 1, 2]] output_shape [1, 2, 10]
// THREAD: linalg.exp {{.*}} ins(%[[EXPAND]]
Expand Down Expand Up @@ -491,8 +491,8 @@ module {
// THREAD-LABEL: func.func @swap_expand_shape_with_extract_slice_multiple_expanded_dims
// THREAD: %[[C0:.+]] = arith.constant 0 : index
// THREAD: scf.forall (%[[ID0:[A-Za-z0-9]+]], %[[ID1:[A-Za-z0-9]+]], %[[ID2:[A-Za-z0-9]+]], %[[ID3:[A-Za-z0-9]+]])
// THREAD: %[[LINEAR_IDX0:.+]] = affine.linearize_index [%[[ID0]], %[[ID1]], %[[C0]]] by (3, 4, 10)
// THREAD: %[[LINEAR_IDX1:.+]] = affine.linearize_index [%[[ID2]], %[[ID3]]] by (7, 8)
// THREAD: %[[LINEAR_IDX0:.+]] = affine.linearize_index disjoint [%[[ID0]], %[[ID1]], %[[C0]]] by (3, 4, 10)
// THREAD: %[[LINEAR_IDX1:.+]] = affine.linearize_index disjoint [%[[ID2]], %[[ID3]]] by (7, 8)
// THREAD: %[[SLICE:.+]] = tensor.extract_slice %{{.*}}[%[[LINEAR_IDX0]], %[[LINEAR_IDX1]]] [20, 4] [1, 1]
// THREAD: %[[EXPAND:.+]] = tensor.expand_shape %[[SLICE]] {{\[\[}}0, 1, 2], [3, 4]] output_shape [1, 2, 10, 1, 4]
// THREAD: linalg.exp {{.*}} ins(%[[EXPAND]]
Expand Down

0 comments on commit 0986ee7

Please sign in to comment.