Make the WebGPU backend pass test-llama-archs tests#26146
Draft
fairydreaming wants to merge 8 commits into
Draft
Make the WebGPU backend pass test-llama-archs tests#26146fairydreaming wants to merge 8 commits into
fairydreaming wants to merge 8 commits into
Conversation
…lt values q_nope->ne[0] is 0)
…needed for Mamba)
… testing DeepSeek 3.2 arch
…it caused problems on WebGPU backend (TODO proper fix)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR fixes multiple issues that caused crashes and tests failures when running
test-llama-archswith WebGPU backend.Additional information
WebGPU fixes are:
Additionally WebGPU can't handle zero-length tensors (happened with MiniCPM3 and DeepSeek V3.2 due to default rope length being equal to key length - so nothing was left for nope part), so I added small tweaks in
test-llama-archsto prevent them.This is my first time touching WebGPU backend, so someone with more knowledge shall thoroughly review these changes.
Edit: after checking freshly added MiniMax M3 of course it also crashed in WebGPU due to weird issue -
ggml_add_inplace()resulted insrc0andsrc1being on WebGPU backend butdstbeing on CPU backend. I temporarily replaced it withggml_add().Requirements