mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-08 11:35:02 -05:00
chore: lowercase for filenames
This commit is contained in:
committed by
Benoit Chevallier
parent
6b3adc217f
commit
bdb1140bee
4
Makefile
4
Makefile
@@ -311,11 +311,11 @@ todo:
|
||||
|
||||
.PHONY: supported_functions # Update docs with supported functions
|
||||
supported_functions:
|
||||
poetry run python script/doc_utils/gen_supported_ufuncs.py docs/user/howto/NUMPY_SUPPORT.md
|
||||
poetry run python script/doc_utils/gen_supported_ufuncs.py docs/user/howto/numpy_support.md
|
||||
|
||||
.PHONY: check_supported_functions # Check supported functions (for the doc)
|
||||
check_supported_functions:
|
||||
poetry run python script/doc_utils/gen_supported_ufuncs.py docs/user/howto/NUMPY_SUPPORT.md --check
|
||||
poetry run python script/doc_utils/gen_supported_ufuncs.py docs/user/howto/numpy_support.md --check
|
||||
|
||||
.PHONY: licenses # Generate the list of licenses of dependencies
|
||||
licenses:
|
||||
|
||||
@@ -125,7 +125,7 @@ Let's take a closer look at the transforms we perform today.
|
||||
### Fusing floating point operations
|
||||
|
||||
We decided to allocate a whole new chapter to explain float fusing.
|
||||
You can find it [here](./FLOAT-FUSING.md).
|
||||
You can find it [here](./float-fusing.md).
|
||||
|
||||
## Bounds measurement
|
||||
|
||||
@@ -212,7 +212,7 @@ Assigned Data Types:
|
||||
|
||||
## MLIR conversion
|
||||
|
||||
The actual compilation will be done by the **Concrete** compiler, which is expecting an MLIR input. The MLIR conversion goes from an operation graph to its MLIR equivalent. You can read more about it [here](./MLIR.md)
|
||||
The actual compilation will be done by the **Concrete** compiler, which is expecting an MLIR input. The MLIR conversion goes from an operation graph to its MLIR equivalent. You can read more about it [here](./mlir.md)
|
||||
|
||||
## Example walkthrough #1
|
||||
|
||||
@@ -4,8 +4,8 @@ Explanations
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
COMPILATION.md
|
||||
TERMINOLOGY_AND_STRUCTURE.md
|
||||
FLOAT-FUSING.md
|
||||
MLIR.md
|
||||
QUANTIZATION.md
|
||||
compilation.md
|
||||
terminology_and_structure.md
|
||||
float-fusing.md
|
||||
mlir.md
|
||||
quantization.md
|
||||
|
||||
@@ -4,8 +4,8 @@ How To
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
PROJECT_SETUP.md
|
||||
DOCKER.md
|
||||
DOCUMENTING.md
|
||||
RELEASING.md
|
||||
CONTRIBUTING.md
|
||||
project_setup.md
|
||||
docker.md
|
||||
documenting.md
|
||||
releasing.md
|
||||
contributing.md
|
||||
|
||||
@@ -5,7 +5,7 @@ FIXME(Arthur): to check what needs to be updated here
|
||||
# Project Setup
|
||||
|
||||
```{note}
|
||||
You will need Zama's specific environment with zamalang module to have the project fully functional. It is currently only delivered via the docker image (see the [docker](./DOCKER.md) guide).
|
||||
You will need Zama's specific environment with zamalang module to have the project fully functional. It is currently only delivered via the docker image (see the [docker](./docker.md) guide).
|
||||
```
|
||||
|
||||
## Installing Python v3.8
|
||||
@@ -10,7 +10,7 @@ import concrete.numpy as hnp
|
||||
|
||||
## Defining a function to compile
|
||||
|
||||
You need to have a python function that follows the [limits](../explanation/FHE_AND_FRAMEWORK_LIMITS.md) of the **Concrete Framework**. Here is a simple example:
|
||||
You need to have a python function that follows the [limits](../explanation/fhe_and_framework_limits.md) of the **Concrete Framework**. Here is a simple example:
|
||||
|
||||
<!--python-test:cont-->
|
||||
```python
|
||||
@@ -101,6 +101,6 @@ FIXME(benoit): explain the API to encrypt, run_inference, decrypt, keygen etc wh
|
||||
|
||||
## Further reading
|
||||
|
||||
- [Working With Floating Points Tutorial](../tutorial/WORKING_WITH_FLOATING_POINTS.md)
|
||||
- [Table Lookup Tutorial](../tutorial/TABLE_LOOKUP.md)
|
||||
- [Compiling a torch model](../tutorial/COMPILING_TORCH_MODEL.md)
|
||||
- [Working With Floating Points Tutorial](../tutorial/working_with_floating_points.md)
|
||||
- [Table Lookup Tutorial](../tutorial/table_lookup.md)
|
||||
- [Compiling a torch model](../tutorial/compiling_torch_model.md)
|
||||
@@ -4,7 +4,7 @@ Getting Started
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
INTRO.md
|
||||
INSTALLING.md
|
||||
COMPILING_AND_EXECUTING.md
|
||||
intro.md
|
||||
installing.md
|
||||
compiling_and_executing.md
|
||||
benchmarks.md
|
||||
|
||||
@@ -33,14 +33,14 @@ Basically, we have divided our documentation into several parts:
|
||||
## A work in progress
|
||||
|
||||
```{note}
|
||||
Concrete is a work in progress, and is currently limited to a certain number of operators and features. In the future, there will be improvements as described in this [section](../explanation/FUTURE_FEATURES.md).
|
||||
Concrete is a work in progress, and is currently limited to a certain number of operators and features. In the future, there will be improvements as described in this [section](../explanation/future_features.md).
|
||||
```
|
||||
|
||||
The main _current_ limits are:
|
||||
- **Concrete** is only supporting unsigned integers
|
||||
- **Concrete** needs the integer to be less than 7 bits (included)
|
||||
|
||||
These limits can be taken care of with the use of quantization, as explained a bit further in [this](../explanation/QUANTIZATION.md) and [this](../howto/REDUCE_NEEDED_PRECISION.md) parts of the documentation.
|
||||
These limits can be taken care of with the use of quantization, as explained a bit further in [this](../explanation/quantization.md) and [this](../howto/reduce_needed_precision.md) parts of the documentation.
|
||||
|
||||
```{warning}
|
||||
FIXME(Jordan): speak about our quantization framework
|
||||
@@ -10,7 +10,7 @@ However, one still has to consider that FHE is slow, as compared to the vanilla
|
||||
|
||||
### Multiplying by constants
|
||||
|
||||
In the scheme used in the **Concrete Framework**, namely [TFHE](https://tfhe.github.io/tfhe/), multiplications by constants is only defined for integer constants. Notably, one can't multiply by floats. As float multiplication is very usual in the data science (think of weights of dense layers, for example), this could be a problem, but quantization is at our rescue. See [this](QUANTIZATION.md) section for more details.
|
||||
In the scheme used in the **Concrete Framework**, namely [TFHE](https://tfhe.github.io/tfhe/), multiplications by constants is only defined for integer constants. Notably, one can't multiply by floats. As float multiplication is very usual in the data science (think of weights of dense layers, for example), this could be a problem, but quantization is at our rescue. See [this](quantization.md) section for more details.
|
||||
|
||||
### Achieving computations of not-linear functions
|
||||
|
||||
@@ -26,7 +26,7 @@ Since this is an early version of the product, not everything is done, to say th
|
||||
FIXME(Benoit): we'll see later if this is still a valid limit, #1111
|
||||
```
|
||||
|
||||
As of today, the execution of the FHE program is done locally. Notably, in the current version, there is no client (on which we encrypt the private data, or decrypt the returned result) or server (on which the computation is done completely over encrypted data), but a single host. As explained in [this section](FUTURE_FEATURES.md), this limit will be removed in the next version, such that the **Concrete Framework** can be used in production.
|
||||
As of today, the execution of the FHE program is done locally. Notably, in the current version, there is no client (on which we encrypt the private data, or decrypt the returned result) or server (on which the computation is done completely over encrypted data), but a single host. As explained in [this section](future_features.md), this limit will be removed in the next version, such that the **Concrete Framework** can be used in production.
|
||||
|
||||
### Currently slow
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Future Features
|
||||
|
||||
As explained in [this section](FHE_AND_FRAMEWORK_LIMITS.md#concrete-framework-limits), the **Concrete Framework**
|
||||
As explained in [this section](fhe_and_framework_limits.md#concrete-framework-limits), the **Concrete Framework**
|
||||
is currently in a preliminary version, and quite constrained in term of functionalities. However, the good
|
||||
news is that we are going to release new versions regularly, where a lot of functionalities will be added progressively.
|
||||
|
||||
@@ -4,7 +4,7 @@ Explanations
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
WHAT_IS_FHE.md
|
||||
FHE_AND_FRAMEWORK_LIMITS.md
|
||||
QUANTIZATION.md
|
||||
FUTURE_FEATURES.md
|
||||
what_is_fhe.md
|
||||
fhe_and_framework_limits.md
|
||||
quantization.md
|
||||
future_features.md
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
```{warning}
|
||||
FIXME(Jordan/Andrei): see if this is still appropriate, update etc; make link with USE_QUANTIZATION.md
|
||||
FIXME(Jordan/Andrei): see if this is still appropriate, update etc; make link with use_quantization.md
|
||||
```
|
||||
|
||||
# Quantization
|
||||
@@ -12,7 +12,7 @@ from [Wikipedia](https://en.wikipedia.org/wiki/Quantization):
|
||||
|
||||
## Why is it needed?
|
||||
|
||||
Modern computing has long been using data types that use 32 or 64 bits (be that integers or floating point numbers), or even bigger data types. However due to the costly nature of FHE computations (see [the limits of FHE](FHE_AND_FRAMEWORK_LIMITS.md)), using such types with FHE is impractical (or plain impossible) to have computations executing in a reasonable amount of time.
|
||||
Modern computing has long been using data types that use 32 or 64 bits (be that integers or floating point numbers), or even bigger data types. However due to the costly nature of FHE computations (see [the limits of FHE](fhe_and_framework_limits.md)), using such types with FHE is impractical (or plain impossible) to have computations executing in a reasonable amount of time.
|
||||
|
||||
## The gist of quantization
|
||||
|
||||
@@ -37,7 +37,7 @@ Hopefully, it is just a misunderstanding or a small mistake on your side, that o
|
||||
|
||||
## Having a look to the compilation artifacts
|
||||
|
||||
When things are more complicated, or if you want to have a look by yourself, you may want to have a look to the compilation reports, which are called artifacts. This is as simple as described in [here](../tutorial/COMPILATION_ARTIFACTS.md)
|
||||
When things are more complicated, or if you want to have a look by yourself, you may want to have a look to the compilation reports, which are called artifacts. This is as simple as described in [here](../tutorial/compilation_artifacts.md)
|
||||
|
||||
The artifact system will create a directory, containing:
|
||||
- **environment.txt:** information about your system
|
||||
@@ -66,7 +66,7 @@ To simplify our work and let us reproduce your bug easily, we need all the infor
|
||||
- any insight you might have on the bug
|
||||
- any workaround you have been able to find
|
||||
|
||||
Remember, **Concrete Framework** is a project where we are open to contributions, more information at [Contributing](../../dev/howto/CONTRIBUTING.md).
|
||||
Remember, **Concrete Framework** is a project where we are open to contributions, more information at [Contributing](../../dev/howto/contributing.md).
|
||||
|
||||
## Submitting an issue
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
## What is **Concrete**?
|
||||
|
||||
See [here](../basics/INTRO.md)
|
||||
See [here](../basics/intro.md)
|
||||
|
||||
## Is it an open source project?
|
||||
|
||||
@@ -4,9 +4,9 @@ How To
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
NUMPY_SUPPORT.md
|
||||
PRINTING_AND_DRAWING.md
|
||||
USE_QUANTIZATION.md
|
||||
REDUCE_NEEDED_PRECISION.md
|
||||
DEBUG_SUPPORT_SUBMIT_ISSUES.md
|
||||
FAQ.md
|
||||
numpy_support.md
|
||||
printing_and_drawing.md
|
||||
use_quantization.md
|
||||
reduce_needed_precision.md
|
||||
debug_support_submit_issues.md
|
||||
faq.md
|
||||
|
||||
@@ -91,7 +91,7 @@ List of supported binary functions if one of the two operators is a constant sca
|
||||
|
||||
## Indexing
|
||||
|
||||
Indexing is described in [this section](../tutorial/INDEXING.md).
|
||||
Indexing is described in [this section](../tutorial/indexing.md).
|
||||
|
||||
|
||||
## Other machine-learning-related operators
|
||||
@@ -119,7 +119,7 @@ The framework also gives support for:
|
||||
- true div, i.e., `x / y`: if one of `x` or `y` is a constant
|
||||
- floor div, i.e., `x // y`: if one of `x` or `y` is a constant
|
||||
|
||||
There is support for astype as well, e.g. `x.astype(numpy.int32)`. This allows to control which data type to use for computations. In the context of FHE going back to integers may allow to fuse floating point operations together, see [this tutorial](../tutorial/WORKING_WITH_FLOATING_POINTS.md) to see how to work with floating point values.
|
||||
There is support for astype as well, e.g. `x.astype(numpy.int32)`. This allows to control which data type to use for computations. In the context of FHE going back to integers may allow to fuse floating point operations together, see [this tutorial](../tutorial/working_with_floating_points.md) to see how to work with floating point values.
|
||||
|
||||
```{warning}
|
||||
FIXME(Umut): speak about `shape`
|
||||
@@ -5,7 +5,7 @@ FIXME(all): we should add an example drawing and printing with fusing (so subgra
|
||||
|
||||
# Printing and Drawing
|
||||
|
||||
Sometimes, it can be useful to print or draw fhe circuits, we provide methods to just do that. Please read [Compiling and Executing](../basics/COMPILING_AND_EXECUTING.md) before reading further to see how you can compile your function into an fhe circuit.
|
||||
Sometimes, it can be useful to print or draw fhe circuits, we provide methods to just do that. Please read [Compiling and Executing](../basics/compiling_and_executing.md) before reading further to see how you can compile your function into an fhe circuit.
|
||||
|
||||
## Printing
|
||||
|
||||
@@ -63,7 +63,7 @@ The input contains 28x28x8 = 6272 bits of information. In practice you could als
|
||||
This shows how adapting your data can allow you to use models that may require smaller data types (i.e. use less precision) to perform their computations.
|
||||
|
||||
```{note}
|
||||
Binarizing here is akin to quantization which is introduced [here](../explanation/QUANTIZATION.md). You can also find further resources on the linked page.
|
||||
Binarizing here is akin to quantization which is introduced [here](../explanation/quantization.md). You can also find further resources on the linked page.
|
||||
```
|
||||
|
||||
### There is a tolerance on the result
|
||||
@@ -12,7 +12,7 @@ def f(x):
|
||||
return np.sin(x)
|
||||
```
|
||||
|
||||
This function fails to compile because **Concrete Framework** doesn't support floating point outputs. When you try to compile it (you might want to check [this](../basics/COMPILING_AND_EXECUTING.md) to see how you can do that), an exception will be raised and the artifacts will be exported automatically.
|
||||
This function fails to compile because **Concrete Framework** doesn't support floating point outputs. When you try to compile it (you might want to check [this](../basics/compiling_and_executing.md) to see how you can do that), an exception will be raised and the artifacts will be exported automatically.
|
||||
|
||||
### environment.txt
|
||||
|
||||
@@ -226,7 +226,7 @@ This file contains information about the bounds of the final computation graph o
|
||||
%3 :: [32, 125]
|
||||
```
|
||||
|
||||
You can learn what bounds are [here](../../dev/explanation/TERMINOLOGY_AND_STRUCTURE.md).
|
||||
You can learn what bounds are [here](../../dev/explanation/terminology_and_structure.md).
|
||||
|
||||
### mlir.txt
|
||||
|
||||
@@ -245,4 +245,4 @@ module {
|
||||
|
||||
```
|
||||
|
||||
You can learn more about MLIR [here](../../dev/explanation/MLIR.md).
|
||||
You can learn more about MLIR [here](../../dev/explanation/mlir.md).
|
||||
@@ -4,9 +4,9 @@ Tutorial
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
COMPILING_TORCH_MODEL.md
|
||||
TABLE_LOOKUP.md
|
||||
WORKING_WITH_FLOATING_POINTS.md
|
||||
INDEXING.md
|
||||
MACHINE_LEARNING_TOOLS.md
|
||||
COMPILATION_ARTIFACTS.md
|
||||
compiling_torch_model.md
|
||||
table_lookup.md
|
||||
working_with_floating_points.md
|
||||
indexing.md
|
||||
machine_learning_tools.md
|
||||
compilation_artifacts.md
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Table Lookup
|
||||
|
||||
In this tutorial, we are going to go over the ways to perform direct table lookups in **Concrete Framework**. Please read [Compiling and Executing](../basics/COMPILING_AND_EXECUTING.md) before reading further to see how you can compile the functions below.
|
||||
In this tutorial, we are going to go over the ways to perform direct table lookups in **Concrete Framework**. Please read [Compiling and Executing](../basics/compiling_and_executing.md) before reading further to see how you can compile the functions below.
|
||||
|
||||
## Direct table lookup
|
||||
|
||||
@@ -78,7 +78,7 @@ Basically, we applied `squared` table to the first column and `cubed` to the sec
|
||||
|
||||
## Fused table lookup
|
||||
|
||||
Direct tables are tedious to prepare by hand. When possible, **Concrete Framework** fuses the floating point operations into table lookups automatically. There are some limitations on fusing operations, which you can learn more about on the next tutorial, [Working With Floating Points](./WORKING_WITH_FLOATING_POINTS.md).
|
||||
Direct tables are tedious to prepare by hand. When possible, **Concrete Framework** fuses the floating point operations into table lookups automatically. There are some limitations on fusing operations, which you can learn more about on the next tutorial, [Working With Floating Points](./working_with_floating_points.md).
|
||||
|
||||
Here is an example function that results in fused table lookup:
|
||||
|
||||
@@ -26,7 +26,7 @@ assert circuit.run(60) == f(60)
|
||||
print("All good!")
|
||||
```
|
||||
|
||||
One can look to [numpy supported functions](../howto/NUMPY_SUPPORT.md) for information about possible float operations.
|
||||
One can look to [numpy supported functions](../howto/numpy_support.md) for information about possible float operations.
|
||||
|
||||
|
||||
## Limitations
|
||||
@@ -37,4 +37,4 @@ This biggest one is that, because floating point operations are fused into table
|
||||
|
||||
To give a precise example, `100 - np.fabs(50 * (np.sin(x) + np.sin(y)))` cannot be compiled because the floating point part depends on both `x` and `y` (i.e., it cannot be rewritten in the form `100 - table[z]` for a `z` that could be computed easily from `x` and `y`).
|
||||
|
||||
To dive into implementation details, you may refer to [Fusing Floating Point Operations](../../dev/explanation/FLOAT-FUSING.md) document.
|
||||
To dive into implementation details, you may refer to [Fusing Floating Point Operations](../../dev/explanation/float-fusing.md) document.
|
||||
Reference in New Issue
Block a user