The PALISADE-CPU backend is a Reference backend engine for HEBench which is a shared library that implements the required functions specified in either the hebench::APIBridge or hebench::cpp wrapper. It is intended only as a reference on how to implement a PALISADE backend for HEBench and it is not fully optimized for performance.
Apache License 2.0
6
stars
2
forks
source link
MatMulValCKKS Takes Significant Amount of Memory/Time During Decrypt #15
Create Build Directory and CMake config & Build with:
cmake -DCMAKE_INSTALL_PREFIX=./ -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=g++-9 -DCMAKE_C_COMPILER=gcc-9 .. && make -j install
Run with attached configuration file (change to .yml): matmul-val-ckks-8192x100x10.txt./bin/test_harness -b ./libhebench_palisade_backend.so --config_file matmul-val-ckks-8192x100x10.yml
Expected behavior
Test completes with a relative increase of memory usage.
*Issue also present in anticipated v0.6.0-beta release (bd7f856)
Describe the bug
Running on 36c72t ICX Machine When running MatMulValCKKS with "large" input sizes 8192x100x10, the memory and performance behavior drastically changes as the pipeline gets to the decryption step. Referring to the following step in the pipeline: https://github.com/hebench/backend-cpu-palisade/blob/cb191ebd67306d89e582d3f80b218f37eacb9878/src/benchmarks/ckks/palisade_ckks_matmultval_benchmark.cpp#L357
Note that the same step in the bfv version of MatMulVal is similar (if not the same): https://github.com/hebench/backend-cpu-palisade/blob/cb191ebd67306d89e582d3f80b218f37eacb9878/src/benchmarks/bfv/palisade_bfv_matmultval_benchmark.cpp#L356
Max memory usage at each primary steps (BFV included for reference) (8192x100x10): BFV:
CKKS:
To Reproduce
Steps to reproduce the behavior:
#pragma omp parallel for
above outer decrypt loop here: https://github.com/hebench/backend-cpu-palisade/blob/27751918ec31c22c816b8c13cd80947d9a557655/src/benchmarks/ckks/palisade_ckks_matmultval_benchmark.cpp#L365). Though be aware some instability may be introduced by adding MT to decrypt or encrypt steps.cmake -DCMAKE_INSTALL_PREFIX=./ -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=g++-9 -DCMAKE_C_COMPILER=gcc-9 .. && make -j install
./bin/test_harness -b ./libhebench_palisade_backend.so --config_file matmul-val-ckks-8192x100x10.yml
Expected behavior
Test completes with a relative increase of memory usage.
Screenshots
N/A
Additional context
N/A