Skip to content

Commit c6c6f4b

Browse files
authored
Documentation and Tutorials Update (#66)
* Cleanup unsupported ring dimensions * Refactor old tutorials * Documentation update to match changes on PR (#64) * Update kerngen/README.md
1 parent 6606881 commit c6c6f4b

File tree

11 files changed

+11
-35
lines changed

11 files changed

+11
-35
lines changed

kerngen/README.md

+5-9
Original file line numberDiff line numberDiff line change
@@ -104,29 +104,25 @@ All other commands are assumed to be operations. All operations are case
104104
insensitive, but the convention we use is the operations are capitalized. These
105105
are defined in the [manifest.json](./pisa_generators/manifest.json) file.
106106
```
107-
CONTEXT BGV 8192 4
107+
CONTEXT BGV 8192 4 3
108108
DATA a 2
109109
DATA b 2
110110
DATA c 2
111111
ADD c a b
112112
```
113113

114114
## CONTEXT
115-
Context defines the global properties `(scheme, poly_order, max_rns,
116-
key_rns(optional))` of the input script.
115+
Context defines the global properties `(scheme, poly_ring_dimension, max_rns,
116+
current_rns)` of the input script.
117117
`CONTEXT` sets a global context for properties required by the kernels.
118118
- first field defines what we call scheme. In reality, it specifies the set of
119119
kernel instructions given in the manifest file, see
120120
[manifest.json](./pisa_generators/manifest.json).
121121
- second field defines the polynomial size for the `DATA`. This is required by
122122
the generating kernels to define how many units (multiples of the native polynomial
123123
size, 8192 in HERACLES silicon case) are required and handled.
124-
- third field defines the max RNS, the global max number of how many 32 bit prime number moduli
125-
(HERACLES silicon case) are in the modulus chain that the kernels can have or need to handle.
126-
- (optional) fourth field defines the key RNS, the number of additional moduli
127-
that the relinearization key has relative to the third field. i.e. If `max_rns`
128-
is 3 and `key_rns` is 1 the total max RNS of the relinearization key will be 4.
129-
Note this field is only required for calling the `relin` kernel.
124+
- third field defines the key RNS, i.e. the total max RNS of the relinearization key, typically the global max number of how many 32 bit prime number moduli (HERACLES silicon case) are in the modulus chain that the kernels can have or need to handle + 1.
125+
- fourth field defines the number of RNS terms in the current polynomial.
130126

131127
## DATA
132128
`DATA` defines polynomial symbols to be used and their attribute(s) (`num_parts`) where

kerngen/tutorials/SimpleExamples/ADD_8K1rns.ker

-5
This file was deleted.

kerngen/tutorials/SimpleExamples/ADD_8K4rns.ker

-5
This file was deleted.

kerngen/tutorials/SimpleExamples/ADD_C8K1rns.ker

-5
This file was deleted.

kerngen/tutorials/SimpleExamples/ADD_C8K4rns.ker

-5
This file was deleted.

kerngen/tutorials/SimpleExamples/ADD_16K1rns.ker renamed to tutorials/kerngen/SimpleExamples/ADD_16K1rns.ker

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CONTEXT BGV 16384 1
1+
CONTEXT BGV 16384 2 1
22
DATA a 1
33
DATA b 1
44
DATA c 1

kerngen/tutorials/SimpleExamples/ADD_16K4rns.ker renamed to tutorials/kerngen/SimpleExamples/ADD_16K4rns.ker

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CONTEXT BGV 16384 4
1+
CONTEXT BGV 16384 5 4
22
DATA a 1
33
DATA b 1
44
DATA c 1

kerngen/tutorials/SimpleExamples/ADD_C16K1rns_pyramid.ker renamed to tutorials/kerngen/SimpleExamples/ADD_C16K1rns_pyramid.ker

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CONTEXT BGV 16384 1
1+
CONTEXT BGV 16384 2 1
22
# inputs
33
DATA a 2
44
DATA b 2

kerngen/tutorials/SimpleExamples/ADD_C16K4rns.ker renamed to tutorials/kerngen/SimpleExamples/ADD_C16K4rns.ker

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CONTEXT BGV 16384 4
1+
CONTEXT BGV 16384 5 4
22
DATA a 2
33
DATA b 2
44
DATA c 2

kerngen/tutorials/SimpleExamples/MUL_C16K1rns.ker renamed to tutorials/kerngen/SimpleExamples/MUL_C16K1rns.ker

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CONTEXT BGV 16384 1 1
1+
CONTEXT BGV 16384 2 1
22
DATA a 2
33
DATA b 2
44
DATA c 3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CONTEXT BGV 16384 1 1
1+
CONTEXT BGV 16384 2 1
22
DATA a 3
33
DATA b 2
44
RELIN b a

0 commit comments

Comments
 (0)