iree-org / iree

A retargetable MLIR-based machine learning compiler and runtime toolkit.
http://iree.dev/
Apache License 2.0
2.85k stars 620 forks source link

[DispatchCreation] Add CSE before canonicalization of `flow.dispatch.workgroups` #19178

Closed MaheshRavishankar closed 4 days ago

MaheshRavishankar commented 4 days ago

The real change in this PR is to add CSE before canonicalization so that operands of flow.dispatch.workgroups can be better de-duped.

Since this needed a pipeline test, noticed the pipeline test existed in Flow and called the global optimization, dispatch creation and flow pipelines. This PR moves the test to dispatch creation and only tests that pipeline.

Signed-off-by: MaheshRavishankar mahesh.ravishankar@gmail.com

MaheshRavishankar commented 4 days ago

Depends on https://github.com/iree-org/iree/pull/19171 . Only review the last commit.

MaheshRavishankar commented 4 days ago

out of curiosity: should we have a pipeline_tests for flow?

Potentially, but Flow does not actually form dispatches now.. So I was mostly looking for dispatch formation pipeline tests.