Improve HEIR builtin OpenFHE efficiency when running test
- Dominant language
- MLIR
- Stars
- 906
- Forks
- 171
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 32
Description
In HEIR, the openfhe config for math backend is `WITH_BE2` and no NTL/HEXL involved. Also, it is built in debug mode (which is the main reason for slow down).
* Do we have an bazel option to default the openfhe target with `opt` flag
* We can immediately switch from WITH_BE2 to WITH_BE4 (also change MATHBACKEND to 4) in openfhe config
* further we might want to integrate NTL (NTL will also introduce GMP as dependency) /HEXL.
I have the following result
```
bazel test -c opt --test_output=all //tests/Examples/openfhe/bfv/noise/mult_indep_8/...
WITH_BE4
PASSED in 2.2s
```
```
bazel test -c dbg --test_output=all //tests/Examples/openfhe/bfv/noise/mult_indep_8/...
WITH_BE4
PASSED in 45.7s
```
```
bazel test -c opt --test_output=all //tests/Examples/openfhe/bfv/noise/mult_indep_8/...
WITH_BE2
PASSED in 4.3s
```
```
bazel test -c dbg --test_output=all //tests/Examples/openfhe/bfv/noise/mult_indep_8/...
WITH_BE2
PASSED in 64.8s
```
Contributor guide
Assessment
This issue has not been assessed yet.