Skip to content

Commit

Permalink
fix(ci): fix the doc verification
Browse files Browse the repository at this point in the history
  • Loading branch information
aPere3 committed Jan 26, 2024
1 parent a02bf3b commit f113e8b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ def FHE_LsbEintOp: FHE_Op<"lsb", [Pure, UnaryEint, ConstantNoise]> {
let summary = "Extract the lowest significant bit at a given precision.";

let description = [{
This operation extract the lsb of a ciphertext in a specific precision.
This operation extracts the lsb of a ciphertext in a specific precision.

Extracting the lsb with the smallest precision:
```mlir
Expand Down Expand Up @@ -499,14 +499,14 @@ def FHE_ReinterpretPrecisionEintOp: FHE_Op<"reinterpret_precision", [Pure, Unary

let description = [{
Changing the precision of a ciphertext.
It change both the precision, the value and in certain case the correctness of the cyphertext.
It changes both the precision, the value, and in certain cases the correctness of the ciphertext.

Changing to
- a bigger precision is always safe.
This is equivalent to a shift left for the value
This is equivalent to a shift left for the value.
- a smaller precision is only safe if you clear the lowest bits that are discarded.
If not, you can assume small errors on the next TLU.
This is equivalent to a shift right for the value
This is equivalent to a shift right for the value.

Example:
```mlir
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1355,7 +1355,7 @@ def FHELinalg_LsbEintOp: FHELinalg_Op<"lsb", [Pure, TensorUnaryEint, UnaryEint,
let summary = "Extract the lowest significant bit at a given precision.";

let description = [{
This operation extract the lsb of a ciphertext tensor in a specific precision.
This operation extracts the lsb of a ciphertext tensor in a specific precision.

Extracting only 1 bit:
```mlir
Expand Down Expand Up @@ -1388,14 +1388,14 @@ def FHELinalg_ReinterpretPrecisionEintOp: FHELinalg_Op<"reinterpret_precision",
let summary = "Reinterpret the ciphertext tensor with a different precision.";

let description = [{
It's a reinterpret cast changing only the precision.
It's a reinterpretation cast which changes only the precision.
On CRT represention, it does nothing.
On Native representation, it moves the message/noise frontier, effectively changing the precision.
On Native representation, it moves the message/noise further forward, effectively changing the precision.
Changing to
- a bigger precision is safe, as the crypto-parameters are chosen such that only zeros will comes from the noise part.
- a bigger precision is safe, as the crypto-parameters are chosen such that only zeros will come from the noise part.
This is equivalent to a shift left for the value
- a smaller precision is only safe if you clear the message lowests bits first.
If not, you can assume small errors with high probability and frequent bigger errors, which can be contained to smalls errors using margins.
- a smaller precision is only safe if you clear the lowest message bits first.
If not, you can assume small errors with high probability and frequent bigger errors, which can be contained to small errors using margins.
This is equivalent to a shift right for the value

Example:
Expand Down

0 comments on commit f113e8b

Please sign in to comment.