]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
CUDA + openCL: fix bug in accessing rms_norm->src while doing fusion (llama/16577)
authorAman Gupta <redacted>
Tue, 14 Oct 2025 14:48:08 +0000 (22:48 +0800)
committerGeorgi Gerganov <redacted>
Wed, 15 Oct 2025 06:29:17 +0000 (09:29 +0300)
ggml/src/ggml-cuda/ggml-cuda.cu
ggml/src/ggml-opencl/ggml-opencl.cpp

index 83b82c1ad3e5c920ae348b7af476e17b01810b39..da312992c80390be16b44cd27bdc44afd38d491f 100644 (file)
@@ -2876,7 +2876,7 @@ static bool ggml_cuda_can_fuse(const struct ggml_cgraph * cgraph, int node_idx,
         }
 
         //if rms norm is the B operand, then we don't handle broadcast
-        if (rms_norm == mul->src[1] && !ggml_are_same_shape(mul->src[0], rms_norm->src[1])) {
+        if (rms_norm == mul->src[1] && !ggml_are_same_shape(mul->src[0], rms_norm)) {
             return false;
         }
 
index d2759069b3e29c513f527df89fbeed162e18d36e..0693d38d80af66fd27651b9a421be7fec4541d09 100644 (file)
@@ -2686,7 +2686,7 @@ static bool ggml_opencl_can_fuse(const struct ggml_cgraph * cgraph, int node_idx
 
         // if rms_norm is the B operand, then we don't handle broadcast
         if (rms_norm == mul->src[1] &&
-            !ggml_are_same_shape(mul->src[0], rms_norm->src[1])) {
+            !ggml_are_same_shape(mul->src[0], rms_norm)) {
             return false;
         }