add optional activation scales to mul_mat and mul_mat_id tensors

This commit is contained in:
Ruben Ortlam
2026-10-09 21:13:44 +02:00
committed by Oliver Simons
parent d8d8e70a9a
commit 7be59da2f9
+10 -2
View File
@@ -3406,7 +3406,11 @@ struct ggml_tensor * ggml_mul_mat_ext(
result->src[2] = scale_weight; result->src[2] = scale_weight;
} }
GGML_UNUSED(scale_activations); if (scale_activations) {
GGML_ASSERT(ggml_can_repeat(scale_activations, b));
result->src[3] = scale_activations;
}
return result; return result;
} }
@@ -3491,7 +3495,11 @@ struct ggml_tensor * ggml_mul_mat_id_ext(
result->src[3] = s; result->src[3] = s;
} }
GGML_UNUSED(scale_activations); if (scale_activations) {
GGML_ASSERT(ggml_can_repeat(scale_activations, b));
result->src[4] = scale_activations;
}
return result; return result;
} }