Files
concrete/compiler/tests/check_tests/Conversion/FHELinalgToLinalg/from_element.mlir
Andi Drebes 85ebc0cb7a Rebase onto llvm-project 3f81841474fe with patch for arbitrary types in linalg named ops
Rebase to llvm-project at 3f81841474fe with a pending upstream patch
for arbitrary element types in linalg named operations.

Co-authored-by: Ayoub Benaissa <ayoub.benaissa@zama.ai>
2022-07-27 22:45:38 +02:00

24 lines
910 B
MLIR

// RUN: concretecompiler %s --split-input-file --action=dump-tfhe --passes fhe-tensor-ops-to-linalg 2>&1 | FileCheck %s
// -----
// CHECK: func.func @main(%[[a0:.*]]: !FHE.eint<7>) -> tensor<1x!FHE.eint<7>> {
// CHECK-NEXT: %[[v0:.*]] = tensor.from_elements %[[a0]] : tensor<1x!FHE.eint<7>>
// CHECK-NEXT: return %[[v0]] : tensor<1x!FHE.eint<7>>
// CHECK-NEXT: }
func.func @main(%arg0: !FHE.eint<7>) -> tensor<1x!FHE.eint<7>> {
%1 = "FHELinalg.from_element"(%arg0) : (!FHE.eint<7>) -> tensor<1x!FHE.eint<7>>
return %1 : tensor<1x!FHE.eint<7>>
}
// -----
// CHECK: func.func @main(%[[a0:.*]]: i8) -> tensor<1xi8> {
// CHECK-NEXT: %[[v0:.*]] = tensor.from_elements %[[a0]] : tensor<1xi8>
// CHECK-NEXT: return %[[v0]] : tensor<1xi8>
// CHECK-NEXT: }
func.func @main(%arg0: i8) -> tensor<1xi8> {
%1 = "FHELinalg.from_element"(%arg0) : (i8) -> tensor<1xi8>
return %1 : tensor<1xi8>
}