Support dense attributes in mod_arith constant folding and canonicalization
Open
- Dominant language
- MLIR
- Stars
- 906
- Forks
- 171
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 32
Description
Currently it only supports scalars, but the `mod_arith.constant` op is elementwise and has uses now that involve dense attributes. Also cf. https://github.com/google/heir/pull/1758 since if/when that lands it will greatly simplify the work. Before that PR, one will need to ensure the attributes passed along the folding chain use an underlying integer type (`IntegerAttr` or `DenseIntElementsAttr`) corresponding to the modulus storage type. After that PR, one should be able to just use a `DenseIntElementsAttr` that is typed as a tensor of ModArith types.
Contributor guide
Assessment
This issue has not been assessed yet.