Skip to content

[CostModel] Add getShuffleCostImpl. #145373

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

davemgreen
Copy link
Collaborator

The idea was to have getShuffleCost as the external interface, getIstructionCost would always call it, the existing implementations were moved into getShuffleCostImpl. This would allow targets to override the getShuffleCost if they wanted direct access to the costs, not via the routines that recognize rev/broadcast/etc.

Too many tests change though, as getInstructionCost and getShuffleCost can return different values at the moment. Not expecting this to be used, just putting up to show the diff.

The idea was to have getShuffleCost as the external interface,
getIstructionCost would always call it, the existing implementations were moved
into getShuffleCostImpl. This would allow targets to override the
getShuffleCost if they wanted direct access to the costs, not via the routines
that recognize rev/broadcast/etc.

Too many tests change though, as getInstructionCost and getShuffleCost can
return different values at the moment. Justt putting up to show the diff.
@RKSimon
Copy link
Collaborator

RKSimon commented Jun 24, 2025

Why aren't we just trying to move most of the getInstructionCost shuffle logic into improveShuffleKindFromMask? iirc it can be overridden via CRTP if a target need to,

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