Skip to content

Commit

Permalink
[mlir][vector] Add tests for scalable vectors in one-shot-bufferize.m…
Browse files Browse the repository at this point in the history
…lir (llvm#102361)
  • Loading branch information
banach-space authored and bwendling committed Aug 15, 2024
1 parent 95ba973 commit 8740914
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions mlir/test/Dialect/Vector/one-shot-bufferize.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ func.func @mask(%t0: tensor<?xf32>, %val: vector<16xf32>, %idx: index, %m0: vect
return %0 : tensor<?xf32>
}

// CHECK-LABEL: func @mask_scalable(
// CHECK-SAME: %[[t0:.*]]: memref<?xf32, strided<[?], offset: ?>>
func.func @mask_scalable(%t0: tensor<?xf32>, %val: vector<[16]xf32>, %idx: index, %m0: vector<[16]xi1>) -> tensor<?xf32> {
// CHECK-NOT: alloc
// CHECK-NOT: copy
// CHECK: vector.mask %{{.*}} { vector.transfer_write %{{.*}}, %[[t0]][%{{.*}}] : vector<[16]xf32>, memref<?xf32, strided<[?], offset: ?>> } : vector<[16]xi1>
%0 = vector.mask %m0 { vector.transfer_write %val, %t0[%idx] : vector<[16]xf32>, tensor<?xf32> } : vector<[16]xi1> -> tensor<?xf32>
// CHECK: return %[[t0]]
return %0 : tensor<?xf32>
}

// -----

// CHECK-ANALYSIS-LABEL: func @non_reading_xfer_write(
Expand Down

0 comments on commit 8740914

Please sign in to comment.