iree-org / iree

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

Enable Workgroup Reordering Based on Translation Info Config Entries #17645

Closed bangtianliu closed 1 week ago

bangtianliu commented 2 weeks ago

This pull request introduces the ability to reorder workgroups based on translation information specified in the configuration entries.

For instance, setting reorder_workgroups = "transpose" will enable the "transpose" method for workgroup reordering.

Notably, this pull request addresses a scenario that is somewhat the reverse of ISSUE #17340.

The "transpose" reordering method has been found to be faster than the natural order for convolution kernels.

bangtianliu commented 1 week ago

LGTM. I can see this improves performance on SDXL convs. Thanks for all the fixes.

Thanks for your comments and help, appreciate it very much!

saienduri commented 1 week ago

Hi @bangtianliu, can you also update the spec in this PR: https://github.com/iree-org/iree/blob/main/build_tools/pkgci/external_test_suite/attention_and_matmul_spec.mlir? We need to keep it in sync with sdxl-scripts repo so we pick up the same perf boosts here as well