Skip to content

[flow] Move CloneProducersIntoDispatchRegions into its own pass - #12375

Merged
antiagainst merged 3 commits into
iree-org:mainfrom
antiagainst:move-out-pass
Mar 9, 2023
Merged

antiagainst merged 3 commits into
iree-org:mainfrom
antiagainst:move-out-pass

Conversation

@antiagainst

Copy link
Copy Markdown
Member

By cloning producers into dispatch regions in its own pass before the main FormDispatchWorkgroupsPass, we can enable running additional transformations afterwards that would need the full dispatch content but don't want to handle explicit captures as materialized as dispatch workgroup operands and block arguments.

This forms a nice structure together with FormDispatchRegionsPass, where we only moves the root compute op into the dispatch region, so that we can run additional transformations afterwards with a simple region and without bothering producers.

Progress towards #12230

By cloning producers into dispatch regions in its own pass before the
main FormDispatchWorkgroupsPass, we can enable running additional
transformations afterwards that would need the full dispatch content
but don't want to handle explicit captures as materialized as dispatch
workgroup operands and block arguments.

This forms a nice structure together with FormDispatchRegionsPass,
where we only moves the root compute op into the dispatch region,
so that we can run additional transformations afterwards with a simple
region and without bothering producers.
@antiagainst antiagainst added the codegen Shared code generation infrastructure and dialects label Feb 25, 2023

@benvanik benvanik left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(lgtm but mahesh may want to look before merging!)

@MaheshRavishankar

Copy link
Copy Markdown
Collaborator

Looks good to me. Unfortunately we don't have good tracking of dispatch region count in CI yet (we have been doing this manually). @pzread can you help make sure this doesn't cause regressions.

@pzread

pzread commented Mar 8, 2023 •

Copy link
Copy Markdown
Contributor

Looks good to me. Unfortunately we don't have good tracking of dispatch region count in CI yet (we have been doing this manually). @pzread can you help make sure this doesn't cause regressions.

Will do later today and post results here

@pzread

pzread commented Mar 9, 2023 •

Copy link
Copy Markdown
Contributor

There is no change in the number of dispatches before and after this patch (measured from --iree-scheduling-dump-statistics-format=json) on x86_64 benchmarks

@antiagainst

Copy link
Copy Markdown
Member Author

Thanks @pzread!

@antiagainst
antiagainst merged commit 5008b86 into iree-org:main Mar 9, 2023
@antiagainst
antiagainst deleted the move-out-pass branch March 9, 2023 17:26
qedawkins pushed a commit to nod-ai/SRT that referenced this pull request Mar 10, 2023
…-org#12375)

By cloning producers into dispatch regions in its own pass before the
main FormDispatchWorkgroupsPass, we can enable running additional
transformations afterwards that would need the full dispatch content but
don't want to handle explicit captures as materialized as dispatch
workgroup operands and block arguments.

This forms a nice structure together with FormDispatchRegionsPass, where
we only moves the root compute op into the dispatch region, so that we
can run additional transformations afterwards with a simple region and
without bothering producers.

Progress towards iree-org#12230
qedawkins pushed a commit to qedawkins/iree that referenced this pull request Apr 2, 2023
…-org#12375)

By cloning producers into dispatch regions in its own pass before the
main FormDispatchWorkgroupsPass, we can enable running additional
transformations afterwards that would need the full dispatch content but
don't want to handle explicit captures as materialized as dispatch
workgroup operands and block arguments.

This forms a nice structure together with FormDispatchRegionsPass, where
we only moves the root compute op into the dispatch region, so that we
can run additional transformations afterwards with a simple region and
without bothering producers.

Progress towards iree-org#12230
@jpienaar jpienaar mentioned this pull request Apr 3, 2023
jpienaar pushed a commit that referenced this pull request May 1, 2023
By cloning producers into dispatch regions in its own pass before the
main FormDispatchWorkgroupsPass, we can enable running additional
transformations afterwards that would need the full dispatch content but
don't want to handle explicit captures as materialized as dispatch
workgroup operands and block arguments.

This forms a nice structure together with FormDispatchRegionsPass, where
we only moves the root compute op into the dispatch region, so that we
can run additional transformations afterwards with a simple region and
without bothering producers.

Progress towards #12230
rengolin pushed a commit to plaidml/iree that referenced this pull request May 2, 2023
…-org#12375)

By cloning producers into dispatch regions in its own pass before the
main FormDispatchWorkgroupsPass, we can enable running additional
transformations afterwards that would need the full dispatch content but
don't want to handle explicit captures as materialized as dispatch
workgroup operands and block arguments.

This forms a nice structure together with FormDispatchRegionsPass, where
we only moves the root compute op into the dispatch region, so that we
can run additional transformations afterwards with a simple region and
without bothering producers.

Progress towards iree-org#12230
NatashaKnk pushed a commit to NatashaKnk/iree that referenced this pull request Jul 6, 2023
…-org#12375)

By cloning producers into dispatch regions in its own pass before the
main FormDispatchWorkgroupsPass, we can enable running additional
transformations afterwards that would need the full dispatch content but
don't want to handle explicit captures as materialized as dispatch
workgroup operands and block arguments.

This forms a nice structure together with FormDispatchRegionsPass, where
we only moves the root compute op into the dispatch region, so that we
can run additional transformations afterwards with a simple region and
without bothering producers.

Progress towards iree-org#12230
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codegen Shared code generation infrastructure and dialects

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants