-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quesiton on generating C++ header for FHE Circuit Using Concrete-Python Frontend #1179
Comments
Hello @duhaode520, indeed the generation of cpp headers has been removed but in fact it was mostly experimental and not actually usefull for cpp integration. There was a big refactoring of client/server API tools since 2.8.1, so we should udpate this part of the documentation by using the updated API. But in few words, with the new cpp API, when you have compiler artifacts in a ARTIFACT_PATH you should rely on:
Disclaimer: This is just a code snippet wrote in the issue, it's not tested is just to give an overview. |
Thank you for providing the detailed examples. I will give it a try to see if this works. BTW do I need to use the concrete-python frontend compiled from the main branch to replace the current version 2.8.1? I am not sure if there will be any compatibility issues between the circuits produced by the older frontend and the latest version of concrete-compile compiled from the source code. |
Hello,
I am trying to set up a workflow where I compile some FHE circuits using the concrete-python frontend and then call these circuits from another project using C++. I have noticed that the compiled circuit includes
sharedlib.so
library file, leading me to believe this workflow is feasible. What remains is figuring out how to obtain the corresponding header file.However, I've encountered an issue. The
LibrarySupport
class's initialization includes agenerateCppHeader
parameter, which I expected to facilitate the generation of the necessary C++ header.concrete/compilers/concrete-compiler/compiler/lib/Bindings/Python/concrete/compiler/library_support.py
Line 78 in 1c2ce66
It appears though, that this parameter does not function as intended; it seems to be ignored in the C++ code .
concrete/compilers/concrete-compiler/compiler/lib/Bindings/Python/CompilerAPIModule.cpp
Lines 70 to 77 in 1c2ce66
The official documentation provides examples indicating that C++ can indeed be used to call the circuits, including an example with concrete-compiler that compiles MLIR and produces a header file. (https://docs.zama.ai/concrete/developers/contributing/call_from_other_language)
Could you please guide me on how to properly generate the required
.h
and corresponding.so
lib files using Python code? The concrete version I'm working on is v2.8.1Thank you for your assistance.
The text was updated successfully, but these errors were encountered: