Skip to content

Conversation

christopherngutierrez
Copy link
Contributor

@christopherngutierrez christopherngutierrez commented Jan 8, 2025

Parameter Options Handler

Proposed changes

  • Implements infrastructure for the handling of optional parameters for the directives in the kernel language semantics
  • Adds optional parameters for CONTEXT after rns parameters. Optional parameters are defined as key/value pairs (e.g. krns_delta=1).
  • Adds optional parameters for krns_delta and num_digits. krns_delta keyword is now required (krns = rns + krns_delta) to modify krns and num_digits will be use in a future feature.
  • Added test cases for invalid optional parameter formatting.

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

If this is a relatively large or complex change, kick off the discussion by
explaining why you chose the solution you did, what alternatives you
considered, etc.

@kylanerace
Copy link
Collaborator

kylanerace commented Jan 27, 2025

@christopherngutierrez Can you add a couple of examples using here in the discussion to show:
1. What the file looked like before this PR
2. What it looks like now (with newly required keywords)
3. An example of the optional parameters being used?

Got questions answered separately.

kylanerace
kylanerace previously approved these changes Jan 28, 2025
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.

Non-breaking change, adds additional functionality. LGTM

Copy link
Collaborator

@faberga faberga left a comment

Choose a reason for hiding this comment

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

Better call this file options_handler.py so not confuse/imply this files is optional.
Also make corresponding changes to the "imports" that use this file.

Everything else looks okay.

@christopherngutierrez
Copy link
Contributor Author

Better call this file options_handler.py so not confuse/imply this files is optional. Also make corresponding changes to the "imports" that use this file.

Everything else looks okay.

Done!

@kylanerace kylanerace self-requested a review February 4, 2025 17:45
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

@faberga faberga changed the title Extend Optional Parameters for Context Parameter Options Handler Feb 4, 2025
@faberga faberga merged commit 183410c into main Feb 4, 2025
3 checks passed
@faberga faberga deleted the christopherngutierrez/extended-context branch February 4, 2025 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants