mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-09 03:55:04 -05:00
tests: test execution of transpose
This commit is contained in:
29
compiler/tests/unittest/end_to_end_fhelinalg.yaml
Normal file
29
compiler/tests/unittest/end_to_end_fhelinalg.yaml
Normal 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]
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user