[Performance] Add Triton kernel for Gemma3n sparse GELU (#48498)

Signed-off-by: BWAAEEEK <jooho414@gmail.com>
Co-authored-by: Andreas Karatzas <akaratza@amd.com>
Co-authored-by: Cyrus Leung <tlleungac@connect.ust.hk>
This commit is contained in:
JooHo Lee
2026-09-14 07:42:15 +00:00
committed by GitHub
co-authored by Andreas Karatzas Cyrus Leung
parent e6b4e47d2d
commit 78e84261ab
15 changed files with 555 additions and 21 deletions
+16
View File
@@ -3322,6 +3322,22 @@ def test_ir_op_priority_default():
assert priority_config.fused_add_rms_norm == ["native"]
@pytest.mark.parametrize("mode", [CompilationMode.NONE, CompilationMode.VLLM_COMPILE])
@pytest.mark.parametrize("backend", ["inductor", "eager"])
def test_ir_op_platform_defaults_support_sparse_gelu(mode, backend):
"""Worker initialization must not select an unregistered sparse GELU provider."""
from vllm import ir
config = SimpleNamespace(
compilation_config=CompilationConfig(mode=mode, backend=backend)
)
priority = current_platform.get_default_ir_op_priority(config)
expected = ["triton", "native"] if current_platform.is_cuda() else ["native"]
with priority.set_priority():
assert ir.ops.gelu_and_mul_sparse.get_priority() == expected
def test_ir_op_priority_str():
"""Test that passing a comma-delimited string works"""
from vllm.config.kernel import IrOpPriorityConfig