From f113e8bcfe5d5605a2a42813e8997b13879cedec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20P=C3=A9r=C3=A9?= Date: Thu, 25 Jan 2024 10:19:14 +0100 Subject: [PATCH] fix(ci): fix the doc verification --- .../include/concretelang/Dialect/FHE/IR/FHEOps.td | 8 ++++---- .../Dialect/FHELinalg/IR/FHELinalgOps.td | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/compilers/concrete-compiler/compiler/include/concretelang/Dialect/FHE/IR/FHEOps.td b/compilers/concrete-compiler/compiler/include/concretelang/Dialect/FHE/IR/FHEOps.td index c763a58c8..1b26a0d57 100644 --- a/compilers/concrete-compiler/compiler/include/concretelang/Dialect/FHE/IR/FHEOps.td +++ b/compilers/concrete-compiler/compiler/include/concretelang/Dialect/FHE/IR/FHEOps.td @@ -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 @@ -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 diff --git a/compilers/concrete-compiler/compiler/include/concretelang/Dialect/FHELinalg/IR/FHELinalgOps.td b/compilers/concrete-compiler/compiler/include/concretelang/Dialect/FHELinalg/IR/FHELinalgOps.td index 23d5f13d8..69c91f698 100644 --- a/compilers/concrete-compiler/compiler/include/concretelang/Dialect/FHELinalg/IR/FHELinalgOps.td +++ b/compilers/concrete-compiler/compiler/include/concretelang/Dialect/FHELinalg/IR/FHELinalgOps.td @@ -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 @@ -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: