Skip to content

[Codegen] Plumb through dispatch_config for workgroup count computation.#23899

Merged
hanhanW merged 6 commits intomainfrom
users/hanhanW/wire-dispatch-config
Mar 30, 2026
Merged

[Codegen] Plumb through dispatch_config for workgroup count computation.#23899
hanhanW merged 6 commits intomainfrom
users/hanhanW/wire-dispatch-config

Conversation

@hanhanW
Copy link
Copy Markdown
Contributor

@hanhanW hanhanW commented Mar 20, 2026

Change ReconcileTranslationInfo and ResolveWorkgroupCountHints to run on ModuleOp and operate on dispatch_config ops. Wire CreateDispatchConfig and PropagateDispatchConfig into all backend pipelines.

It is a step towards #23642

@hanhanW
Copy link
Copy Markdown
Contributor Author

hanhanW commented Mar 20, 2026

@hanhanW hanhanW force-pushed the users/hanhanW/propagate-dispatch-config branch from c721068 to a1af1fc Compare March 23, 2026 18:25
@hanhanW hanhanW force-pushed the users/hanhanW/wire-dispatch-config branch from 2d58562 to dac8e07 Compare March 23, 2026 18:25
@hanhanW hanhanW force-pushed the users/hanhanW/propagate-dispatch-config branch from a1af1fc to b9d437f Compare March 24, 2026 00:51
@hanhanW hanhanW force-pushed the users/hanhanW/wire-dispatch-config branch from 06eda7c to 510258b Compare March 24, 2026 00:53
@hanhanW hanhanW force-pushed the users/hanhanW/propagate-dispatch-config branch from b9d437f to 68a91d7 Compare March 24, 2026 21:26
@hanhanW hanhanW force-pushed the users/hanhanW/wire-dispatch-config branch from 510258b to 02636ba Compare March 24, 2026 21:28
if (failed(
lowerWorkgroupCountFromSliceOp(rewriter, funcOp, workgroupCount))) {

// Resolve the workgroup_count_from_slice in the dispatch_config op.
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.

Can we just change the implementation of lowerWorkgroupCountrFromSliceOp to do this instead of removing that and inlining it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It only has a single user, so it is inlined. I restored the implementation to touch on dispatch_config op now,

@hanhanW hanhanW force-pushed the users/hanhanW/propagate-dispatch-config branch from af0abc2 to 37a5bff Compare March 25, 2026 22:16
@hanhanW hanhanW force-pushed the users/hanhanW/wire-dispatch-config branch 2 times, most recently from 45f29b1 to 4613591 Compare March 26, 2026 16:44
@hanhanW hanhanW force-pushed the users/hanhanW/propagate-dispatch-config branch from 18b9823 to 21f658f Compare March 27, 2026 16:44
@hanhanW hanhanW force-pushed the users/hanhanW/wire-dispatch-config branch from 870cc97 to 70e319a Compare March 27, 2026 16:52
Base automatically changed from users/hanhanW/propagate-dispatch-config to main March 27, 2026 17:41
hanhanW added 6 commits March 27, 2026 10:43
Change ReconcileTranslationInfo and ResolveWorkgroupCountHints to run
on ModuleOp and operate on dispatch_config ops. Wire CreateDispatchConfig
and PropagateDispatchConfig into all backend pipelines.

Signed-off-by: hanhanW <hanhan0912@gmail.com>
Signed-off-by: hanhanW <hanhan0912@gmail.com>
Signed-off-by: hanhanW <hanhan0912@gmail.com>
Signed-off-by: hanhanW <hanhan0912@gmail.com>
Signed-off-by: hanhanW <hanhan0912@gmail.com>
Signed-off-by: hanhanW <hanhan0912@gmail.com>
@hanhanW hanhanW merged commit e4b4da7 into main Mar 30, 2026
64 of 66 checks passed
@hanhanW hanhanW deleted the users/hanhanW/wire-dispatch-config branch March 30, 2026 16:35
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