heir icon indicating copy to clipboard operation
heir copied to clipboard

Investigate how Integer Arithmetic is supported in CKKS pipeline

Open ZenithalHourlyRate opened this issue 9 months ago • 2 comments

In CKKS pipeline, aside from handling arith.{add,mul}f, we also have some code handling arith.{add,mul}i in like secret-insert-mgmt-ckks and secret-to-ckks. Technically we can support some kind of integer arithmetic in CKKS, however, we have no example mlir that goes through them to actually test them.

This issue is intended as meta-issue on integer arithmetic support in CKKS.

One sub issue is the arith.uitofp one (#1628)

ZenithalHourlyRate avatar Apr 02 '25 14:04 ZenithalHourlyRate

I think this touches on a deeper issue with the CKKS pipeline, which is that we don't really have a semantic for the types. My intuition would be that any integer "x" should basically be treated as "x.0", so arith.uitofp would become a no-op (just like arith.extui already is). However, we need to somehow communicate this semantic to the developer in a concise way + there's the question of "at what scale will x be encoded?", especially in more complex CKKS settings where we don't have a single scale for everything.

AlexanderViand-Intel avatar Apr 03 '25 16:04 AlexanderViand-Intel

This issue has 1 outstanding TODOs:

This comment was autogenerated by todo-backlinks

github-actions[bot] avatar Apr 04 '25 16:04 github-actions[bot]