Skip to content

tests: add BF16 non-contig coverage for MUL_MAT permutations#22689

Merged
ServeurpersoCom merged 1 commit into
ggml-org:masterfrom
ServeurpersoCom:tests/bf16-non-contig
May 15, 2026
Merged

tests: add BF16 non-contig coverage for MUL_MAT permutations#22689
ServeurpersoCom merged 1 commit into
ggml-org:masterfrom
ServeurpersoCom:tests/bf16-non-contig

Conversation

@ServeurpersoCom

Copy link
Copy Markdown
Contributor

Overview

The MUL_MAT test loop iterates over base_types[] to generate non-contig permutation cases (3 standard permutations across n in {1, 8, 16}). BF16 is absent from base_types[], so these 9 cases were never generated for BF16 even though every other type covered by base_types[] tests them.

Add the missing 9 cases explicitly: BF16 x F32, m=16, k=256, bs=[2,3], permutations {0,2,1,3}, {0,1,3,2}, {0,3,2,1}, with n in {1, 8, 16}. All cases pass on Vulkan.

Verified independent of #22677: reverting that PR locally and rerunning the suite still shows 9 OK on these new cases, so the coverage exercises a path that was already correct (cpy bf16 -> bf16 materialization for non-contig matmul), distinct from the bf16 -> f32 cpy pipeline added in #22677.

This is a first pass. Other BF16 coverage gaps spotted while investigating, candidates for follow-up PRs:

  • MUL_MAT_ID has only 2 BF16 cases vs around 75 for types in base_types (same structural gap as MUL_MAT)
  • DUP has 0 BF16 cases at all
  • ROPE supports_op returns true for any contiguous_rows tensor including BF16, but the dispatch only handles F32/F16/F32_F16, returning nullptr for BF16, potential latent abort similar to the cpy bf16 -> f32 case in vulkan: add cpy bf16 -> f32 pipelines #22677

Happy to attack each as separate PRs, or batch them depending on what you prefer.

Follow-up to #22677.
cc @jeffbolznv

Requirements

  • I have read and agree with the contributing guidelines
  • AI usage disclosure: YES Opus 4.7 + disposable rootless podman with CUDA/Vulkan GPU

The MUL_MAT test loop iterates over base_types[] to generate non-contig
permutation cases (3 standard permutations across n in {1, 8, 16}).
BF16 is absent from base_types[], so these 9 cases were never generated
for BF16 even though every other type covered by base_types[] tests them.

Add the missing 9 cases explicitly: BF16 x F32, m=16, k=256, bs=[2,3],
permutations {0,2,1,3}, {0,1,3,2}, {0,3,2,1}, with n in {1, 8, 16}.

Suggested-by: @jeffbolznv
@ServeurpersoCom ServeurpersoCom requested a review from ggerganov as a code owner May 4, 2026 19:20
@github-actions github-actions Bot added the testing Everything test related label May 4, 2026
@ggerganov ggerganov added the merge ready A maintainer can use this label to indicate that they consider the changes final and ready to merge. label May 15, 2026
@ServeurpersoCom

Copy link
Copy Markdown
Contributor Author

Please 2nd approval @ggml-org/maintainers

@ServeurpersoCom ServeurpersoCom merged commit cfabeb1 into ggml-org:master May 15, 2026
108 of 110 checks passed
dandm1 pushed a commit to dandm1/llama.cpp that referenced this pull request May 16, 2026
…g#22689)

The MUL_MAT test loop iterates over base_types[] to generate non-contig
permutation cases (3 standard permutations across n in {1, 8, 16}).
BF16 is absent from base_types[], so these 9 cases were never generated
for BF16 even though every other type covered by base_types[] tests them.

Add the missing 9 cases explicitly: BF16 x F32, m=16, k=256, bs=[2,3],
permutations {0,2,1,3}, {0,1,3,2}, {0,3,2,1}, with n in {1, 8, 16}.

Suggested-by: @jeffbolznv
ArberSephirotheca pushed a commit to ArberSephirotheca/llama.cpp that referenced this pull request May 19, 2026
…g#22689)

The MUL_MAT test loop iterates over base_types[] to generate non-contig
permutation cases (3 standard permutations across n in {1, 8, 16}).
BF16 is absent from base_types[], so these 9 cases were never generated
for BF16 even though every other type covered by base_types[] tests them.

Add the missing 9 cases explicitly: BF16 x F32, m=16, k=256, bs=[2,3],
permutations {0,2,1,3}, {0,1,3,2}, {0,3,2,1}, with n in {1, 8, 16}.

Suggested-by: @jeffbolznv
baramofme pushed a commit to baramofme/llama-cpp-turboquant that referenced this pull request May 23, 2026
…g#22689)

The MUL_MAT test loop iterates over base_types[] to generate non-contig
permutation cases (3 standard permutations across n in {1, 8, 16}).
BF16 is absent from base_types[], so these 9 cases were never generated
for BF16 even though every other type covered by base_types[] tests them.

Add the missing 9 cases explicitly: BF16 x F32, m=16, k=256, bs=[2,3],
permutations {0,2,1,3}, {0,1,3,2}, {0,3,2,1}, with n in {1, 8, 16}.

Suggested-by: @jeffbolznv
carlosfundora pushed a commit to carlosfundora/llama.cpp-1-bit-turbo that referenced this pull request May 24, 2026
…g#22689)

The MUL_MAT test loop iterates over base_types[] to generate non-contig
permutation cases (3 standard permutations across n in {1, 8, 16}).
BF16 is absent from base_types[], so these 9 cases were never generated
for BF16 even though every other type covered by base_types[] tests them.

Add the missing 9 cases explicitly: BF16 x F32, m=16, k=256, bs=[2,3],
permutations {0,2,1,3}, {0,1,3,2}, {0,3,2,1}, with n in {1, 8, 16}.

Suggested-by: @jeffbolznv
(cherry picked from commit cfabeb1)
winstonma pushed a commit to winstonma/llama.cpp that referenced this pull request May 27, 2026
…g#22689)

The MUL_MAT test loop iterates over base_types[] to generate non-contig
permutation cases (3 standard permutations across n in {1, 8, 16}).
BF16 is absent from base_types[], so these 9 cases were never generated
for BF16 even though every other type covered by base_types[] tests them.

Add the missing 9 cases explicitly: BF16 x F32, m=16, k=256, bs=[2,3],
permutations {0,2,1,3}, {0,1,3,2}, {0,3,2,1}, with n in {1, 8, 16}.

Suggested-by: @jeffbolznv
fewtarius pushed a commit to fewtarius/CachyLLama that referenced this pull request May 30, 2026
…g#22689)

The MUL_MAT test loop iterates over base_types[] to generate non-contig
permutation cases (3 standard permutations across n in {1, 8, 16}).
BF16 is absent from base_types[], so these 9 cases were never generated
for BF16 even though every other type covered by base_types[] tests them.

Add the missing 9 cases explicitly: BF16 x F32, m=16, k=256, bs=[2,3],
permutations {0,2,1,3}, {0,1,3,2}, {0,3,2,1}, with n in {1, 8, 16}.

Suggested-by: @jeffbolznv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge ready A maintainer can use this label to indicate that they consider the changes final and ready to merge. testing Everything test related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants