buddy-compiler / buddy-mlir

An MLIR-based compiler framework bridges DSLs (domain-specific languages) to DSAs (domain-specific architectures).
https://buddy-compiler.github.io/
Apache License 2.0
514 stars 167 forks source link

[feat] Rotate4D #368

Open hharryz opened 2 months ago

hharryz commented 2 months ago

Finish Rotate4D Operation in DIP dialect.

  1. [feat] slightly accelerate rotate2d (rearrange memory layout)
  2. [bugfix] fix the bug of rotate2d (create right way of padding)
  3. [feat] finish rotate4d and do acceleration, now supporting nhwc & nchw format
  4. [feat] add rotate4d example

run commands (in buddy-mlir dir) $ cd build $ cmake -G Ninja .. -DBUDDY_EXAMPLES=ON -DBUDDY_ENABLE_OPENCV=ON -DBUDDY_MLIR_ENABLE_DIP_LIB=ON $ ninja rotation4D $ cd bin $ ./rotation4D ../../examples/images/YuTu.png result-dip-rotate.png