]> git.djapps.eu Git - pkg/ggml/sources/ggml/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 10:39:43 +0000 (12:39 +0200)
commit0fb429250e972280c0dc4096d29a3631eb87787a
tree95bd2eeffb500322581504a81638a47f0ba56ad2
parent2d15b065ccd7e5b38fc796fbb8b737adc07c0f60
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.
src/ggml-cuda/ggml-cuda.cu
src/ggml-cuda/topk-moe.cu
src/ggml-cuda/topk-moe.cuh
src/ggml-vulkan/ggml-vulkan.cpp
tests/test-backend-ops.cpp