mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-09 20:25:34 -05:00
chore: Integrate concrete-compiler to the mono-repo
This commit is contained in:
16
compilers/concrete-compiler/docs/cpp_api/clientlib.rst
Normal file
16
compilers/concrete-compiler/docs/cpp_api/clientlib.rst
Normal file
@@ -0,0 +1,16 @@
|
||||
ClientLib
|
||||
=========
|
||||
|
||||
.. toctree::
|
||||
clientlib/intro
|
||||
clientlib/client_lambda
|
||||
clientlib/server_lambda
|
||||
|
||||
|
||||
Index
|
||||
=====
|
||||
.. toctree::
|
||||
:glob:
|
||||
:maxdepth: 2
|
||||
|
||||
clientlib/*
|
||||
@@ -0,0 +1,4 @@
|
||||
LambdaArgument:
|
||||
===============
|
||||
|
||||
.. doxygenfile:: Arguments.h
|
||||
@@ -0,0 +1,16 @@
|
||||
#include <concretelang/ClientLib/ClientLambda.h>
|
||||
|
||||
// Include the header that has been generated by the compiler
|
||||
#include "myinclude/fhe_service/additions.h"
|
||||
|
||||
void query_server(MyConnection conn) {
|
||||
auto libPath = "/opt/fhe_service/libs/additions.so";
|
||||
std::ostream to_server = conn.ostream();
|
||||
std::ostream from_server = conn.istream();
|
||||
// In a real code only load once.
|
||||
auto add2int = additions::add2int::load(libPath, seed_msb, seed_lsb);
|
||||
auto err = add2int->callSerialize(1, 2, to_server);
|
||||
if( err ) { throw MyException() };
|
||||
auto result = add2int->decryptReturned(from_server);
|
||||
assert(result == 3);
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
ClientLambda:
|
||||
===============
|
||||
|
||||
.. doxygenfile:: ClientLambda.h
|
||||
:sections: briefdescription innernamespace typedef innerclass public-static-func public-func
|
||||
@@ -0,0 +1,5 @@
|
||||
ClientParameters:
|
||||
===============
|
||||
|
||||
.. doxygenstruct:: mlir::concretelang::ClientParameters
|
||||
.. doxygenfile:: ClientParameters.h
|
||||
23
compilers/concrete-compiler/docs/cpp_api/clientlib/intro.rst
Normal file
23
compilers/concrete-compiler/docs/cpp_api/clientlib/intro.rst
Normal file
@@ -0,0 +1,23 @@
|
||||
Description
|
||||
========
|
||||
|
||||
ClientLambda represents a FHE function on the client side.
|
||||
ServerLambda represents a FHE function on the server side.
|
||||
|
||||
These object read/write on istreams/ostreams.
|
||||
|
||||
Implementing a client/server consists in connecting the two, by connecting to actual streams.
|
||||
|
||||
Example on client side:
|
||||
|
||||
.. literalinclude:: client_example.cpp
|
||||
:linenos:
|
||||
:language: bash
|
||||
..
|
||||
For some reason cpp does not work well here.
|
||||
|
||||
Example on server side:
|
||||
|
||||
.. literalinclude:: server_example.cpp
|
||||
:linenos:
|
||||
:language: bash
|
||||
@@ -0,0 +1,5 @@
|
||||
KeySet:
|
||||
=======
|
||||
|
||||
.. doxygenfile:: KeySet.h
|
||||
.. doxygenfile:: KeySetCache.h
|
||||
@@ -0,0 +1,10 @@
|
||||
#include <concretelang/ServerLib/ServerLambda.h>
|
||||
|
||||
void answer_client(MyConnection conn) {
|
||||
std::istream from_client = conn.istream();
|
||||
std::ostream to_client = conn.ostream();
|
||||
auto err = serverLambda.read_call_write(serverInput, serverOutput);
|
||||
if (err) {
|
||||
throw MyException();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
ServerLambda:
|
||||
===============
|
||||
|
||||
.. doxygenfile:: ServerLambda.h
|
||||
50
compilers/concrete-compiler/docs/cpp_api/conversion.rst
Normal file
50
compilers/concrete-compiler/docs/cpp_api/conversion.rst
Normal file
@@ -0,0 +1,50 @@
|
||||
Conversion
|
||||
==========
|
||||
|
||||
FHETensorOpsToLinalg:
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. doxygenfile:: concretelang/Conversion/FHETensorOpsToLinalg/Pass.h
|
||||
|
||||
FHEToTFHE:
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
.. doxygenfile:: concretelang/Conversion/FHEToTFHE/Patterns.h
|
||||
|
||||
.. doxygenfile:: concretelang/Conversion/FHEToTFHE/Pass.h
|
||||
|
||||
TFHEGlobalParametrization:
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. doxygenfile:: concretelang/Conversion/TFHEGlobalParametrization/Pass.h
|
||||
|
||||
|
||||
TFHEToConcreteFHE:
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. doxygenfile:: concretelang/Conversion/TFHEToConcrete/Patterns.h
|
||||
|
||||
.. doxygenfile:: concretelang/Conversion/TFHEToConcrete/Pass.h
|
||||
|
||||
ConcreteToStd:
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
.. doxygenfile:: concretelang/Conversion/ConcreteToConcreteCAPI/Pass.h
|
||||
|
||||
.. doxygenfile:: concretelang/Conversion/ConcreteUnparametrize/Pass.h
|
||||
|
||||
.. doxygenfile:: concretelang/Conversion/MLIRLowerableDialectsToLLVM/Pass.h
|
||||
|
||||
Utils:
|
||||
^^^^^^
|
||||
|
||||
.. doxygenfile:: concretelang/Conversion/Utils/TensorOpTypeConversion.h
|
||||
|
||||
.. doxygenfile:: concretelang/Conversion/Utils/RegionOpTypeConverterPattern.h
|
||||
|
||||
.. doxygenfile:: concretelang/Conversion/Utils/GenericOpTypeConversionPattern.h
|
||||
|
||||
.. doxygenfile:: concretelang/Conversion/Utils/GlobalFHEContext.h
|
||||
|
||||
|
||||
|
||||
13
compilers/concrete-compiler/docs/cpp_api/index.rst
Normal file
13
compilers/concrete-compiler/docs/cpp_api/index.rst
Normal file
@@ -0,0 +1,13 @@
|
||||
.. _api:
|
||||
|
||||
API
|
||||
===
|
||||
|
||||
.. See https://breathe.readthedocs.io/en/latest/directives.html#doxygenfile for more info
|
||||
.. on doxygen sphinx format
|
||||
|
||||
.. toctree::
|
||||
:glob:
|
||||
:maxdepth: 2
|
||||
|
||||
*
|
||||
8
compilers/concrete-compiler/docs/cpp_api/runtime.rst
Normal file
8
compilers/concrete-compiler/docs/cpp_api/runtime.rst
Normal file
@@ -0,0 +1,8 @@
|
||||
Runtime
|
||||
=======
|
||||
|
||||
.. toctree::
|
||||
:glob:
|
||||
:maxdepth: 2
|
||||
|
||||
runtime/*
|
||||
@@ -0,0 +1,4 @@
|
||||
Context:
|
||||
========
|
||||
|
||||
.. doxygenfile:: concretelang/Runtime/context.h
|
||||
@@ -0,0 +1,8 @@
|
||||
DataflowRuntime:
|
||||
================
|
||||
.. doxygenfile:: concretelang/Runtime/DFRuntime.hpp
|
||||
|
||||
Debug interface:
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
.. doxygenfile:: concretelang/Runtime/dfr_debug_interface.h
|
||||
@@ -0,0 +1,4 @@
|
||||
Distributed generic task server:
|
||||
================================
|
||||
|
||||
.. doxygenfile:: concretelang/Runtime/distributed_generic_task_server.hpp
|
||||
@@ -0,0 +1,4 @@
|
||||
Key Manager:
|
||||
============
|
||||
|
||||
.. doxygenfile:: concretelang/Runtime/key_manager.hpp
|
||||
@@ -0,0 +1,4 @@
|
||||
Runtime API:
|
||||
============
|
||||
|
||||
.. doxygenfile:: concretelang/Runtime/runtime_api.h
|
||||
@@ -0,0 +1,4 @@
|
||||
Wrappers:
|
||||
=========
|
||||
|
||||
.. doxygenfile:: concretelang/Runtime/wrappers.h
|
||||
8
compilers/concrete-compiler/docs/cpp_api/support.rst
Normal file
8
compilers/concrete-compiler/docs/cpp_api/support.rst
Normal file
@@ -0,0 +1,8 @@
|
||||
Support
|
||||
=======
|
||||
|
||||
.. toctree::
|
||||
:glob:
|
||||
:maxdepth: 2
|
||||
|
||||
support/*
|
||||
28
compilers/concrete-compiler/docs/cpp_api/support/bonus.rst
Normal file
28
compilers/concrete-compiler/docs/cpp_api/support/bonus.rst
Normal file
@@ -0,0 +1,28 @@
|
||||
Bonus:
|
||||
======
|
||||
|
||||
Logging:
|
||||
^^^^^^^^
|
||||
|
||||
.. doxygenfile:: logging.h
|
||||
|
||||
Math:
|
||||
^^^^^
|
||||
|
||||
.. doxygenfile:: math.h
|
||||
|
||||
|
||||
V0Curves:
|
||||
^^^^^^^^^
|
||||
|
||||
.. doxygenfile:: V0Curves.h
|
||||
|
||||
V0Parameters:
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
.. doxygenfile:: V0Parameters.h
|
||||
|
||||
Error:
|
||||
^^^^^^
|
||||
|
||||
.. doxygenfile:: Error.h
|
||||
@@ -0,0 +1,4 @@
|
||||
CompilerEngine:
|
||||
===============
|
||||
|
||||
.. doxygenfile:: concretelang/Support/CompilerEngine.h
|
||||
5
compilers/concrete-compiler/docs/cpp_api/support/jit.rst
Normal file
5
compilers/concrete-compiler/docs/cpp_api/support/jit.rst
Normal file
@@ -0,0 +1,5 @@
|
||||
Jit:
|
||||
====
|
||||
|
||||
.. doxygenfile:: Jit.h
|
||||
.. doxygenfile:: JitCompilerEngine.h
|
||||
@@ -0,0 +1,4 @@
|
||||
LambdaArgument:
|
||||
===============
|
||||
|
||||
.. doxygenfile:: LambdaArgument.h
|
||||
@@ -0,0 +1,4 @@
|
||||
LLVMEmitFile:
|
||||
=============
|
||||
|
||||
.. doxygenfile:: LLVMEmitFile.h
|
||||
@@ -0,0 +1,4 @@
|
||||
Pipeline:
|
||||
=========
|
||||
|
||||
.. doxygenfile:: Pipeline.h
|
||||
Reference in New Issue
Block a user