heir icon indicating copy to clipboard operation
heir copied to clipboard

Avoid fully unrolling loops for insert-rotate

Open j2kun opened this issue 1 year ago • 3 comments

After https://github.com/google/heir/pull/587 the box_blur_64x64 test takes ~53 minutes to compile (up from 1.5 minutes) and canonicalizer takes ~50 minutes of that (95%). Long term we're going to need to be able to run our analyses without doing full loop unrolls, and in this case it's primarily to support identifying a target slot for a given op, or perhaps identifying an affine map that converts the extraction index to its target slot that applies to the whole loop, and upgrading insert-rotate to handle loops.

j2kun avatar Apr 02 '24 22:04 j2kun

This issue has 1 outstanding TODOs:

This comment was autogenerated by todo-backlinks

github-actions[bot] avatar Apr 02 '24 22:04 github-actions[bot]

A long-term plan for this is mentioned in the HEIR open meeting notes for 2024-04-04 https://docs.google.com/document/d/121_0mzqYIWYMc7rcW2Et5qS-ux4ut3b-kno1dI9sQq8/edit?usp=sharing

j2kun avatar Apr 04 '24 13:04 j2kun

After https://github.com/google/heir/pull/601 this should be slightly lower priority: by applying folders before canonicalize, we were able to reduce the runtime hit of unrolling loops.

j2kun avatar Apr 08 '24 18:04 j2kun