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

[Flow] Fix dispatch naming for dynamic shaped fusions #19439

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

qedawkins
Copy link
Contributor

Currently all ops with dynamic shapes are assigned the same estimated cost when naming dispatches. This means that in cases like fused elementwise ops with matmuls, the elementwise and matmuls are assigned the same priority and because of traversal order, the dispatch ends up following the name of the elementwise op.

This patch hacks it by treating all dynamic shapes as moderately sized static shapes, but in the future if we have more issues we can look at adding some tensor size range analysis that can give us upper bounds for the dynamic shapes.

Currently all ops with dynamic shapes are assigned the same estimated
cost when naming dispatches. This means that in cases like fused
elementwise ops with matmuls, the elementwise and matmuls are assigned
the same priority and because of traversal order, the dispatch ends up
following the name of the elementwise op.

This patch hacks it by treating all dynamic shapes as moderately sized
static shapes, but in the future if we have more issues we can look at
adding some tensor size range analysis that can give us upper bounds for
the dynamic shapes.
@IanWood1 IanWood1 force-pushed the fix_dispatch_names branch from 4e4ff6a to 1bcaf40 Compare January 8, 2025 18:28
@IanWood1 IanWood1 requested a review from hanhanW January 8, 2025 18:34
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.

3 participants