Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(frontend): showcase overflow detection #831

Merged
merged 1 commit into from
Jun 24, 2024

Conversation

youben11
Copy link
Member

No description provided.

@cla-bot cla-bot bot added the cla-signed label May 16, 2024
@youben11
Copy link
Member Author

youben11 commented May 23, 2024

Updated based on #846

Copy link
Member

@BourgerieQuentin BourgerieQuentin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yuxizama can you make a pass

@youben11 youben11 changed the base branch from main to release/2.7.x June 24, 2024 13:03
Copy link
Contributor

@yuxizama yuxizama left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some suggestions

@@ -1,6 +1,6 @@
# Simulation

During development, the speed of homomorphic execution can be a blocker for fast prototyping. You could call the function you're trying to compile directly, of course, but it won't be exactly the same as FHE execution, which has a certain probability of error (see [Exactness](../core-features/table\_lookups.md#table-lookup-exactness)).
During development, the speed of homomorphic execution can be a blocker for fast prototyping. You could call the function you're trying to compile directly, of course, but it won't be exactly the same as FHE execution, which has a certain probability of error (see [Exactness](../core-features/table_lookups.md#table-lookup-exactness)).
Copy link
Contributor

@yuxizama yuxizama Jun 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
During development, the speed of homomorphic execution can be a blocker for fast prototyping. You could call the function you're trying to compile directly, of course, but it won't be exactly the same as FHE execution, which has a certain probability of error (see [Exactness](../core-features/table_lookups.md#table-lookup-exactness)).
This document explains how to use the simulation feature to speedup prototyping and detect overflows during Fully Homomorphic Encryption (FHE) computation.
Simulation allows to mimic the behavior of FHE execution without actually performing the encrypted computations.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This original sentence is not very clear to me:
" You could call the function you're trying to compile directly, of course, but it won't be exactly the same as FHE execution, which has a certain probability of error "

  • Is this sentence describing the simulation feature? or the issue to be addressed by the simulation feature?
  • What does "it" refers to - the simulated function?
  • What doesn "which" refers to - the FHE function? of the simulation process?

I would suggest rewriting this part with better clarity.
For example,

Simulations allow to.... (what does it do) It is helpful to .....(why is it useful)

@@ -34,3 +34,24 @@ After the simulation runs, it prints the following:
{% hint style="warning" %}
There are some operations which are not supported in simulation yet. They will result in compilation failures. You can revert to simulation using graph execution using `circuit.graph(...)` instead of `circuit.simulate(...)`, which won't simulate FHE, but it will evaluate the computation graph, which is like simulating the operations without any errors due to FHE.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
There are some operations which are not supported in simulation yet. They will result in compilation failures. You can revert to simulation using graph execution using `circuit.graph(...)` instead of `circuit.simulate(...)`, which won't simulate FHE, but it will evaluate the computation graph, which is like simulating the operations without any errors due to FHE.
Some operations are not yet supported in simulation and will result in compilation failures. In such cases, you can use graph execution with `circuit.graph(...)` instead of `circuit.simulate(...)`. This will evaluate the computation graph without simulating FHE errors.

docs/execution-analysis/simulation.md Outdated Show resolved Hide resolved
docs/execution-analysis/simulation.md Outdated Show resolved Hide resolved
docs/execution-analysis/simulation.md Outdated Show resolved Hide resolved
docs/execution-analysis/simulation.md Outdated Show resolved Hide resolved
Co-authored-by: yuxizama <157474013+yuxizama@users.noreply.github.com>
@youben11 youben11 merged commit ae48a68 into release/2.7.x Jun 24, 2024
12 of 13 checks passed
@youben11 youben11 deleted the docs/overflow-detection branch June 24, 2024 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants