Skip to content

vulkan: support mulmat bf16 activations - #29069

Merged
ggerganov merged 3 commits into
masterfrom
0cc4m/vulkan-mulmat-bf16-activations
Oct 14, 2026
Merged

ggerganov merged 3 commits into
masterfrom
0cc4m/vulkan-mulmat-bf16-activations

Conversation

@0cc4m

@0cc4m 0cc4m commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Overview

Support bf16 mul_mat activations as added in #28937. Draft until that PR is done.

I also used the chance to clean up the b-type selection code that had grown a lot over time and was getting convoluted.

Requirements

@github-actions github-actions Bot added testing Everything test related Vulkan Issues specific to the Vulkan backend ggml changes relating to the ggml tensor library for machine learning labels Sep 18, 2026
@0cc4m
0cc4m force-pushed the 0cc4m/vulkan-mulmat-bf16-activations branch from 1f65192 to 944962d Compare September 30, 2026 12:33
@0cc4m
0cc4m marked this pull request as ready for review September 30, 2026 12:35
@0cc4m
0cc4m requested a review from a team as a code owner September 30, 2026 12:35
@0cc4m

0cc4m commented Oct 10, 2026

Copy link
Copy Markdown
Contributor Author

@jeffbolznv Can you review this when you have time?

@jeffbolznv

Copy link
Copy Markdown
Contributor

I like how the conditions have been refactored, the logic is easier to follow. Hard to tell if it's equivalent, but I didn't find any bugs in it.

I guess if bf16 activations become popular, we should handle them directly in the mul_mat_vec shader. But it's fine to skip that for now.

codex found that the condition where we call ggml_vk_mul_mat_vec_nc_f16_f32 should check src1->type == GGML_TYPE_F32.

@0cc4m

0cc4m commented Oct 12, 2026

Copy link
Copy Markdown
Contributor Author

Yes, the condition was missing, fixed.

@0cc4m 0cc4m added the merge ready A maintainer can use this label to indicate that they consider the changes final and ready to merge. label Oct 12, 2026
@ggerganov
ggerganov merged commit 7ec420b into master Oct 14, 2026
25 of 28 checks passed
@ggerganov
ggerganov deleted the 0cc4m/vulkan-mulmat-bf16-activations branch October 14, 2026 05:38
@ggerganov

Copy link
Copy Markdown
Member

@0cc4m

0cc4m commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

Oof, I guess there was a non-obvious merge conflict. I'll fix it.

@0cc4m

0cc4m commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

Fixed in #30495

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ggml changes relating to the ggml tensor library for machine learning merge ready A maintainer can use this label to indicate that they consider the changes final and ready to merge. testing Everything test related Vulkan Issues specific to the Vulkan backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants