Skip to content

Commit

Permalink
update evaluation output (*.mlir & *.cpp)
Browse files Browse the repository at this point in the history
Applies fixes from a52ff13, c56d2f1, 2c9f34f, 8e4def8, 0a3668f
  • Loading branch information
AlexanderViand-Intel committed May 10, 2024
1 parent ba027a5 commit 349154c
Show file tree
Hide file tree
Showing 49 changed files with 347 additions and 178 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## Misc
.DS_Store
.idea
.cache

## Documentation
docs/*
Expand Down
1 change: 0 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[submodule "dependencies/llvm-project"]
path = dependencies/llvm-project
url = https://github.com/llvm/llvm-project.git
shallow = true
[submodule "dependencies/SEAL"]
path = dependencies/SEAL
url = https://github.com/microsoft/SEAL.git
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
> Welcome to the Artifact Evaluation version of HECO!
HECO is an end-to-end compiler for FHE that takes high-level imperative programs and emits efficient and secure FHE implementations.
Currently, it supports Ring-LWE based schemes [B](https://eprint.iacr.org/2012/078)/[FV](https://eprint.iacr.org/2012/144), [BFV](https://eprint.iacr.org/2011/277) and [CKKS](https://eprint.iacr.org/2016/421) which offer powerful SIMD-like operations and can _batch_ many thousands of values into a single vector-like ciphertext.
Currently, it supports Ring-LWE based schemes [B](https://eprint.iacr.org/2012/078)/[FV](https://eprint.iacr.org/2012/144), [BGV](https://eprint.iacr.org/2011/277) and [CKKS](https://eprint.iacr.org/2016/421) which offer powerful SIMD-like operations and can _batch_ many thousands of values into a single vector-like ciphertext.

- [About HECO](#about-heco)
- [Using HECO](#using-heco)
Expand Down Expand Up @@ -262,4 +262,4 @@ Useful command line options for `mlir-opt`/`heco` (see also [MLIR Debugging Tips
* `--mlir-print-ir-before-all` - Prints the IR before each pass
* `--debug-only=dialect-conversion` - Prints some very useful information on passes and rules being applied
* `--verify-each=0` - Turns off the verifier, allowing one to see what the (invalid) IR looks like
* `--allow-unregistered-dialect` - Makes parser accept unknown operations (only works if they are in generic form!)
* `--allow-unregistered-dialect` - Makes parser accept unknown operations (only works if they are in generic form!)
6 changes: 3 additions & 3 deletions evaluation/README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The files in this folder can be used to reproduce (the runtime component of) Fig

In order to compile the programs from the high-level intermediate representation (HIR) form given here to *.cpp, run the following (assuming your current working directory is the repositoy root):
```sh
./build/bin/heco --full-pass < evaluation/benchmark/heco_input/hammingdistance_4.mlir > evaluation/heco_output/hammingdist_4.mlir
./build/bin/heco --full-pass < evaluation/benchmark/heco_input/hammingdistance_4.mlir > evaluation/benchmark/heco_output/hammingdist_4.mlir
./build/bin/emitc-translate --mlir-to-cpp < evaluation/benchmark/heco_output/hammingdistance_4.mlir > evaluation/heco_output/hammingdist_4.cpp
```

Expand All @@ -34,7 +34,7 @@ The files in this folder can be used to reproduce Figure 6 ("Runtime [...] compa

In order to compile the programs from the high-level intermediate representation (HIR) form given here to *.cpp, run the following (assuming your current working directory is the repositoy root):
```sh
./build/bin/heco --full-pass < evaluation/comparison/heco_input/hammingdistance_4.mlir > evaluation/heco_output/hammingdist_4.mlir
./build/bin/heco --full-pass < evaluation/comparison/heco_input/hammingdistance_4.mlir > evaluation/comparison/heco_output/hammingdist_4.mlir
./build/bin/emitc-translate --mlir-to-cpp < evaluation/comparison/heco_output/hammingdistance_4.mlir > evaluation/heco_output/hammingdist_4.cpp
```

Expand Down Expand Up @@ -68,7 +68,7 @@ The files in this folder can be used to reproduce Table 1 ("Compile time") from
MLIR includes utilities for detailed compile time reports, which can be used by passing `-mlir-timing -mlir-timing-display=list` to the compiler.
Specifically, to evaluate, e.g., `hammingdist_4.mlir`, you should run the following (assuming your current working directory is the repositoy root):
```sh
./build/bin/heco --full-pass -mlir-timing -mlir-timing-display=list < test/evaluation/hammingdistance_4.mlir
./build/bin/heco --full-pass -mlir-timing -mlir-timing-display=list < evaluation/compile_time/heco_input/hammingdistance_4.mlir
```
In order to avoid needing to compile each HECO input individually, you can instead use a helper script that does this for all files in the heco_input folder (assuming your current working directory is the repositoy root):
```sh
Expand Down
3 changes: 1 addition & 2 deletions evaluation/benchmark/heco_input/robertscross_16x16.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ module {
// fetch img[x-1][y]
%15 = arith.addi %x, %c-1 : index
%16 = arith.muli %15, %c16 : index
%17 = arith.addi %y, %c-1 : index
%18 = arith.addi %16, %17 : index
%18 = arith.addi %16, %y : index
%19 = arith.remui %18, %c256 : index
%20 = tensor.extract %img[%19] : tensor<256x!fhe.secret<i16>>

Expand Down
3 changes: 1 addition & 2 deletions evaluation/benchmark/heco_input/robertscross_2x2.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ module {
// fetch img[x-1][y]
%15 = arith.addi %x, %c-1 : index
%16 = arith.muli %15, %c2 : index
%17 = arith.addi %y, %c-1 : index
%18 = arith.addi %16, %17 : index
%18 = arith.addi %16, %y : index
%19 = arith.remui %18, %c4 : index
%20 = tensor.extract %img[%19] : tensor<4x!fhe.secret<i16>>

Expand Down
3 changes: 1 addition & 2 deletions evaluation/benchmark/heco_input/robertscross_32x32.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ module {
// fetch img[x-1][y]
%15 = arith.addi %x, %c-1 : index
%16 = arith.muli %15, %c32 : index
%17 = arith.addi %y, %c-1 : index
%18 = arith.addi %16, %17 : index
%18 = arith.addi %16, %y : index
%19 = arith.remui %18, %c1024 : index
%20 = tensor.extract %img[%19] : tensor<1024x!fhe.secret<i16>>

Expand Down
3 changes: 1 addition & 2 deletions evaluation/benchmark/heco_input/robertscross_4x4.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ module{
// fetch img[x-1][y]
%15 = arith.addi %x, %c-1 : index
%16 = arith.muli %15, %c4 : index
%17 = arith.addi %y, %c-1 : index
%18 = arith.addi %16, %17 : index
%18 = arith.addi %16, %y : index
%19 = arith.remui %18, %c16 : index
%20 = tensor.extract %img[%19] : tensor<16x!fhe.secret<i16>>

Expand Down
3 changes: 1 addition & 2 deletions evaluation/benchmark/heco_input/robertscross_64x64.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ module {
// fetch img[x-1][y]
%15 = arith.addi %x, %c-1 : index
%16 = arith.muli %15, %c64 : index
%17 = arith.addi %y, %c-1 : index
%18 = arith.addi %16, %17 : index
%18 = arith.addi %16, %y : index
%19 = arith.remui %18, %c4096 : index
%20 = tensor.extract %img[%19] : tensor<4096x!fhe.secret<i16>>

Expand Down
3 changes: 1 addition & 2 deletions evaluation/benchmark/heco_input/robertscross_8x8.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ module{
// fetch img[x-1][y]
%15 = arith.addi %x, %c-1 : index
%16 = arith.muli %15, %c8 : index
%17 = arith.addi %y, %c-1 : index
%18 = arith.addi %16, %17 : index
%18 = arith.addi %16, %y : index
%19 = arith.remui %18, %c64 : index
%20 = tensor.extract %img[%19] : tensor<64x!fhe.secret<i16>>

Expand Down
33 changes: 27 additions & 6 deletions evaluation/benchmark/heco_output/hammingdistance_1024.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,28 @@
#include "emitc_helper.h"
seal::Ciphertext encryptedHammingDistance_1024(seal::Ciphertext v1, seal::Ciphertext v2) {
seal::Ciphertext v3 = evaluator_sub(v1, v2);
seal::Ciphertext v4 = evaluator_multiply(v3, v3);
seal::Ciphertext v5 = evaluator_rotate(v4, 512);
seal::Ciphertext v6 = evaluator_add(v4, v5);
seal::Ciphertext v7 = evaluator_rotate(v6, 256);
seal::Ciphertext v8 = evaluator_add(v6, v7);
seal::Ciphertext v9 = evaluator_rotate(v8, 128);
seal::Ciphertext v10 = evaluator_add(v8, v9);
seal::Ciphertext v11 = evaluator_rotate(v10, 64);
seal::Ciphertext v12 = evaluator_add(v10, v11);
seal::Ciphertext v13 = evaluator_rotate(v12, 32);
seal::Ciphertext v14 = evaluator_add(v12, v13);
seal::Ciphertext v15 = evaluator_rotate(v14, 16);
seal::Ciphertext v16 = evaluator_add(v14, v15);
seal::Ciphertext v17 = evaluator_rotate(v16, 8);
seal::Ciphertext v18 = evaluator_add(v16, v17);
seal::Ciphertext v19 = evaluator_rotate(v18, 4);
seal::Ciphertext v20 = evaluator_add(v18, v19);
seal::Ciphertext v21 = evaluator_rotate(v20, 2);
seal::Ciphertext v22 = evaluator_add(v20, v21);
seal::Ciphertext v23 = evaluator_rotate(v22, 1);
seal::Ciphertext v24 = evaluator_add(v22, v23);
seal::Ciphertext v25 = evaluator_rotate(v24, 1022);
return v25;
}


// Placeholder for compiled function, so that C++ compilation always goes through
seal::Ciphertext encryptedHammingDistance_1024(seal::Ciphertext x, seal::Ciphertext y)
{
assert(false && "Please compile the HECO inputs to replace this placeholder output.");
}
21 changes: 15 additions & 6 deletions evaluation/benchmark/heco_output/hammingdistance_16.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
#include "emitc_helper.h"
seal::Ciphertext encryptedHammingDistance_16(seal::Ciphertext v1, seal::Ciphertext v2) {
seal::Ciphertext v3 = evaluator_sub(v1, v2);
seal::Ciphertext v4 = evaluator_multiply(v3, v3);
seal::Ciphertext v5 = evaluator_rotate(v4, 8);
seal::Ciphertext v6 = evaluator_add(v4, v5);
seal::Ciphertext v7 = evaluator_rotate(v6, 4);
seal::Ciphertext v8 = evaluator_add(v6, v7);
seal::Ciphertext v9 = evaluator_rotate(v8, 2);
seal::Ciphertext v10 = evaluator_add(v8, v9);
seal::Ciphertext v11 = evaluator_rotate(v10, 1);
seal::Ciphertext v12 = evaluator_add(v10, v11);
seal::Ciphertext v13 = evaluator_rotate(v12, 14);
return v13;
}


// Placeholder for compiled function, so that C++ compilation always goes through
seal::Ciphertext encryptedHammingDistance_16(seal::Ciphertext x, seal::Ciphertext y)
{
assert(false && "Please compile the HECO inputs to replace this placeholder output.");
}
29 changes: 23 additions & 6 deletions evaluation/benchmark/heco_output/hammingdistance_256.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
#include "emitc_helper.h"
seal::Ciphertext encryptedHammingDistance_256(seal::Ciphertext v1, seal::Ciphertext v2) {
seal::Ciphertext v3 = evaluator_sub(v1, v2);
seal::Ciphertext v4 = evaluator_multiply(v3, v3);
seal::Ciphertext v5 = evaluator_rotate(v4, 128);
seal::Ciphertext v6 = evaluator_add(v4, v5);
seal::Ciphertext v7 = evaluator_rotate(v6, 64);
seal::Ciphertext v8 = evaluator_add(v6, v7);
seal::Ciphertext v9 = evaluator_rotate(v8, 32);
seal::Ciphertext v10 = evaluator_add(v8, v9);
seal::Ciphertext v11 = evaluator_rotate(v10, 16);
seal::Ciphertext v12 = evaluator_add(v10, v11);
seal::Ciphertext v13 = evaluator_rotate(v12, 8);
seal::Ciphertext v14 = evaluator_add(v12, v13);
seal::Ciphertext v15 = evaluator_rotate(v14, 4);
seal::Ciphertext v16 = evaluator_add(v14, v15);
seal::Ciphertext v17 = evaluator_rotate(v16, 2);
seal::Ciphertext v18 = evaluator_add(v16, v17);
seal::Ciphertext v19 = evaluator_rotate(v18, 1);
seal::Ciphertext v20 = evaluator_add(v18, v19);
seal::Ciphertext v21 = evaluator_rotate(v20, 254);
return v21;
}


// Placeholder for compiled function, so that C++ compilation always goes through
seal::Ciphertext encryptedHammingDistance_256(seal::Ciphertext x, seal::Ciphertext y)
{
assert(false && "Please compile the HECO inputs to replace this placeholder output.");
}
17 changes: 11 additions & 6 deletions evaluation/benchmark/heco_output/hammingdistance_4.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
#include "emitc_helper.h"
seal::Ciphertext encryptedHammingDistance_4(seal::Ciphertext v1, seal::Ciphertext v2) {
seal::Ciphertext v3 = evaluator_sub(v1, v2);
seal::Ciphertext v4 = evaluator_multiply(v3, v3);
seal::Ciphertext v5 = evaluator_rotate(v4, 2);
seal::Ciphertext v6 = evaluator_add(v4, v5);
seal::Ciphertext v7 = evaluator_rotate(v6, 1);
seal::Ciphertext v8 = evaluator_add(v6, v7);
seal::Ciphertext v9 = evaluator_rotate(v8, 2);
return v9;
}


// Placeholder for compiled function, so that C++ compilation always goes through
seal::Ciphertext encryptedHammingDistance_4(seal::Ciphertext x, seal::Ciphertext y)
{
assert(false && "Please compile the HECO inputs to replace this placeholder output.");
}
37 changes: 31 additions & 6 deletions evaluation/benchmark/heco_output/hammingdistance_4096.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,32 @@
#include "emitc_helper.h"
seal::Ciphertext encryptedHammingDistance_4096(seal::Ciphertext v1, seal::Ciphertext v2) {
seal::Ciphertext v3 = evaluator_sub(v1, v2);
seal::Ciphertext v4 = evaluator_multiply(v3, v3);
seal::Ciphertext v5 = evaluator_rotate(v4, 2048);
seal::Ciphertext v6 = evaluator_add(v4, v5);
seal::Ciphertext v7 = evaluator_rotate(v6, 1024);
seal::Ciphertext v8 = evaluator_add(v6, v7);
seal::Ciphertext v9 = evaluator_rotate(v8, 512);
seal::Ciphertext v10 = evaluator_add(v8, v9);
seal::Ciphertext v11 = evaluator_rotate(v10, 256);
seal::Ciphertext v12 = evaluator_add(v10, v11);
seal::Ciphertext v13 = evaluator_rotate(v12, 128);
seal::Ciphertext v14 = evaluator_add(v12, v13);
seal::Ciphertext v15 = evaluator_rotate(v14, 64);
seal::Ciphertext v16 = evaluator_add(v14, v15);
seal::Ciphertext v17 = evaluator_rotate(v16, 32);
seal::Ciphertext v18 = evaluator_add(v16, v17);
seal::Ciphertext v19 = evaluator_rotate(v18, 16);
seal::Ciphertext v20 = evaluator_add(v18, v19);
seal::Ciphertext v21 = evaluator_rotate(v20, 8);
seal::Ciphertext v22 = evaluator_add(v20, v21);
seal::Ciphertext v23 = evaluator_rotate(v22, 4);
seal::Ciphertext v24 = evaluator_add(v22, v23);
seal::Ciphertext v25 = evaluator_rotate(v24, 2);
seal::Ciphertext v26 = evaluator_add(v24, v25);
seal::Ciphertext v27 = evaluator_rotate(v26, 1);
seal::Ciphertext v28 = evaluator_add(v26, v27);
seal::Ciphertext v29 = evaluator_rotate(v28, 4094);
return v29;
}


// Placeholder for compiled function, so that C++ compilation always goes through
seal::Ciphertext encryptedHammingDistance_4096(seal::Ciphertext x, seal::Ciphertext y)
{
assert(false && "Please compile the HECO inputs to replace this placeholder output.");
}
25 changes: 19 additions & 6 deletions evaluation/benchmark/heco_output/hammingdistance_64.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
#include "emitc_helper.h"
seal::Ciphertext encryptedHammingDistance_64(seal::Ciphertext v1, seal::Ciphertext v2) {
seal::Ciphertext v3 = evaluator_sub(v1, v2);
seal::Ciphertext v4 = evaluator_multiply(v3, v3);
seal::Ciphertext v5 = evaluator_rotate(v4, 32);
seal::Ciphertext v6 = evaluator_add(v4, v5);
seal::Ciphertext v7 = evaluator_rotate(v6, 16);
seal::Ciphertext v8 = evaluator_add(v6, v7);
seal::Ciphertext v9 = evaluator_rotate(v8, 8);
seal::Ciphertext v10 = evaluator_add(v8, v9);
seal::Ciphertext v11 = evaluator_rotate(v10, 4);
seal::Ciphertext v12 = evaluator_add(v10, v11);
seal::Ciphertext v13 = evaluator_rotate(v12, 2);
seal::Ciphertext v14 = evaluator_add(v12, v13);
seal::Ciphertext v15 = evaluator_rotate(v14, 1);
seal::Ciphertext v16 = evaluator_add(v14, v15);
seal::Ciphertext v17 = evaluator_rotate(v16, 62);
return v17;
}


// Placeholder for compiled function, so that C++ compilation always goes through
seal::Ciphertext encryptedHammingDistance_64(seal::Ciphertext x, seal::Ciphertext y)
{
assert(false && "Please compile the HECO inputs to replace this placeholder output.");
}
19 changes: 13 additions & 6 deletions evaluation/benchmark/heco_output/robertscross_16x16.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
#include "emitc_helper.h"
seal::Ciphertext encryptedRobertsCross_16x16(seal::Ciphertext v1) {
seal::Ciphertext v2 = evaluator_rotate(v1, 239);
seal::Ciphertext v3 = evaluator_sub(v1, v2);
seal::Ciphertext v4 = evaluator_rotate(v1, 241);
seal::Ciphertext v5 = evaluator_sub(v1, v4);
seal::Ciphertext v6 = evaluator_multiply(v3, v3);
seal::Ciphertext v7 = evaluator_multiply(v5, v5);
seal::Ciphertext v8 = evaluator_rotate(v6, 17);
seal::Ciphertext v9 = evaluator_rotate(v7, 16);
seal::Ciphertext v10 = evaluator_add(v8, v9);
return v10;
}


// Placeholder for compiled function, so that C++ compilation always goes through
seal::Ciphertext encryptedRobertsCross_16x16(seal::Ciphertext img)
{
assert(false && "Please compile the HECO inputs to replace this placeholder output.");
}
4 changes: 2 additions & 2 deletions evaluation/benchmark/heco_output/robertscross_16x16.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ module {
func.func private @encryptedRobertsCross_16x16(%arg0: !emitc.opaque<"seal::Ciphertext">) -> !emitc.opaque<"seal::Ciphertext"> {
%0 = emitc.call "evaluator_rotate"(%arg0) {args = [0 : index, 239 : si32]} : (!emitc.opaque<"seal::Ciphertext">) -> !emitc.opaque<"seal::Ciphertext">
%1 = emitc.call "evaluator_sub"(%arg0, %0) : (!emitc.opaque<"seal::Ciphertext">, !emitc.opaque<"seal::Ciphertext">) -> !emitc.opaque<"seal::Ciphertext">
%2 = emitc.call "evaluator_rotate"(%arg0) {args = [0 : index, 240 : si32]} : (!emitc.opaque<"seal::Ciphertext">) -> !emitc.opaque<"seal::Ciphertext">
%2 = emitc.call "evaluator_rotate"(%arg0) {args = [0 : index, 241 : si32]} : (!emitc.opaque<"seal::Ciphertext">) -> !emitc.opaque<"seal::Ciphertext">
%3 = emitc.call "evaluator_sub"(%arg0, %2) : (!emitc.opaque<"seal::Ciphertext">, !emitc.opaque<"seal::Ciphertext">) -> !emitc.opaque<"seal::Ciphertext">
%4 = emitc.call "evaluator_multiply"(%1, %1) : (!emitc.opaque<"seal::Ciphertext">, !emitc.opaque<"seal::Ciphertext">) -> !emitc.opaque<"seal::Ciphertext">
%5 = emitc.call "evaluator_multiply"(%3, %3) : (!emitc.opaque<"seal::Ciphertext">, !emitc.opaque<"seal::Ciphertext">) -> !emitc.opaque<"seal::Ciphertext">
%6 = emitc.call "evaluator_rotate"(%4) {args = [0 : index, 17 : si32]} : (!emitc.opaque<"seal::Ciphertext">) -> !emitc.opaque<"seal::Ciphertext">
%7 = emitc.call "evaluator_rotate"(%5) {args = [0 : index, 17 : si32]} : (!emitc.opaque<"seal::Ciphertext">) -> !emitc.opaque<"seal::Ciphertext">
%7 = emitc.call "evaluator_rotate"(%5) {args = [0 : index, 16 : si32]} : (!emitc.opaque<"seal::Ciphertext">) -> !emitc.opaque<"seal::Ciphertext">
%8 = emitc.call "evaluator_add"(%6, %7) : (!emitc.opaque<"seal::Ciphertext">, !emitc.opaque<"seal::Ciphertext">) -> !emitc.opaque<"seal::Ciphertext">
return %8 : !emitc.opaque<"seal::Ciphertext">
}
Expand Down
19 changes: 13 additions & 6 deletions evaluation/benchmark/heco_output/robertscross_2x2.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
#include "emitc_helper.h"
seal::Ciphertext encryptedRobertsCross_2x2(seal::Ciphertext v1) {
seal::Ciphertext v2 = evaluator_rotate(v1, 1);
seal::Ciphertext v3 = evaluator_sub(v1, v2);
seal::Ciphertext v4 = evaluator_rotate(v1, 3);
seal::Ciphertext v5 = evaluator_sub(v1, v4);
seal::Ciphertext v6 = evaluator_multiply(v3, v3);
seal::Ciphertext v7 = evaluator_multiply(v5, v5);
seal::Ciphertext v8 = evaluator_rotate(v6, 3);
seal::Ciphertext v9 = evaluator_rotate(v7, 2);
seal::Ciphertext v10 = evaluator_add(v8, v9);
return v10;
}


// Placeholder for compiled function, so that C++ compilation always goes through
seal::Ciphertext encryptedRobertsCross_2x2(seal::Ciphertext img)
{
assert(false && "Please compile the HECO inputs to replace this placeholder output.");
}
4 changes: 2 additions & 2 deletions evaluation/benchmark/heco_output/robertscross_2x2.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ module {
func.func private @encryptedRobertsCross_2x2(%arg0: !emitc.opaque<"seal::Ciphertext">) -> !emitc.opaque<"seal::Ciphertext"> {
%0 = emitc.call "evaluator_rotate"(%arg0) {args = [0 : index, 1 : si32]} : (!emitc.opaque<"seal::Ciphertext">) -> !emitc.opaque<"seal::Ciphertext">
%1 = emitc.call "evaluator_sub"(%arg0, %0) : (!emitc.opaque<"seal::Ciphertext">, !emitc.opaque<"seal::Ciphertext">) -> !emitc.opaque<"seal::Ciphertext">
%2 = emitc.call "evaluator_rotate"(%arg0) {args = [0 : index, 2 : si32]} : (!emitc.opaque<"seal::Ciphertext">) -> !emitc.opaque<"seal::Ciphertext">
%2 = emitc.call "evaluator_rotate"(%arg0) {args = [0 : index, 3 : si32]} : (!emitc.opaque<"seal::Ciphertext">) -> !emitc.opaque<"seal::Ciphertext">
%3 = emitc.call "evaluator_sub"(%arg0, %2) : (!emitc.opaque<"seal::Ciphertext">, !emitc.opaque<"seal::Ciphertext">) -> !emitc.opaque<"seal::Ciphertext">
%4 = emitc.call "evaluator_multiply"(%1, %1) : (!emitc.opaque<"seal::Ciphertext">, !emitc.opaque<"seal::Ciphertext">) -> !emitc.opaque<"seal::Ciphertext">
%5 = emitc.call "evaluator_multiply"(%3, %3) : (!emitc.opaque<"seal::Ciphertext">, !emitc.opaque<"seal::Ciphertext">) -> !emitc.opaque<"seal::Ciphertext">
%6 = emitc.call "evaluator_rotate"(%4) {args = [0 : index, 3 : si32]} : (!emitc.opaque<"seal::Ciphertext">) -> !emitc.opaque<"seal::Ciphertext">
%7 = emitc.call "evaluator_rotate"(%5) {args = [0 : index, 3 : si32]} : (!emitc.opaque<"seal::Ciphertext">) -> !emitc.opaque<"seal::Ciphertext">
%7 = emitc.call "evaluator_rotate"(%5) {args = [0 : index, 2 : si32]} : (!emitc.opaque<"seal::Ciphertext">) -> !emitc.opaque<"seal::Ciphertext">
%8 = emitc.call "evaluator_add"(%6, %7) : (!emitc.opaque<"seal::Ciphertext">, !emitc.opaque<"seal::Ciphertext">) -> !emitc.opaque<"seal::Ciphertext">
return %8 : !emitc.opaque<"seal::Ciphertext">
}
Expand Down
Loading

0 comments on commit 349154c

Please sign in to comment.