Skip to content

[WIP][webgpu] Apply dp4a for generation shader - #23585

Closed
Jiajia Qin (qjia7) wants to merge 13 commits into
microsoft:mainfrom
qjia7:matmulnbits-generation
Closed

[WIP][webgpu] Apply dp4a for generation shader#23585
Jiajia Qin (qjia7) wants to merge 13 commits into
microsoft:mainfrom
qjia7:matmulnbits-generation

Conversation

@qjia7

@qjia7 Jiajia Qin (qjia7) commented Feb 5, 2025

Copy link
Copy Markdown
Contributor

Description

This pr applies DP4A to generation shader. It uses similar ideas compared with previous generation shader, but different data types.

In easy mode: NV 42 tokens/s -> 45 tokens/s, Meteor Lake 19 tokens/s -> 20 tokens/s

Without this PR
NV

Kernel Time (ms) Percentage (%)
MatMulNBits 14.28 71.49

Meteor Lake

Kernel Time (ms) Percentage (%)
MatMulNBits 34.74 79.93

With this PR
NV

Kernel Time (ms) Percentage (%)
MatMulNBits|DP4AMatMulNBitsSmallMProgram 11.24 71.38

Meteor Lake

Kernel Time (ms) Percentage (%)
MatMulNBits|DP4AMatMulNBitsSmallMProgram 31.71 76.94

@guschmue Guenther Schmuelling (guschmue) added the ep:WebGPU ort-web webgpu provider label Feb 10, 2025
@qjia7

Copy link
Copy Markdown
Contributor Author

Replaced by #24064

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.

2 participants