Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add/Improve Debugging Features #1266

Open
AlexanderViand-Intel opened this issue Jan 15, 2025 · 1 comment
Open

Add/Improve Debugging Features #1266

AlexanderViand-Intel opened this issue Jan 15, 2025 · 1 comment

Comments

@AlexanderViand-Intel
Copy link
Collaborator

Ideas/Tasks around improving the ability of developers to debug the programs they write using HEIR.

  • Plaintext Execution Mode (i.e., run only arithmetization, then run resulting program in plaintext space Z_p, as discussed in the last office hours)
  • "Decrypt-after-each" mode (kind of automating a common form of "printf() debugging")
    • add secret_key as argument for eval
    • after each HE operation (or maybe at granularity of each secret.generic after secret-distribute-generic?), decrypt the resulting ciphertext.
    • compare the decrypted result with the expected plaintext result
    • Report any deviations
  • Improve Error/Warning Messages in HEIR through more meaningful Op "location" #1143
@ZenithalHourlyRate
Copy link
Collaborator

  • "Decrypt-after-each" mode

As a side note, in my branch I hacked to get these things work.

  • Sed to add secret_key as arg
sed -i 's/(CryptoContextT/(PrivateKeyT secretKey, CryptoContextT/g' func.h func.cpp
  • after each HE operation

insert custom function call (used for speculating noise) after each openfhe eval op in heir-translate

https://github.com/ZenithalHourlyRate/heir/blob/06b929fa16809d33c0dfd8a911e2fd7f04e19660/lib/Target/OpenFhePke/OpenFhePkeEmitter.cpp#L205-L219

I was thinking about upstreaming them but did not find a proper dialect to put those custom func call. Maybe we can add a pass to insert func.call @external_func where the external func name comes from command line but then the function signature becomes a problem.

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

No branches or pull requests

2 participants