Make SchemeParameters accept IntegerAttrs for moduli
- Dominant language
- MLIR
- Stars
- 906
- Forks
- 171
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 32
Description
Currently, there's a lot of duplication of integer values in tests, like this excerpt from `tests/Dialect/CKKS/Transforms/decompose_relinearize.mlir`:
```
#q0 = 1095233372161 : i64
#q1 = 1032955396097 : i64
#p0 = 261405424692085787 : i64
!Zq0 = !mod_arith.int<#q0>
!Zq1 = !mod_arith.int<#q1>
!Zp0 = !mod_arith.int<#p0>
// Input's type
#ring_L1x1024 = #polynomial.ring, polynomialModulus = <1 + x**1024>>
...
module attributes {
ckks.schemeParam = #ckks.scheme_param<
logN = 10,
// TODO: make a ticket to convert these to integerAttrs
Q = [1095233372161, 1032955396097],
P = [261405424692085787],
logDefaultScale = 45
>
}
```
I can't write `Q = [#q0, #q1]`, and instead have to write out `Q = [1095233372161, 1032955396097]`. This is error-prone and will quickly get tedious for tests involving large parameters.
Contributor guide
Assessment
This issue has not been assessed yet.