I’m a beginner of MLIR and didn’t have much experience with it.
After reading these docs: Linalg Dialect Rationale: The Case For Compiler-Friendly Custom Operations, ‘linalg’ Dialect, ‘affine’ Dialect, I found quite confusing about the relationship between Linalg dialect and Affine dialect.
- I have read that Linalg stands on the HHO level, which is higher than the MHA level which Affine stand, but I think I didn’t understand what it actually means when optimizing a DL op like conv2d. Could you please show me an example of that? And I didn’t quite clear what does the
Linalg is intended to complement Affine rather than replace itmean.
- I found we have
linalg.conv_2d_nchw_fchwin Linalg IR. but after
convert-linalg-to-loops, the conv op seems gone. So do we have any method to keep this op until lowering to LLVM, then call it in cudnn.so, or something like that?
- Besides, we have a simplified poly form in MLIR: The case for a simplified polyhedral form, so do we use it in Linalg or Affine?