Skip to content

Conversation

christopherngutierrez
Copy link
Contributor

@christopherngutierrez christopherngutierrez commented Sep 3, 2024

Proposed changes

This PR implements the an experimental fix for a few issues in the RELIN kernel. Namely, the RELIN kernel generated code that was segmented due issues with composing DigitalDecompExtend and Keymul together. This fix uses internal temporary variables output_tmp , which will be refactored out in a following PR. Further, the input polynomials parts are hardcoded to 3 and output parts to 2 since the code assumes those sizes (also to be refactored to be more generic in the future).

Today the RELIN kernel only supports 16k polynomials due to a limitation of the NTT/INTT kernels. This limitation is being removed and the RELIN kernel will be updated accordingly.

Types of changes

What types of changes does your code introduce to the HE Toolkit project?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update (if none of the other choices apply)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating
the PR. If you are unsure about any of them, do not hesitate to ask. We are
here to help! This is simply a reminder of what we are going to look for before
merging your code.

  • I have read the CONTRIBUTING agreement
  • Current formatting and unit tests / base functionality passes locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in downstream modules

Further comments

jobottle
jobottle previously approved these changes Sep 9, 2024
Copy link
Contributor

@jobottle jobottle left a comment

Choose a reason for hiding this comment

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

LGTM, confirmed passing validation tests

kylanerace
kylanerace previously approved these changes Sep 13, 2024
Copy link
Collaborator

@kylanerace kylanerace left a comment

Choose a reason for hiding this comment

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

LGTM, passing as well

@faberga
Copy link
Collaborator

faberga commented Sep 17, 2024

Hi @christopherngutierrez ,

Two comments:

I have some questions about the python constructs used in relin.py, particularly storing the "opts" or lists in a variable just to return them at the end of the code block. Since the code block already builds a list, it could be returned directly.

Since you already stated the need for refactoring, and this PR seems to be passing the validation tests, why not use this as your base and refactor now?

-Flavio

@faberga faberga mentioned this pull request Sep 17, 2024
9 tasks
Removed variable from opts from relin.
Copy link
Collaborator

@kylanerace kylanerace left a comment

Choose a reason for hiding this comment

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

LGTM, Ran E2E for me with recent change

@faberga faberga merged commit 7b3a125 into main Sep 18, 2024
3 checks passed
@faberga faberga deleted the christopherngutierrez/relin branch September 18, 2024 16:33
@faberga faberga added the bug Something isn't working label Sep 18, 2024
christopherngutierrez added a commit that referenced this pull request Oct 21, 2024
This PR implements the an experimental fix for a few issues in the RELIN kernel. Namely, the RELIN kernel generated code that was segmented due issues with composing DigitalDecompExtend and Keymul together. This fix uses internal temporary variables output_tmp , which will be refactored out in a following PR. Further, the input polynomials parts are hardcoded to 3 and output parts to 2 since the code assumes those sizes (also to be refactored to be more generic in the future).

Today the RELIN kernel only supports 16k polynomials due to a limitation of the NTT/INTT kernels. This limitation is being removed and the RELIN kernel will be updated accordingly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants