Thanks for raising the issue!
Linking @mehdi_amini 's post here for reference: [RFC] Introduce a new Dense Array attribute.
Very strong +1 to this cleanup in general through the codebase.
The different type for operand and attribute is a bug.
I am not 100% clear whether something special needs to happen to make IndexAttr work on non-64b-pointer targets, maybe others have a better sense here.
There have also been some issues with DenseXXXAttr:
- Some things don’t work together and create hard to diagnose bugs MLIR-ODS DenseXXXArrayAttr + ArrayMinCount seem like a footgun
- DenseXXXArrayAttr lacks features that XXXArrayAttr has and make it quite painful (e.g. see the discussion about Confined in ⚙ D130348 [mlir][tensor] Add gather/scatter op definitions to the tensor dialect.). The current suggestion is to use derived attributes but I have not yet spent enough effort to get one example to work.
The hoops one has to jump through here are a bit worrying; @mehdi_amini could we improve usability?
Lastly @qcolombet , do you see a way to slice out starter tasks from this?
This looks like a good opportunity to also onboard new folks after we take care of the key early cases.