CUDA + openCL: fix bug in accessing rms_norm->src while doing fusion (#16577)

This commit is contained in:
Aman Gupta
2025-10-14 22:48:08 +08:00
committed by GitHub
parent 4258e0cfe7
commit 120bf7046d
2 changed files with 2 additions and 2 deletions

View 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;
}

View 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;
}