Vulkan: fused rms norm (#577)

Co-authored-by: Iwan Kawrakow <iwan.kawrakow@gmail.com>
This commit is contained in:
Kawrakow
2025-07-03 15:36:52 +02:00
committed by GitHub
parent 1db6a073cb
commit b445c83eb9
4 changed files with 96 additions and 6 deletions

View File

@@ -9597,12 +9597,7 @@ static struct ggml_tensor * llm_build_norm(
const llm_build_cb & cb,
int il, float scale_eps = 1) {
#ifdef GGML_USE_VULKAN
constexpr bool use_fused_rms_norm = false;
#else
constexpr bool use_fused_rms_norm = true;
#endif
if (use_fused_rms_norm && type == LLM_NORM_RMS && mw) {
if (type == LLM_NORM_RMS && mw) {
cur = ggml_fused_rms_norm(ctx, cur, mw, scale_eps * hparams.f_norm_rms_eps);
if (mb) {
cb(cur, "fused_norm", il);