Skip to content

Commit

Permalink
chore: fixing broken links
Browse files Browse the repository at this point in the history
  • Loading branch information
bcm-at-zama committed Sep 5, 2022
1 parent 9f6bbfb commit e2d43a3
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 61 deletions.
2 changes: 1 addition & 1 deletion deps_licenses/licenses_linux_user.txt.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
MD5(poetry.lock)= c9ca01eaefec2ac0031a3f64bd35c149
MD5(poetry.lock)= 072c41b2b9369e35cb4c3cb173ef4faa
2 changes: 1 addition & 1 deletion deps_licenses/licenses_mac_user.txt.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
MD5(poetry.lock)= c9ca01eaefec2ac0031a3f64bd35c149
MD5(poetry.lock)= 072c41b2b9369e35cb4c3cb173ef4faa
4 changes: 2 additions & 2 deletions docs/advanced-topics/compilation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Compilation

Concrete-ML implements machine model inference using Concrete-Numpy as a backend. In order to execute in FHE, a numerical program written in Concrete-Numpy needs to be compiled. This functionality is [described here](https://docs.zama.ai/concrete-numpy/getting-started/compiling_and_executing), and Concrete-ML hides away most of the complexity of this step. The entire compilation process is done by Concrete-Numpy.
Concrete-ML implements machine model inference using Concrete-Numpy as a backend. In order to execute in FHE, a numerical program written in Concrete-Numpy needs to be compiled. This functionality is [described here](https://docs.zama.ai/concrete-numpy/getting-started/quick_start), and Concrete-ML hides away most of the complexity of this step. The entire compilation process is done by Concrete-Numpy.

From the perspective of the Concrete-ML user, the compilation process performed by Concrete-Numpy can be broken up into 3 steps:

Expand All @@ -12,7 +12,7 @@ Additionally, the [client/server API](client_server.md) packages the result of t

## **Concrete-Numpy** op-graphs and the Virtual Library

The first step in the list above takes a python function implemented using the Concrete-Numpy [supported operation set](https://docs.zama.ai/concrete-numpy/getting-started/numpy_support) and transforms it into an executable operation graph. In this step all the floating point subgraphs in the op-graph are fused and converted to Table Lookup operations.
The first step in the list above takes a python function implemented using the Concrete-Numpy [supported operation set](https://docs.zama.ai/concrete-numpy/getting-started/compatibility) and transforms it into an executable operation graph. In this step all the floating point subgraphs in the op-graph are fused and converted to Table Lookup operations.

This enables to:

Expand Down
2 changes: 1 addition & 1 deletion docs/advanced-topics/quantization.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def dequantize_output(self, qvalues: numpy.ndarray) -> numpy.ndarray:

Intermediary values computed during model inference might need to be re-scaled into the quantized domain of a subsequent model operator. For example, the output of a convolution layer in a neural network might have values that are 8 bits wide, with the next convolutional layer requiring that its inputs are at most 2 bits wide. In the non-encrypted realm, this implies that we need to make use of floating point operations. To make this work with integers as required by FHE, Concrete-ML uses a table lookup (TLU), which is a [way to encode univariate functions in FHE](https://docs.zama.ai/concrete-numpy/tutorials/table_lookup). Table lookups are expensive in FHE, and so should only be used when necessary.

The operations done by the activation function of a previous layer and additional re-scaling to the new quantized domain, which are all floating point operations, [can be fused to a single TLU](https://docs.zama.ai/concrete-numpy/tutorials/working_with_floating_points). Concrete-ML implements quantized operators that perform this fusion, significantly reducing the number of TLUs necessary to perform inference.
The operations done by the activation function of a previous layer and additional re-scaling to the new quantized domain, which are all floating point operations, [can be fused to a single TLU](https://docs.zama.ai/concrete-numpy/tutorials/floating_points). Concrete-ML implements quantized operators that perform this fusion, significantly reducing the number of TLUs necessary to perform inference.

There are 3 types of operators:

Expand Down
Binary file modified docs/autogenerated/pdoc.pdf
Binary file not shown.
3 changes: 1 addition & 2 deletions docs/developer-guide/api.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# API

Look at [this](https://www.conventionalcommits.org/en/v1.0.0/)
Look at [that](../autogenerated/pdoc.pdf)
The APIs of the project are detailed in a [pdf](../autogenerated/pdoc.pdf).
49 changes: 1 addition & 48 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions script/doc_utils/api_doc_pdf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ do
;;

"-h" | "--help")
echo "Usage: " $0
echo "Usage: $0"
exit 0
;;

Expand All @@ -21,24 +21,23 @@ do
;;
*)
echo "Unknown param : $1"
exit -1
exit 255
;;
esac
shift
done

OUTPUT_DIR_PDF="docs/autogenerated/"
PDOC=pdoc3

# Generate in pdf
rm -rf $OUTPUT_DIR_PDF
mkdir -p $OUTPUT_DIR_PDF
$PDOC --pdf src.concrete.ml > tmp.pdoc.output.txt 2>/dev/null
poetry run pdoc3 --pdf src.concrete.ml > tmp.pdoc.output.txt 2>/dev/null

# Problems of version
PANDOC_VERSION_IS_NOT_2=`pandoc --version | grep "pandoc 2." > /dev/null; echo $?`
PANDOC_VERSION_IS_NOT_2=$(pandoc --version | grep "pandoc 2." > /dev/null; echo $?)

if [ $PANDOC_VERSION_IS_NOT_2 -eq 0 ]
if [ "$PANDOC_VERSION_IS_NOT_2" -eq 0 ]
then
ENGINE="--pdf-engine"
else
Expand Down
1 change: 1 addition & 0 deletions script/make_utils/setup_os_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ if [[ "${OS_NAME}" == "Linux" ]]; then
pandoc \
openssl \
shellcheck \
texlive-latex-base texlive-latex-extra texlive-fonts-recommended texlive-xetex lmodern \
wget && \
${CLEAR_APT_LISTS:+$CLEAR_APT_LISTS} \
pip install --no-cache-dir --upgrade pip && \
Expand Down

0 comments on commit e2d43a3

Please sign in to comment.