---
id: pr-sglang-24048
repo: sgl-project/sglang
pr: 24048
title: '[VLM] Optimize Gemma4 VLM with PCG and fuse RMSNorm + residual add + scalar'
author: yuan-luo
date: '2026-05-04'
url: https://github.com/sgl-project/sglang/pull/24048
source_category: upstream-code
architectures:
- sm100
tags:
- CUDA kernel
- benchmark kernel
- fused moe
- gemm_quant
- moe kernel
- norm_elementwise
- triton kernel
techniques:
- fine-grained-quantization
- kernel-fusion
hardware_features: []
kernel_types:
- decode
- gemm
- moe
- norm
languages:
- cuda-cpp
- triton
captured_at: '2026-05-16'
status: merged
merge_sha: e5c58eb9d627421236f78053137562b97c14984e
inclusion_reason: Look for fusion, vectorization, dtype conversion, and store-traffic reductions before changing math.
changed_paths:
- python/sglang/srt/layers/gemma4_fused_ops.py
- python/sglang/srt/model_executor/model_runner.py
- python/sglang/srt/model_executor/piecewise_cuda_graph_runner.py
- python/sglang/srt/models/gemma4_causal.py
- python/sglang/srt/models/gemma4_mm.py
artifact_dir: evidence/pull-bundles/sglang/gh-24048
head_ref_oid: 26e0cf682b7364a16bf1bbb4e95b7fc290f4651a
---
# [VLM] Optimize Gemma4 VLM with PCG and fuse RMSNorm + residual add + scalar

- Repository: `sgl-project/sglang`
- PR: [24048](https://github.com/sgl-project/sglang/pull/24048)
- Decision: `Look for fusion, vectorization, dtype conversion, and store-traffic reductions before changing math.`
- Reason: Look for fusion, vectorization, dtype conversion, and store-traffic reductions before changing math.

## Changed Paths

- `python/sglang/srt/layers/gemma4_fused_ops.py`
- `python/sglang/srt/model_executor/model_runner.py`
- `python/sglang/srt/model_executor/piecewise_cuda_graph_runner.py`
- `python/sglang/srt/models/gemma4_causal.py`
- `python/sglang/srt/models/gemma4_mm.py`

## Evidence Bundle

`evidence/pull-bundles/sglang/gh-24048`
