Running the test-suite to integrate hardware acceleration

Belfort would like to test our hardware acceleration for the FHE computations done on the coprocessor. I’m running into issue setting up the test-suite.

I assume some parts of the KMS aren’t open-sourced completely. I receive the following error when running test-suite/fhevm/fhevm-cli deploy --build:

✘ Image kms/core-service:v0.12.4 Error pull access denied for kms/core-service, repository d...                           0.4s 
Error response from daemon: pull access denied for kms/core-service, repository does not exist or may require 'docker login'
[ERROR] Failed to start Core Services

I also tried building the KMS component locally, but I have a similar issue when running docker-compose:

  => ERROR [dev-kms-core-3 internal] load metadata for ghcr.io/zama-ai/kms/rust-golden-image:latest                               0.1s

Is there any chance that these components will be open-sourced anytime soon or what’s the best step forward to work on integrating hardware accelerators?

Thanks in advance!

I have forwarded your question, and you will receive a reply shortly.

2 Likes

hey @Tuditi

if you see in the kms repo, we are using Chainguard images (to have vulnerability-free images) but we are not allowed to redistribute them. Chainguard have free-to-use images but it’s only latest tags, so 2 options:

  • building locally docker images and replacing in Dockefiles all mentions of cgr.dev/zama.ai by cgr.dev/chainguard and <versions> by latest
    e.g:
FROM cgr.dev/zama.ai/glibc-dynamic:15.2.0-dev AS prod

becomes

FROM cgr.dev/chainguard/glibc-dynamic:latest-dev AS prod

or

  • ask access to our registry.
1 Like

Hey,

Another thing you might be interested in is trying:

cargo +nightly bench --bench erc20 --features=gpu,bench -- --quick

or

fhevm/coprocessor/fhevm-engine/tfhe-worker$ make benchmark_erc20_gpu

It will allow you to run the tests, without needing a KMS (with git-commited test keys).

1 Like

Thanks for the response!

I managed to run the benchmarks! For the interested reader (or future me :D), I’ll post below additional information.

  1. As Alex suggested, replace all links to cgr.dev/zama.ai in the Dockerfiles.
  2. Before benchmarking, build the golden-container-images (fhevm/golden-container-images/rust-glibc) for rust-glibc locally with the correct tag. I used the command below:
    docker build -t ghcr.io/zama-ai/fhevm/gci/rust-glibc:1.91.0 --build-arg RUST_IMAGE_VERSION=1.91.0 .
  3. Start the docker image with docker compose up -d from the path: coprocessor/fhevm-engine/tfhe-worker
  4. From the same dir: run make benchmark_erc20_cpu (or replace with gpu for gpu kernels)
3 Likes