mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-09 12:15:09 -05:00
chore: update the doc to have clearer uses of Concrete Numpy etc
refs #1288
This commit is contained in:
committed by
Benoit Chevallier
parent
a835d25e15
commit
721bc06eb7
@@ -2,7 +2,7 @@
|
||||
|
||||
## What is **concrete-numpy**?
|
||||
|
||||
**concrete-numpy** is the python API of the **Concrete** framework for developing homomorphic applications.
|
||||
**concrete-numpy** is a convenient python package, made on top of **Concrete compiler** and **Concrete library**, for developing homomorphic applications.
|
||||
One of its essential functionalities is to transform Python functions to their `MLIR` equivalent.
|
||||
Unfortunately, not all python functions can be converted due to the limits of current product (we are in the alpha stage), or sometimes due to inherent restrictions of FHE itself.
|
||||
However, you can already build interesting and impressing use cases, and more will be available in further versions of the framework.
|
||||
@@ -47,7 +47,7 @@ There are several approaches to compute bounds, and they will be discussed in th
|
||||
The final step is to transform the operation graph to equivalent `MLIR` code.
|
||||
How this is done will be explained in detail in its own chapter.
|
||||
|
||||
Once the MLIR is prepared, the rest of the stack, which you can learn more about [here](http://docs.zama.ai/concrete/), takes over and completes the compilation process.
|
||||
Once the MLIR is prepared, the rest of the stack, which you can learn more about [here](http://docs.zama.ai/), takes over and completes the compilation process.
|
||||
|
||||
Here is the visual representation of the pipeline:
|
||||
|
||||
@@ -117,7 +117,7 @@ Tracing is also responsible for indicating whether the values in the node would
|
||||
|
||||
The goal of topological transforms is to make more functions compilable.
|
||||
|
||||
With the current version of **Concrete**,floating point inputs and floating point outputs are not supported.
|
||||
With the current version of **Concrete Numpy**, floating point inputs and floating point outputs are not supported.
|
||||
However, if the floating points operations are intermediate operations, they can sometimes be fused into a single table lookup from integer to integer thanks to some specific transforms.
|
||||
|
||||
Let's take a closer look at the transforms we can currently perform.
|
||||
|
||||
@@ -35,7 +35,7 @@ The simplified graph of operations with the float subgraph condensed in a `Gener
|
||||
|
||||

|
||||
|
||||
## How is it done in **Concrete**?
|
||||
## How is it done in **Concrete Numpy**?
|
||||
|
||||
The first step consists in detecting where we go from floating point computation back to integers. This allows to identify the potential terminal node of the float subgraph we are going to fuse.
|
||||
|
||||
@@ -83,4 +83,4 @@ def non_fusable(x, y):
|
||||
return add_int
|
||||
```
|
||||
|
||||
From `add_int` you will find two `Add` nodes going from int to float (`x_1` and `y_1`) which we cannot represent with a single input table look-up. Kolmogorov–Arnold representation theorem states that every multivariate continuous function can be represented as a superposition of continuous functions of one variable ([from Wikipedia](https://en.wikipedia.org/wiki/Kolmogorov%E2%80%93Arnold_representation_theorem)), so the above case could be handled in future versions of **Concrete**.
|
||||
From `add_int` you will find two `Add` nodes going from int to float (`x_1` and `y_1`) which we cannot represent with a single input table look-up. Kolmogorov–Arnold representation theorem states that every multivariate continuous function can be represented as a superposition of continuous functions of one variable ([from Wikipedia](https://en.wikipedia.org/wiki/Kolmogorov%E2%80%93Arnold_representation_theorem)), so the above case could be handled in future versions of **Concrete** tools.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Contributing
|
||||
|
||||
```{important}
|
||||
There are two ways to contribute to **concrete-numpy**:
|
||||
There are two ways to contribute to **concrete-numpy** or to **Concrete** tools in general:
|
||||
- you can open issues to report bugs, typos and suggest ideas
|
||||
- you can ask to become an official contributor by emailing hello@zama.ai. Only approved contributors can send pull requests, so please make sure to get in touch before you do!
|
||||
```
|
||||
|
||||
@@ -33,7 +33,7 @@ Install Xming and use Xlaunch:
|
||||
|
||||
## Logging in and building the image
|
||||
|
||||
Docker image of **Concrete** is based on another docker image provided by the compiler team. Once you have access to this repository you should be able to launch the commands to build the dev docker image with `make docker_build`.
|
||||
Docker image of **Concrete-Numpy** is based on another docker image provided by the compiler team. Once you have access to this repository you should be able to launch the commands to build the dev docker image with `make docker_build`.
|
||||
|
||||
Upon joining to the team, you need to log in using the following command:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user