feat: add 50 SGLang operator baselines and accuracy tests#35
Open
factnn wants to merge 1 commit into
Open
Conversation
50 SGLang operators organized by SGLang source modules: - layers/activation.py (5): silu_and_mul, gelu_and_mul, quick_gelu, new_gelu, xielu - layers/layernorm.py (6): rms_norm, layer_norm, gemma_rms_norm, gemma3_rms_norm, gemma4_rms_norm, rms_norm_without_scale - layers/rotary_embedding/ (12): rotary_embedding, mrotary_embedding, dual_chunk, deepseek_scaling, llama3, dynamic_ntk_scaling, linear_scaling, phi3_long_rope, triton_mrope_fused, triton_ernie45_rope_fused, apply_interleaved_rope_triton, dynamic_ntk_alpha - layers/moe/ (3): fused_moe, topk, moe_align_block_size - layers/attention/fla/ (8): l2norm, rms_norm_gated, fused_recurrent_gated_delta_rule, fused_recurrent_gated_delta_rule_update, fused_sigmoid_gating_delta_rule_update, fused_sigmoid_gating_delta_rule_packed_decode, fused_gdn_gating, layer_norm_gated_fwd - layers/attention/mamba/ (5): causal_conv1d_fn, causal_conv1d_update, selective_scan_update, mamba_chunk_scan_combined_fwd, mixer2_rms_norm_gated - layers/elementwise.py (6): fused_dual_residual_rmsnorm, softcap, silu_and_mul_triton, gelu_and_mul_triton, fused_rmsnorm, experts_combine_triton - layers/gemma4_fused_ops.py (2): gemma_rmsnorm_residual_scalar, gemma_qkv_rmsnorm - layers/conv.py (2): conv2d_layer, conv3d_layer - layers/quantization/ (1): per_token_quant_int8 Each operator has: - Thin wrapper baseline (follows vLLM pattern) - Accuracy + speedup test (follows vLLM test pattern) - Signatures verified against SGLang source Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
50 SGLang operators added to KernelGenBench as a new
sglangnamespace.Structure
src/kernelgenbench/dataset/baseline/sglang/— 50 thin wrapper baselines (follows vLLM pattern)src/kernelgenbench/accuracy/sglang/— 50 accuracy + speedup test filesscripts/test_sglang_baselines.py— batch verification scriptOperators by SGLang source module
layers/activation.pylayers/layernorm.pylayers/rotary_embedding/layers/moe/layers/attention/fla/layers/attention/mamba/layers/elementwise.pylayers/gemma4_fused_ops.pylayers/conv.pylayers/quantization/Test plan
python scripts/test_sglang_baselines.pyon a machine with sglang installed and correct CUDA driverNote
All signatures verified against SGLang source code. This server cannot run GPU tests (CUDA driver version incompatibility with sgl_kernel).