Aller au contenu
login
arrow_backRetour aux issues
xdslproject/xdsl #6140

dialects: (linalg) missing Linalg tiling support compared with upstream MLIR

ecoDébutant good first issue

descriptionDescription

## Summary xDSL currently has limited tiling support compared with upstream MLIR. At the moment, xdsl can tile some simple `linalg.generic` ops, but mostly only for static-shape memrefs. The current implementation is structured as: - `OperandTileInfo.analyze`: computes how each operand should be sliced. - `TilingPlan.analyze_generic_op`: builds a tiling plan for one `linalg.generic`. - `_verify_generic_is_tileable`: rejects unsupported cases. - `_build_tile_loops`: builds the outer `scf.for` loops. - `_build_tiled_subview`: builds `memref.subview` ops for tiled operands. - `tile_linalg_generic`: main entry point. Calls the helper functions, creates the tiled `linalg.generic`. One note: `memref.subview` itself can handle dynamic offsets/sizes/strides, but the current Linalg tiling flow still rejects dynamic operand shapes and uses static integer tile sizes / loop bounds. ## Missing compared with upstream MLIR Linalg tiling is currently missing support for: - [x] tensor-based tiling - [x] dynamic shapes / dynamic tile sizes - [x] partial tiles - [x] reduction tiling - [x] `linalg.index` handling - [ ] more general affine indexing maps - [ ] named Linalg ops such as `linalg.matmul` Feel free to add anything I missed. Hopefully this can serve as a starting point for improving xDSL tiling support!
codeOuvre sur GitHub