vulkan : add GGML_VK_MMV_MAX_COLS override for mul_mat_vec dispatch (#25356) - #27652
vulkan : add GGML_VK_MMV_MAX_COLS override for mul_mat_vec dispatch (#25356)#27652djcdevelopment wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Hi @djcdevelopment, thanks for your contribution! Per our contribution guidelines, the automated PR checker found the following issue(s) that need your attention:
Please note that maintainers reserve the right to make final decisions on PRs. If you believe there is a mistake, please comment below. |
001faf4 to
05509e7
Compare
…gml-org#25356) Vulkan update: static constexpr uint32_t mul_mat_vec_max_cols = 8; Users can set the batch size limit instead of fixed at 8.
05509e7 to
242c3cd
Compare
This comment was marked as spam.
This comment was marked as spam.
|
Please do not use AI like that, it is unreadable and blocks actual conversation. If you have something to say, write the text yourself as per contribution guidelines and also keep it as short as possible. |
|
Thanks for the cross check and RADV data. docs updated; you're credited.
Agreed on all of it. Your B=16 inversion is exactly why this PR keeps the default at 8 and proposes no per-vendor raise. Nothing should get carried to any vendor without that vendor's measurements. For what it's worth, Xe2's crossover sits past 16 (MMV 158.5 vs matmul 45.4 at B=16 on Mistral-24B), which confirms your point from the other side: the crossover is vendor physics, not a constant.
Fair catch. I ran A/B at the default ubatch, so it never touched the path it claimed to test. Re-ran it your way on Xe2: -ub 12 -b 12 -c 512 --chunks 12, Mistral-Small-24B Q4_K_M, one Arc Pro B70:
|
Overview
Adds the ability to set batch size at runtime with a variable vs the hardcode 8 currently set.
static constexpr uint32_t mul_mat_vec_max_cols = 8;
Increase the number and increase the thruput. Only works is model fits completely in VRAM., Influences dense models more. I got a 6.9x gain from Gemma-3-27B.
Additional information
Benchmarking ladders, no change comparison at default setting, methodology.
github.com/djcdevelopment/vulkancliff
Requirements
Requirements