diff --git a/docs/compilation/statistics.md b/docs/compilation/statistics.md index e082943a04..31f7bb86e2 100644 --- a/docs/compilation/statistics.md +++ b/docs/compilation/statistics.md @@ -1,15 +1,18 @@ # Statistics +This document provides an overview of how to analyze compiled circuits and extract statistical data for performance evaluation in **Concrete**. These statistics help identify bottlenecks and compare circuits. -Concrete analyzes all compiled circuits and calculates some statistics. These statistics can be used to find bottlenecks and compare circuits. Statistics are calculated in terms of basic operations. There are 6 basic operations in Concrete: +## Basic operations +Concrete calculates statistics based on the following six basic operations: -* **clear addition:** x + y where x is encrypted and y is clear -* **encrypted addition:** x + y where both x and y are encrypted -* **clear multiplication:** x \* y where x is encrypted and y is clear -* **encrypted negation:** -x where x is encrypted -* **key switch:** building block for table lookups -* **packing key switch:** building block for table lookups -* **programmable bootstrapping:** building block for table lookups +* **Clear addition:** `x + y` where `x` is encrypted and `y` is clear +* **Encrypted addition:** `x + y` where both `x` and `y` are encrypted +* **Clear multiplication:** `x * y` where `x` is encrypted and `y` is clear +* **Encrypted negation:** `-x` where `x` is encrypted +* **Key switch:** A building block for table lookups +* **Packing key switch:** A building block for table lookups +* **Programmable bootstrapping:** A building block for table lookups +## Displaying statistics You can print all statistics using the `show_statistics` configuration option: ```python @@ -67,9 +70,9 @@ Each of these properties can be directly accessed on the circuit (e.g., `circuit ## Tags -Circuit analysis also considers [tags](../core-features/tagging.md)! +You can also use tags to analyze specific sections of your circuit. See more detailed explanation in [tags documentation](../core-features/tagging.md). -Imagine you have a neural network with 10 layers, each of them tagged. You can easily see the number of additions and multiplications required for matrix multiplications per layer: +Imagine you have a neural network with 10 layers, each of them tagged, you can easily see the number of additions and multiplications required for matrix multiplications per layer: ``` Statistics diff --git a/docs/execution-analysis/progressbar.md b/docs/execution-analysis/progressbar.md index 5bbcd3dec0..3cfa9aedea 100644 --- a/docs/execution-analysis/progressbar.md +++ b/docs/execution-analysis/progressbar.md @@ -1,6 +1,7 @@ # Progressbar +This document introduces the progressbar feature that provides visual feedback on the execution progress of large circuits, which can take considerable time to execute. -Big circuits can take a long time to execute, and waiting for execution to finish without having any indication of its progress can be frustrating. For this reason, progressbar feature is introduced: +The following Python code demonstrates how to enable and use the progressbar: ```python import time @@ -88,14 +89,14 @@ axs[1].axis("off") plt.show() ``` -When you run this code, you will see a progressbar like: +When you run this code, you will see a progressbar like this one: ``` Evaluation: 10% |█████.............................................| 10% (scaling.r) ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^ Title Progressbar Tag ``` -And as the circuit progresses, this progressbar would fill: +As the execution proceeds, the progress bar updates: ``` Evaluation: 30% |███████████████...................................| 30% (scaling.g) ``` @@ -104,7 +105,7 @@ Evaluation: 50% |████████████████████ ``` {% hint style="info" %} -It is not a uniform progressbar. For example, when the progressbar shows 50%, this does not mean that half of the execution is performed in terms of seconds. Instead, it means that half of the nodes in the graph have been calculated. Since different node types can take a different amount of time, this should not be used to get an ETA. +The progress bar does not measure time. When it shows 50%, it indicates that half of the nodes in the computation graph have been processed, not that half of the time has elapsed. The duration of processing different node types may vary, so the progress bar should not be used to estimate the remaining time. {% endhint %} Once the progressbar fills and execution completes, you will see the following figure: