Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing execution region result placement. #19872

Merged
merged 5 commits into from
Feb 4, 2025

Conversation

benvanik
Copy link
Collaborator

@benvanik benvanik commented Jan 31, 2025

This uses transfer ops to place allocations that escape execution regions. In the future we'll need something more sophisticated (AffinityAnalysis for the escaped results, etc) but in simple programs today where transfers are used to indicate resource movement it correctly picks up the destinations.

This also fixes flow.tensor.barrier and stream.async.barrier to be tied ops (as they are metadata-only) and a few issues with affinity attribute assignment identified while tracking down the placement affinities.

@benvanik benvanik requested a review from rsuderman January 31, 2025 20:12
@benvanik benvanik added the compiler/dialects Relating to the IREE compiler dialects (flow, hal, vm) label Jan 31, 2025
@benvanik benvanik marked this pull request as ready for review February 1, 2025 15:34
@benvanik benvanik force-pushed the users/benvanik/result-placement branch from 9035eb0 to 9bfde2e Compare February 3, 2025 22:53
@benvanik benvanik merged commit 4fffb0e into main Feb 4, 2025
45 checks passed
@benvanik benvanik deleted the users/benvanik/result-placement branch February 4, 2025 01:34
ita9naiwa pushed a commit to ita9naiwa/iree that referenced this pull request Feb 4, 2025
This uses transfer ops to place allocations that escape execution
regions. In the future we'll need something more sophisticated
(AffinityAnalysis for the escaped results, etc) but in simple programs
today where transfers are used to indicate resource movement it
correctly picks up the destinations.

This also fixes `flow.tensor.barrier` and `stream.async.barrier` to be
tied ops (as they are metadata-only) and a few issues with affinity
attribute assignment identified while tracking down the placement
affinities.

Signed-off-by: Hyunsung Lee <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/dialects Relating to the IREE compiler dialects (flow, hal, vm)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants