summaryrefslogtreecommitdiff
path: root/src/llama.cpp
diff options
context:
space:
mode:
authorKawrakow <iwankawrakow@gmail.com>2025-07-03 18:03:23 +0200
committerGitHub <noreply@github.com>2025-07-03 18:03:23 +0200
commit8a0c38f496f60bb0f627521823de604ce10fdc16 (patch)
tree646fa2f21c7436dcae8214d382dda1a2e4b5f994 /src/llama.cpp
parent9534461c01e132672821e53ce6e5e560dc58e829 (diff)
Vulkan: add GGML_OP_FUSED_MUL_UNARY (#580)
Co-authored-by: Iwan Kawrakow <iwan.kawrakow@gmail.com>
Diffstat (limited to 'src/llama.cpp')
-rw-r--r--src/llama.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/llama.cpp b/src/llama.cpp
index 794dcca6..11a7060c 100644
--- a/src/llama.cpp
+++ b/src/llama.cpp
@@ -9688,13 +9688,7 @@ static struct ggml_tensor * llm_build_ffn(
cur = tmp;
}
-#ifdef GGML_USE_VULKAN
- constexpr bool use_fused_mul_unary = false;
-#else
- constexpr bool use_fused_mul_unary = true;
-#endif
-
- if (use_fused_mul_unary && type_gate == LLM_FFN_PAR &&
+ if (type_gate == LLM_FFN_PAR &&
(type_op == LLM_FFN_SILU || type_op == LLM_FFN_RELU || (type_op == LLM_FFN_GELU && !act_scales))) {
cur = ggml_fused_mul_unary(ctx, cur, tmp, type_op == LLM_FFN_SILU ? GGML_UNARY_OP_SILU :
type_op == LLM_FFN_RELU ? GGML_UNARY_OP_RELU : GGML_UNARY_OP_GELU);