]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commit
vulkan/cuda: fix topk_moe with exp_probs_b (llama/18071)
authorJeff Bolz <redacted>
Sun, 21 Dec 2025 09:27:34 +0000 (03:27 -0600)
committerGeorgi Gerganov <redacted>
Wed, 31 Dec 2025 15:52:09 +0000 (17:52 +0200)
commitf407c5e562b5b54799293225531e0196ed395d21
treecc98240bd0e4481dd74a96308f1378f97e29c372
parentad6ee3865d36660d1b9e81347b499ae77f864d5a
vulkan/cuda: fix topk_moe with exp_probs_b (llama/18071)

I updated test_topk_moe to more closely match llm_graph_context::build_moe_ffn
and added coverage for exp_probs_b and some other missing combinations. This
exposed a bug in both CUDA and Vulkan backends where they were assuming the
input to argsort and the input to get_rows are the same. I'd like to optimize
this graph in another change, but for now just get it functional.

CUDA also had a bug where it got n_experts from the wrong place, leading to
GGML_ASSERT failures in some of the new tests.
ggml/src/ggml-cuda/ggml-cuda.cu
ggml/src/ggml-cuda/topk-moe.cu
ggml/src/ggml-cuda/topk-moe.cuh
ggml/src/ggml-vulkan/ggml-vulkan.cpp