Make it safe for `LowerLinalgMicrokernels` to assume dynamic dims to be contiguous.
- Dominant language
- C++
- Stars
- 3.9k
- Forks
- 1k
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 47
Description
In #11641 we let `LowerLinalgMicrokernels` assume that dynamic dims are contiguous.
Like Mahesh [said on Discord](https://discord.com/channels/689900678990135345/1013824803075002389/1055199364714340412), it should always be contiguous in e2e compilation, but it's not trivial to turn that fact into something that one pass can safely rely on.
Here is the kind of function that this pass runs on (and has to decide whether the inner dims are contiguous):
https://gist.github.com/bjacob/59f3ea6bf40aef7915fff9f6a287a599
Since the `memref.subview` here are created by bufferization (of `tensor.extract_slice`), maybe bufferization, knowing that it's creating contiguous subviews, could create plain `memref` types without strides or affine-maps so the type alone is enough to know that it's contiguous.
Contributor guide
Assessment
This issue has not been assessed yet.