-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(compiler): Add check tests for pass hoisting RT.await_future ope…
…rations
- Loading branch information
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
compilers/concrete-compiler/compiler/tests/check_tests/Dialect/RT/hoist_await_future.mlir
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// RUN: concretecompiler --action=dump-fhe-df-parallelized %s --optimizer-strategy=dag-mono --parallelize | FileCheck %s | ||
// RUN: concretecompiler --action=dump-llvm-ir %s --optimizer-strategy=dag-mono --parallelize | ||
// RUN: concretecompiler --action=dump-llvm-ir %s --optimizer-strategy=dag-multi --parallelize | ||
|
||
// CHECK: scf.forall.in_parallel { | ||
// CHECK-NEXT: tensor.parallel_insert_slice %from_elements into %arg3[%arg2] [1] [1] : tensor<1x!RT.future<tensor<8x9x!FHE.eint<6>>>> into tensor<4x!RT.future<tensor<8x9x!FHE.eint<6>>>> | ||
// CHECK-NEXT: } | ||
// | ||
// CHECK: %[[res:.*]] = scf.forall (%[[arg:.*]]) in (4) shared_outs(%[[so:.*]] = %[[init:.*]]) -> (tensor<8x9x4x!FHE.eint<6>>) { | ||
// CHECK-NEXT: %[[extracted:.*]] = tensor.extract %4[%[[arg]]] : tensor<4x!RT.future<tensor<8x9x!FHE.eint<6>>>> | ||
// CHECK-NEXT: %[[awaitres:.*]] = "RT.await_future"(%[[extracted]]) : (!RT.future<tensor<8x9x!FHE.eint<6>>>) -> tensor<8x9x!FHE.eint<6>> | ||
// CHECK-NEXT: scf.forall.in_parallel { | ||
// CHECK-NEXT: tensor.parallel_insert_slice %[[awaitres]] into %[[so]][0, 0, %[[arg]]] [8, 9, 1] [1, 1, 1] : tensor<8x9x!FHE.eint<6>> into tensor<8x9x4x!FHE.eint<6>> | ||
// CHECK-NEXT: } | ||
// CHECK-NEXT: } | ||
|
||
func.func @main(%a: tensor<8x7x!FHE.eint<6>>, %b: tensor<7x9xi7>) -> tensor<8x9x!FHE.eint<6>>{ | ||
%0 = "FHELinalg.matmul_eint_int"(%a, %b) { "tile-sizes" = [0, 0, 2] } : (tensor<8x7x!FHE.eint<6>>, tensor<7x9xi7>) -> tensor<8x9x!FHE.eint<6>> | ||
return %0 : tensor<8x9x!FHE.eint<6>> | ||
} |