Skip to content

Commit

Permalink
docs: refactor and update benchmarks pages
Browse files Browse the repository at this point in the history
Benchmarks tables are rendered as descriptive SVG images.
Sort results by backend to have a clearer view in tree of content.
PBS benchmarks now display results for various p-fail and several
precisions.
  • Loading branch information
soonum committed Feb 20, 2025
1 parent 6b21bff commit 6537de1
Show file tree
Hide file tree
Showing 20 changed files with 1,624 additions and 38 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ package-lock.json

# Dir used for backward compatibility test data
tests/tfhe-backward-compat-data/
ci/
9 changes: 6 additions & 3 deletions tfhe/docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@
* [What is TFHE-rs?](getting_started/readme.md)
* [Installation](getting_started/installation.md)
* [Quick start](getting_started/quick_start.md)
* [Benchmarks](getting_started/benchmarks/summary.md)
* [CPU Benchmarks](getting_started/benchmarks/cpu_benchmarks.md)
* [GPU Benchmarks](getting_started/benchmarks/gpu_benchmarks.md)
* [Benchmarks](getting_started/benchmarks/README.md)
* [CPU Benchmarks](getting_started/benchmarks/cpu/README.md)
* [Integer](getting_started/benchmarks/cpu/cpu_integer_operations.md)
* [Programmable bootstrapping](getting_started/benchmarks/cpu/cpu_programmable_bootstrapping.md)
* [GPU Benchmarks](getting_started/benchmarks/gpu/README.md)
* [Integer](getting_started/benchmarks/gpu/gpu_integer_operations.md)
* [Zero-knowledge proof benchmarks](getting_started/benchmarks/zk_proof_benchmarks.md)
* [Security and cryptography](getting_started/security_and_cryptography.md)

Expand Down
2 changes: 1 addition & 1 deletion tfhe/docs/configuration/run_on_gpu.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ TFHE-rs supports platforms with multiple GPUs. There is **nothing to change in t

## Benchmark

Please refer to the [GPU benchmarks](../getting_started/benchmarks/gpu_benchmarks.md) for detailed performance benchmark results.
Please refer to the [GPU benchmarks](../getting_started/benchmarks/gpu/summary.md) for detailed performance benchmark results.

Check failure on line 167 in tfhe/docs/configuration/run_on_gpu.md

View workflow job for this annotation

GitHub Actions / cargo-builds (large_ubuntu_16)

broken link

/home/runner/work/tfhe-rs/tfhe-rs/tfhe/docs/configuration/../getting_started/benchmarks/gpu/summary.md. Target filename not found.

## Warning

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Benchmarks

This document summarizes the timings of some homomorphic operations over 64-bit encrypted integers, depending on the hardware. More details are given for [the CPU](cpu\_benchmarks.md), [the GPU](gpu\_benchmarks.md), or [zeros-knowledge proofs](zk\_proof\_benchmarks.md).
This document summarizes the timings of some homomorphic operations over 64-bit encrypted integers, depending on the hardware. More details are given for [the CPU](cpu/summary.md), [the GPU](gpu/summary.md), or [zeros-knowledge proofs](zk_proof_benchmarks.md).

Check failure on line 3 in tfhe/docs/getting_started/benchmarks/README.md

View workflow job for this annotation

GitHub Actions / cargo-builds (large_ubuntu_16)

broken link

/home/runner/work/tfhe-rs/tfhe-rs/tfhe/docs/getting_started/benchmarks/cpu/summary.md. Target filename not found.

Check failure on line 3 in tfhe/docs/getting_started/benchmarks/README.md

View workflow job for this annotation

GitHub Actions / cargo-builds (large_ubuntu_16)

broken link

/home/runner/work/tfhe-rs/tfhe-rs/tfhe/docs/getting_started/benchmarks/gpu/summary.md. Target filename not found.

The cryptographic parameters used for benchmarking follow a tweaked uniform (TUniform) noise distribution instead of a Gaussian. The main advantage of this distribution is to be bounded, whereas the usual Gaussian one is not. In some practical cases, this can simplify the use of homomorphic computation. See the [noise section](../security\_and\_cryptography.md#noise) of the Security and cryptography documentation page for more information on the noise distributions.
The cryptographic parameters used for benchmarking follow a tweaked uniform (TUniform) noise distribution instead of a Gaussian. The main advantage of this distribution is to be bounded, whereas the usual Gaussian one is not. In some practical cases, this can simplify the use of homomorphic computation. See the [noise section](../security_and_cryptography.md#noise) of the Security and cryptography documentation page for more information on the noise distributions.

You can get the parameters used for benchmarks by cloning the repository and checking out the commit you want to use (starting with the v0.8.0 release) and run the following make command:

```console
make print_doc_bench_parameters
```

### Operation time (ms) over FheUint 64
### Operation time over FheUint 64

{% embed url="https://docs.google.com/spreadsheets/d/1OMdGSakEUbIFSEQKhAinTolJjvmPBbafi3DEe3UfzsQ/edit?usp=sharing" %}
![](./cpu_gpu_integer_benchmark_fheuint64_tuniform_2m64_ciphertext.svg)
12 changes: 12 additions & 0 deletions tfhe/docs/getting_started/benchmarks/cpu/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Benchmarks over CPU

This document details the CPU performance benchmarks of homomorphic operations using **TFHE-rs**.

By their nature, homomorphic operations run slower than their cleartext equivalents.

{% hint style="info" %}
All CPU benchmarks were launched on an `AWS hpc7a.96xlarge` instance equipped with an `AMD EPYC 9R14 CPU @ 2.60GHz` and 740GB of RAM.
{% endhint %}

* [Integer operations](cpu_integer_operations.md)
* [Programmable Bootstrapping](cpu_programmable_bootstrapping.md)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 6537de1

Please sign in to comment.