Skip to content

Commit

Permalink
fixed issues with mod with RNS > 3 for CKKS
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherngutierrez committed Nov 5, 2024
1 parent dfd7429 commit 6cd1096
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions kerngen/high_parser/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ def from_polys(cls, poly: "Polys", *, mode: str | None = None) -> "Polys":
case "last_rns":
copy.start_rns = copy.rns - 1
return cls(**vars(copy))
case "single_rns":
copy.rns = 1
return cls(**vars(copy))
case "last_part":
copy.start_parts = copy.parts - 1
return cls(**vars(copy))
Expand Down
2 changes: 1 addition & 1 deletion kerngen/pisa_generators/mod.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def generate_mod_stages() -> list[Stage]:
temp_input_last_rns,
p_half,
Polys.from_polys(
input_remaining_rns, mode="drop_last_rns"
input_remaining_rns, mode="single_rns"
),
last_q,
),
Expand Down

0 comments on commit 6cd1096

Please sign in to comment.