Skip to content

[SPIRV] Rework on rootOp selection in kernel config.#23685

Merged
hanhanW merged 2 commits intomainfrom
users/hanhanW/spirv-softmax
Mar 9, 2026
Merged

[SPIRV] Rework on rootOp selection in kernel config.#23685
hanhanW merged 2 commits intomainfrom
users/hanhanW/spirv-softmax

Conversation

@hanhanW
Copy link
Copy Markdown
Contributor

@hanhanW hanhanW commented Mar 6, 2026

The revision adds a getRootOperation utility mirroring LLVMGPU's multi-pass root selection strategy. The root is found by reverse-iterating compute ops with priority tiers: (1) named ops or generics with reductions, (2) elementwise generics, (3) fills.

It also switches the softmax config from SPIRVBaseVectorize pipeline to SPIRVSubgroupReduce pipeline; it is a preparation for scf.forall migration. The scf.forall distribution prefers starting from root op for distribution. The SPIRVSubgroupReduce pipeline sets lowering config on root op only which matches the expectation.

The revision adds a getRootOperation utility mirroring LLVMGPU's
multi-pass root selection strategy. The root is found by
reverse-iterating compute ops with priority tiers: (1) named ops or
generics with reductions, (2) elementwise generics, (3) fills.

It also switches the softmax config from SPIRVBaseVectorize pipeline to
SPIRVSubgroupReduce pipeline; it is a preparation for scf.forall
migration. The scf.forall distribution prefers starting from root op for
distribution. The SPIRVSubgroupReduce pipeline sets lowering config on
root op only which matches the expectation.

Signed-off-by: hanhanW <hanhan0912@gmail.com>
@hanhanW hanhanW requested a review from qedawkins March 6, 2026 21:01
@hanhanW hanhanW marked this pull request as ready for review March 6, 2026 21:09
@hanhanW hanhanW requested a review from kuhar as a code owner March 6, 2026 21:09
Signed-off-by: hanhanW <hanhan0912@gmail.com>
@hanhanW hanhanW merged commit 46325b9 into main Mar 9, 2026
59 of 61 checks passed
@hanhanW hanhanW deleted the users/hanhanW/spirv-softmax branch March 9, 2026 17:51
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