Skip to content

[webgpu] Refactor MatMulNBitsWideTileProgram shader - #25233

Closed
daijh wants to merge 0 commit into
microsoft:mainfrom
daijh:matmul-dev
Closed

[webgpu] Refactor MatMulNBitsWideTileProgram shader#25233
daijh wants to merge 0 commit into
microsoft:mainfrom
daijh:matmul-dev

Conversation

@daijh

@daijh daijh commented Jul 1, 2025

Copy link
Copy Markdown
Contributor

Description

This commit refactors the MatMulNBitsWideTileProgram shader to improve code readability and enables more flexible data handling.

As part of this change, support for 4-bit and 8-bit shaders has been consolidated, and a common CEIL_DIV utility has been introduced. The previous ShaderUsage::UseUniform and ShaderUsage::UseIndicesTypeAlias flags are no longer necessary and have been removed.

Motivation and Context

See above.

@daijh

daijh commented Jul 1, 2025

Copy link
Copy Markdown
Contributor Author

@sushraja-msft @qjia7 pls take a look.

@daijh

daijh commented Jul 1, 2025

Copy link
Copy Markdown
Contributor Author

Heads-up: The following is a pre-existing issue.
#25231

@qjia7

qjia7 commented Jul 3, 2025

Copy link
Copy Markdown
Contributor

@daijh Are you ok to hold on a while and use the template to refactor the shader base on @fs-eire 's this PR #25130? I think the template's result will be more readable. And it's a good start for this PR. I suppose PR #25130 will be merged soon. But if it's not the case or this will block you too much, please let me know.

@daijh

daijh commented Jul 3, 2025

Copy link
Copy Markdown
Contributor Author

Sure. It's fine for me to apply the new template.

@guschmue guschmue added the ep:WebGPU ort-web webgpu provider label Jul 3, 2025
@fs-eire

fs-eire commented Jul 9, 2025

Copy link
Copy Markdown
Contributor

The WGSL template PR is merged. Please update to latest main branch and give it a try.

@daijh
daijh marked this pull request as draft July 10, 2025 01:01
@daijh daijh closed this Jul 10, 2025
@daijh

daijh commented Jul 10, 2025

Copy link
Copy Markdown
Contributor Author

Accidentally closed. Continuing work in PR #25353.

@daijh
daijh deleted the matmul-dev branch July 11, 2025 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ep:WebGPU ort-web webgpu provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants