ggml-vulkan: gate upstream's tiled concat below one tile, honour the fast-path knob
Upstream #30591 added its own tiled-transpose concat pipelines, selected for any dim-0 concat whose src1 is transposed. Behind the fork's fast path (which already takes ne0 >= 32 and honours GGML_VK_CONCAT_FASTPATH) that selector still caught the decode case (ne0 < 32), bringing back the decode regression the TILE_DIM gate fixed (FORK.md F3), and GGML_VK_CONCAT_FASTPATH=0 no longer gave the generic kernel. Apply the same gate and the knob to upstream's selector. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1df5ced65e
commit
3ab97b345f
1 file changed
+14
@@ -9749,7 +9749,21 @@ static vk_pipeline ggml_vk_rms_norm_pipeline(const std::array<vk_pipeline, 3> &
|
||||
return pipelines[2];
|
||||
}
|
||||
|
||||
// fork: GGML_VK_CONCAT_FASTPATH=0 forces the generic concat kernel (validation / A-B knob, see ggml_vk_concat)
|
||||
static bool ggml_vk_concat_transpose_enabled() {
|
||||
static const char * env = getenv("GGML_VK_CONCAT_FASTPATH");
|
||||
static const bool off = env != nullptr && std::string(env) == "0";
|
||||
return !off;
|
||||
}
|
||||
|
||||
static bool ggml_vk_concat_is_transposed(const vk_device & device, const ggml_tensor * src0, const ggml_tensor * src1, const ggml_tensor * dst) {
|
||||
if (!ggml_vk_concat_transpose_enabled()) {
|
||||
return false;
|
||||
}
|
||||
// below one tile (decode, n_tokens < 32) the tiled path is pure overhead, the generic kernel is faster (FORK.md F3)
|
||||
if (src1->ne[0] < 32) {
|
||||
return false;
|
||||
}
|
||||
if (ggml_get_op_params_i32(dst, 0) != 0) { // dim 0 only
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user