Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP][js/webgpu] Optimize matmulnbits #22360

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

qjia7
Copy link
Contributor

@qjia7 qjia7 commented Oct 9, 2024

Description

This PR further optimizes matmulnbits specially for iGPUs. The phi3 demo becomes ~12 tokens/second from ~8 tokens on iGPUs.

Some todos:

  1. Make the optimization more general, Remove the blockSize = 32 limitation.
  2. Tune the parameter, such as workgroupSize, components size (currently only support components = 1), to see the performance change.
  3. remove duplicated code to simple the shader.

This PR further optimizes matmulnbits specially for iGPUs.
The phi3 demo becomes ~12 tokens/second from ~8 tokens on iGPUs.
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.

1 participant