tests: test execution of transpose

This commit is contained in:
youben11
2022-03-22 11:20:55 +01:00
committed by Ayoub Benaissa
parent 77356fa374
commit d8aa9ff76b
2 changed files with 34 additions and 2 deletions

View File

@@ -0,0 +1,29 @@
description: transpose1d
program: |
func @main(%input: tensor<3x!FHE.eint<6>>) -> tensor<3x!FHE.eint<6>> {
%1 = "FHELinalg.transpose"(%input): (tensor<3x!FHE.eint<6>>) ->
tensor<3x!FHE.eint<6>> return %1 : tensor<3x!FHE.eint<6>>
}
tests:
- inputs:
- tensor: [1, 2, 3]
shape: [3]
width: 8
outputs:
- tensor: [1, 2, 3]
shape: [3]
---
description: transpose2d
program: |
func @main(%input: tensor<3x2x!FHE.eint<6>>) -> tensor<2x3x!FHE.eint<6>> {
%1 = "FHELinalg.transpose"(%input): (tensor<3x2x!FHE.eint<6>>) -> tensor<2x3x!FHE.eint<6>>
return %1 : tensor<2x3x!FHE.eint<6>>
}
tests:
- inputs:
- tensor: [1, 2, 3, 4, 5, 6]
shape: [3, 2]
width: 8
outputs:
- tensor: [1, 3, 5, 2, 4, 6]
shape: [2, 3]

View File

@@ -84,7 +84,10 @@ void compile_and_run(EndToEndDesc desc, LambdaSupport support) {
FHE, suite, lambdasupport, "tests/unittest/end_to_end_fhe.yaml") \
INSTANTIATE_END_TO_END_TEST_SUITE_FROM_FILE( \
EncryptedTensor, suite, lambdasupport, \
"tests/unittest/end_to_end_encrypted_tensor.yaml")
"tests/unittest/end_to_end_encrypted_tensor.yaml") \
INSTANTIATE_END_TO_END_TEST_SUITE_FROM_FILE( \
FHELinalg, suite, lambdasupport, \
"tests/unittest/end_to_end_fhelinalg.yaml")
/// Instantiate the test suite for Jit
INSTANTIATE_END_TO_END_TEST_SUITE_FROM_ALL_TEST_FILES(
@@ -94,4 +97,4 @@ INSTANTIATE_END_TO_END_TEST_SUITE_FROM_ALL_TEST_FILES(
INSTANTIATE_END_TO_END_TEST_SUITE_FROM_ALL_TEST_FILES(
LibraryTest,
mlir::concretelang::LibraryLambdaSupport("/tmp/end_to_end_test_" +
desc.description))
desc.description))