google / google/heir

Support dense attributes in mod_arith constant folding and canonicalization

Open
#1,759 2 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.