Skip to content

[webgpu] Refactor MatMulNBitsWideTileProgram shader - #25233

Closed
Jianhui Dai (daijh) wants to merge 0 commit into
microsoft:mainfrom
daijh:matmul-dev
Closed

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

Conversation

@daijh

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

Copy link
Copy Markdown
Contributor Author

@daijh

Copy link
Copy Markdown
Contributor Author

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

@qjia7

Copy link
Copy Markdown
Contributor

Jianhui Dai (@daijh) Are you ok to hold on a while and use the template to refactor the shader base on Yulong Wang (@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

Copy link
Copy Markdown
Contributor Author

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

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

Copy link
Copy Markdown
Contributor

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

@daijh

Copy link
Copy Markdown
Contributor Author

Accidentally closed. Continuing work in PR #25353.

@daijh
Jianhui Dai (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