Skip to content

[Stream] Fix dominance error for multi-result dispatches - #21368

Merged
IanWood1 merged 1 commit into
iree-org:mainfrom
IanWood1:fix_emplace_alloc_dominance_err
Jul 15, 2025
Merged

IanWood1 merged 1 commit into
iree-org:mainfrom
IanWood1:fix_emplace_alloc_dominance_err

Conversation

@IanWood1

Copy link
Copy Markdown
Member

EmplaceAllocations doesn't support results with multiple uses but it does support multiple results. This means that it may not always be possible to move the updateOp before the dispatchOp if updateOp is defined by another result of the dispatch. This wasn't handled in tryMoveProducerBefore.

Issue originated in SDXL unet when testing some other local dispatch creation changes. This reproducer is from the full model and can be run with iree-opt --run-reproducer

@IanWood1
IanWood1 requested a review from benvanik as a code owner July 14, 2025 19:10
@IanWood1
IanWood1 force-pushed the fix_emplace_alloc_dominance_err branch from 227300d to 70d0bb1 Compare July 15, 2025 16:47
@IanWood1

Copy link
Copy Markdown
Member Author

I wasn't able to reproduce the issue with CI, I'm rerunning it to see if it was just an intermittent failure.

iree-compile runtime/src/iree/vm/test/arithmetic_ops_f32.mlir --output-format=vm-c --compile-mode=vm -o /dev/null

@IanWood1
IanWood1 merged commit 26f12e8 into iree-org:main Jul 15, 2025
IanWood1 added a commit to IanWood1/iree that referenced this pull request Jul 18, 2025
)

`EmplaceAllocations` doesn't support results with multiple uses but it
does support multiple results. This means that it may not always be
possible to move the `updateOp` before the `dispatchOp` if `updateOp` is
defined by another result of the dispatch. This wasn't handled in
`tryMoveProducerBefore`.

Issue originated in SDXL unet when testing some other local dispatch
creation changes. [This
reproducer](https://gist.github.com/IanWood1/7255096856f60bee357b48a0bd3a05d7)
is from the full model and can be run with `iree-opt --run-reproducer`

Signed-off-by: Ian Wood <[email protected]>
AWoloszyn pushed a commit that referenced this pull request Dec 1, 2025
`EmplaceAllocations` doesn't support results with multiple uses but it
does support multiple results. This means that it may not always be
possible to move the `updateOp` before the `dispatchOp` if `updateOp` is
defined by another result of the dispatch. This wasn't handled in
`tryMoveProducerBefore`.

Issue originated in SDXL unet when testing some other local dispatch
creation changes. [This
reproducer](https://gist.github.com/IanWood1/7255096856f60bee357b48a0bd3a05d7)
is from the full model and can be run with `iree-opt --run-reproducer`

Signed-off-by: Ian Wood <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants