Skip to content

fix(pd): raise the RLIMIT_MEMLOCK soft limit to the hard limit at server start #23798

fix(pd): raise the RLIMIT_MEMLOCK soft limit to the hard limit at server start

fix(pd): raise the RLIMIT_MEMLOCK soft limit to the hard limit at server start #23798

name: ATOM SGLang Test
on:
pull_request:
branches: [main] # Triggers on PRs targeting `main`
types: [opened, synchronize, reopened, ready_for_review, labeled, closed]
# Do not use paths-ignore here. The required gate must be published for
# every PR; ci-gate below keeps the old path-ignore behavior for expensive
# jobs.
pull_request_review:
types: [submitted]
concurrency:
# Non-approval reviews must not replace a pending approval run. Every label
# event except the one that opens the gate -- adding ci:sglang, or ci:full
# to a PR without ci:sglang (check_label_event in the gate script) -- gets
# its own group too, so an unrelated label can never cancel running heavy
# CI. The gate job's name repeats this test; keep both in sync with
# CI_GATE_LABELS.
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}${{ github.event_name == 'pull_request_review' && github.event.review.state != 'approved' && format('-review-{0}', github.run_id) || '' }}${{ github.event_name == 'pull_request' && github.event.action == 'labeled' && !(github.event.label.name == 'ci:sglang' || (github.event.label.name == 'ci:full' && !contains(github.event.pull_request.labels.*.name, 'ci:sglang'))) && format('-noop-{0}', github.run_id) || '' }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
ATOM_BASE_NIGHTLY_IMAGE: rocm/atom-dev:latest
ATOM_PYTHON_TAG: "cp312"
GITHUB_REPO_URL: ${{ github.event.pull_request.head.repo.clone_url || 'https://github.com/ROCm/ATOM.git' }}
GITHUB_COMMIT_SHA: ${{ github.event.pull_request.head.sha || github.event.head_commit.id || github.sha }}
NIGHTLY_PLUGIN_IMAGE_TAG: rocm/atom-dev:sglang-latest
jobs:
ci-gate:
name: Check Heavy CI Gate
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
pull-requests: read
outputs:
should_run: ${{ steps.gate.outputs.should_run }}
reason: ${{ steps.gate.outputs.reason }}
decidable: ${{ steps.gate.outputs.decidable }}
steps:
- name: Checkout ATOM repo
uses: actions/checkout@v6
- name: Check approval and label gate
id: gate
env:
CI_GATE_WORKFLOW: atom-sglang-test.yaml
CI_GATE_LABELS: ci:full,ci:sglang
CI_GATE_PATHS_IGNORE: |
**/*.md
docs/**
.claude/**
atom/plugin/vllm/**
atom/mesh/**
.github/benchmark/models_atomesh.yaml
.github/scripts/atomesh/**
.github/workflows/atomesh-*.yaml
.github/workflows/atom-review-bot*.yml
.github/scripts/atomesh_*.sh
.github/dashboard/atomesh_*.html
.github/workflows/atom-vllm-*.yaml
.github/benchmark/oot_models_accuracy.json
LICENSE
.gitignore
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: bash ./.github/scripts/check_heavy_ci_gate.sh
check-signal:
if: ${{ needs.ci-gate.outputs.should_run == 'true' }}
needs: [ci-gate]
name: Check Pre Checkin Signal
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
steps:
- name: Checkout ATOM repo
uses: actions/checkout@v6
- name: Wait for Pre Checkin workflow
run: bash ./.github/scripts/check_signal.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_SHA: ${{ github.sha }}
CHECK_SIGNAL_EVENT_NAME: pull_request
CHECK_SIGNAL_HEAD_REF: ${{ github.event.pull_request.head.ref }}
CHECK_SIGNAL_SHA: ${{ github.event.pull_request.head.sha }}
download_aiter_wheel:
if: ${{ needs.ci-gate.outputs.should_run == 'true' && needs.check-signal.result == 'success' }}
needs: [ci-gate, check-signal]
name: Download aiter wheel
runs-on: ubuntu-latest
outputs:
aiter_artifact_id: ${{ steps.download.outputs.aiter_artifact_id }}
aiter_wheel_name: ${{ steps.download.outputs.aiter_wheel_name }}
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Prefer latest main aiter wheel manifest and fallback to artifact
id: download
timeout-minutes: 30
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: bash .github/scripts/download_aiter_wheel.sh
- name: Upload aiter wheel
uses: actions/upload-artifact@v7
with:
name: aiter-whl
path: aiter-whl/amd_aiter*.whl
retention-days: 7
atom-sglang-accuracy:
needs: [ci-gate, check-signal, download_aiter_wheel]
if: ${{ needs.ci-gate.outputs.should_run == 'true' && needs.check-signal.result == 'success' && needs.download_aiter_wheel.result == 'success' }}
name: Accuracy (${{ matrix.model_name }})
runs-on: ${{ matrix.runner }}
timeout-minutes: 240
permissions:
actions: read
contents: read
strategy:
fail-fast: false
max-parallel: 2
matrix:
include:
- model_name: "GLM-5.2-FP8 TP4"
model_path: "zai-org/GLM-5.2-FP8"
extra_args: "--trust-remote-code --tp-size 4 --kv-cache-dtype fp8_e4m3 --mem-fraction-static 0.8 --disable-radix-cache --model-loader-extra-config '{\"online_quant_config\":{\"global_quant_config\":\"ptpc_fp8\",\"layer_quant_config\":{\"model.layers.*.mlp.experts\":\"per_block_fp8\"},\"exclude_layer\":[\"lm_head\",\"model.embed_tokens\",\"*.mlp.gate\"]}}'"
env_vars: |
AITER_QUICK_REDUCE_QUANTIZATION=INT4
AITER_USE_FLYDSL_MOE_SORTING=1
SGLANG_USE_AITER=1
SGLANG_ENABLE_TORCH_COMPILE=1
SGLANG_EXTERNAL_MODEL_PACKAGE=atom.plugin.sglang.models
TORCHINDUCTOR_COMPILE_THREADS=128
lm_eval_num_fewshot: 5
lm_eval_num_concurrent: 65
accuracy_test_threshold: 0.92
runner: linux-atom-pitt-mi350x-8
- model_name: "GLM-5.2-MXFP4 TP4 MTP3"
model_path: "amd/GLM-5.2-MXFP4"
extra_args: "--trust-remote-code --tp-size 4 --kv-cache-dtype fp8_e4m3 --mem-fraction-static 0.8 --disable-radix-cache --model-loader-extra-config '{\"online_quant_config\":{\"global_quant_config\":\"ptpc_fp8\",\"exclude_layer\":[\"lm_head\",\"model.embed_tokens\",\"*.mlp.gate\",\"*expert*\"]}}' --enable-return-hidden-states --max-running-requests 256 --cuda-graph-backend-decode full --cuda-graph-backend-prefill disabled --cuda-graph-max-bs-decode 256 --speculative-algorithm EAGLE --speculative-draft-attention-backend aiter --speculative-num-steps 3 --speculative-eagle-topk 1 --speculative-num-draft-tokens 4"
env_vars: |
SGLANG_DEFAULT_SERVER_ARGS=
AITER_QUICK_REDUCE_QUANTIZATION=INT4
AITER_USE_FLYDSL_MOE_SORTING=1
SGLANG_USE_AITER=1
SGLANG_ENABLE_TORCH_COMPILE=1
SGLANG_EXTERNAL_MODEL_PACKAGE=atom.plugin.sglang.models
TORCHINDUCTOR_COMPILE_THREADS=128
SGLANG_OPT_USE_TOPK_V2=false
ATOM_LOADER_NUM_THREADS=1
ATOM_REPLICATE_VOCAB_EMBED=1
ATOM_SGLANG_V4_ENABLE_TARGET_VERIFY_CG=1
ATOM_SGLANG_V4_DISABLE_TARGET_VERIFY_CG=0
ATOM_SGLANG_V4_DISABLE_DRAFT_CG=0
ATOM_SGLANG_V4_ENABLE_DRAFT_EXTEND_CG=1
ATOM_SGLANG_V4_DISABLE_DRAFT_EXTEND_CG=0
lm_eval_num_fewshot: 5
lm_eval_num_concurrent: 65
accuracy_test_threshold: 0.92
runner: linux-atom-pitt-mi350x-8
- model_name: "MiniMax-M3-MXFP8 EAGLE3 TP4 MTP3"
model_path: "MiniMaxAI/MiniMax-M3-MXFP8"
extra_args: "--trust-remote-code --random-seed 0 --tensor-parallel-size 4 --attention-backend aiter --mem-fraction-static 0.75 --page-size 128 --context-length 32768 --max-running-requests 128 --model-loader-extra-config '{\"online_quant_config\":{\"global_quant_config\":\"ptpc_fp8\",\"exclude_layer\":[\"lm_head\",\"model.embed_tokens\",\"vision_tower\",\"multi_modal_projector\",\"patch_merge_mlp\",\"*block_sparse_moe\"]}}' --json-model-override-args '{\"use_index_cache\":true,\"index_topk_freq\":4}' --speculative-algorithm EAGLE3 --speculative-draft-model-path Inferact/MiniMax-M3-EAGLE3 --speculative-num-steps 3 --speculative-eagle-topk 1 --kv-cache-dtype fp8_e4m3 --disable-radix-cache --decode-log-interval 1"
env_vars: |
SGLANG_DEFAULT_SERVER_ARGS=
SGLANG_EXTERNAL_MODEL_PACKAGE=atom.plugin.sglang.models
SGLANG_EXTERNAL_MM_PROCESSOR_PACKAGE=atom.plugin.sglang.models
AITER_QUICK_REDUCE_QUANTIZATION=INT4
SGLANG_USE_AITER=1
SGLANG_AITER_FP8_PREFILL_ATTN=0
ATOM_FORCE_ATTN_TRITON=1
SGLANG_ENABLE_TORCH_COMPILE=1
TORCHINDUCTOR_COMPILE_THREADS=128
ATOM_SGLANG_EAGLE3_TP_VERIFY_BROADCAST=1
lm_eval_num_fewshot: 5
lm_eval_num_concurrent: 32
lm_eval_use_chat_completions: "1"
lm_eval_extra_model_args: "max_gen_toks=16384"
accuracy_test_threshold: 0.93
runner: linux-atom-pitt-mi350x-8
- model_name: "DeepSeek-V4-Pro MTP3 TP8"
model_path: "deepseek-ai/DeepSeek-V4-Pro"
extra_args: "--trust-remote-code --tensor-parallel-size 8 --kv-cache-dtype fp8_e4m3 --mem-fraction-static 0.9 --swa-full-tokens-ratio 0.1 --max-running-requests 256 --page-size 256 --disable-radix-cache --disable-shared-experts-fusion --tool-call-parser deepseekv4 --reasoning-parser deepseek-v4 --speculative-algorithm EAGLE --speculative-num-steps 3 --speculative-eagle-topk 1 --speculative-num-draft-tokens 4"
env_vars: |
SGLANG_DEFAULT_SERVER_ARGS=
AITER_BF16_FP8_MOE_BOUND=0
ATOM_MOE_GU_ITLV=1
SGLANG_DEFAULT_THINKING=1
SGLANG_DSV4_REASONING_EFFORT=max
SGLANG_USE_AITER=1
SGLANG_DSV4_FP4_EXPERTS=true
AITER_DISABLE_COMM_FUSED_MOE=1
SGLANG_EXTERNAL_MODEL_PACKAGE=atom.plugin.sglang.models
TORCHINDUCTOR_COMPILE_THREADS=128
ATOM_USE_TRITON_MOE=0
ATOM_SGLANG_V4_DISABLE_PRO_DRAFT_TRITON_MOE=1
ATOM_SGLANG_V4_ENABLE_DRAFT_EXTEND_CG=1
lm_eval_num_fewshot: 5
lm_eval_num_concurrent: 8
accuracy_test_threshold: 0.94
runner: linux-atom-pitt-mi350x-8
- model_name: "Kimi-K3 TP8"
model_path: "moonshotai/Kimi-K3"
extra_args: "--trust-remote-code --tensor-parallel-size 8 --attention-backend aiter --kv-cache-dtype fp8_e4m3 --page-size 128 --context-length 16384 --mem-fraction-static 0.93 --disable-radix-cache"
env_vars: |
SGLANG_DEFAULT_SERVER_ARGS=
SGLANG_PLUGINS=atom_sglang
SGLANG_USE_AITER=1
SGLANG_EXTERNAL_MODEL_PACKAGE=atom.plugin.sglang.models
SGLANG_EXTERNAL_MM_PROCESSOR_PACKAGE=atom.plugin.sglang.models
ATOM_LOADER_NUM_THREADS=16
ATOM_SYNC_AFTER_LOAD=1
ATOM_DIST_TIMEOUT_SECONDS=3600
ATOM_USE_TRITON_GEMM=1
AITER_USE_GROUPED_GEMM=0
ATOM_USE_TRITON_MOE=0
AITER_FLYDSL_FORCE=1
AITER_FORCE_GFX1250=0
ATOM_MLA_PAGE_SIZE=1
ATOM_USE_UNIFIED_ATTN=1
ATOM_FORCE_ATTN_TRITON=1
lm_eval_num_fewshot: 5
lm_eval_num_concurrent: 64
accuracy_test_threshold: 0.94
runner: linux-atom-pitt-mi350x-8
- model_name: "Qwen3.8-Flash-Next-FP8 TP2"
model_path: "Qwen/Qwen3.8-Flash-Next-FP8"
extra_args: "--trust-remote-code --tensor-parallel-size 2 --ep-size 2 --attention-backend aiter --kv-cache-dtype bf16 --page-size 64 --mem-fraction-static 0.95 --context-length 16384 --max-running-requests 32 --disable-radix-cache --reasoning-parser qwen3 --cuda-graph-backend-decode full --cuda-graph-max-bs-decode 32"
env_vars: |
SGLANG_DEFAULT_SERVER_ARGS=
SGLANG_PLUGINS=atom_sglang
SGLANG_EXTERNAL_MODEL_PACKAGE=atom.plugin.sglang.models
SGLANG_EXTERNAL_MM_PROCESSOR_PACKAGE=atom.plugin.sglang.models
SGLANG_USE_AITER=1
SGLANG_AITER_KV_CACHE_LAYOUT=nhd
AITER_LOG_LEVEL=WARNING
AITER_MOE_PADDING_SIZE=128
lm_eval_num_fewshot: 5
lm_eval_num_concurrent: 32
lm_eval_use_chat_completions: "1"
lm_eval_extra_model_args: "max_retries=3,timeout=3600,tokenized_requests=False,trust_remote_code=True"
lm_eval_batch_size: 1
lm_eval_gen_kwargs: "max_gen_toks=4096,until=<|im_end|>"
accuracy_test_threshold: 0.96
runner: linux-atom-pitt-mi350x-8
- model_name: "Qwen3.8-2.4T-A95B-Quark-MXFP4 TP8"
model_path: "amd/Qwen3.8-2.4T-A95B-Quark-MXFP4"
extra_args: "--trust-remote-code --tensor-parallel-size 8 --attention-backend aiter --kv-cache-dtype fp8_e4m3 --mem-fraction-static 0.9 --max-running-requests 256 --context-length 32768 --disable-radix-cache --page-size 16 --reasoning-parser qwen3 --enable-torch-compile --torch-compile-max-bs 64 --cuda-graph-backend-prefill breakable --cuda-graph-max-bs-prefill 16384 --cuda-graph-bs-prefill 8192 16384"
env_vars: |
SGLANG_DEFAULT_SERVER_ARGS=
SGLANG_PLUGINS=atom_sglang
SGLANG_EXTERNAL_MODEL_PACKAGE=atom.plugin.sglang.models
SGLANG_EXTERNAL_MM_PROCESSOR_PACKAGE=atom.plugin.sglang.models
SGLANG_USE_AITER=1
AITER_LOG_LEVEL=WARNING
ATOM_AITER_FP8_PREFILL_ATTN=1
ATOM_SGLANG_PREFILL_COMPILE_ONLY=1
TORCHINDUCTOR_COMPILE_THREADS=128
SGLANG_MAMBA_SSM_DTYPE=bfloat16
lm_eval_num_fewshot: 5
lm_eval_num_concurrent: 64
lm_eval_use_chat_completions: "1"
lm_eval_extra_model_args: "max_retries=3,timeout=1200,max_gen_toks=8192,tokenized_requests=False,trust_remote_code=True"
lm_eval_batch_size: 1
lm_eval_gen_kwargs: "do_sample=True,temperature=1.0,top_p=0.95,top_k=20,min_tokens=1,reasoning_effort=low"
accuracy_test_threshold: 0.97
runner: linux-atom-pitt-mi350x-8
env:
AITER_ARTIFACT_ID: ${{ needs.download_aiter_wheel.outputs.aiter_artifact_id }}
CONTAINER_NAME: plugin_ci_sglang_${{ github.run_id }}_${{ strategy.job-index }}
RESULT_DIR: plugin-ci-results
steps:
- name: Checkout ATOM repo
uses: actions/checkout@v6
- name: Download aiter wheel
uses: actions/download-artifact@v8
with:
name: aiter-whl
path: aiter-whl
- name: Build SGLang cell
id: cell
env:
MATRIX_JSON: ${{ toJson(matrix) }}
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
SKIP_DOCKER_LOGIN: ${{ github.event.pull_request.head.repo.fork && '1' || '0' }}
run: |
set -euo pipefail
python3 .github/scripts/plugin_ci/build_cell_json.py \
--plugin sglang \
--matrix-json "${MATRIX_JSON}" \
--github-output
- name: Run SGLang accuracy job
env:
MATRIX_MODEL_NAME: ${{ matrix.model_name }}
MATRIX_MODEL_PATH: ${{ matrix.model_path }}
MATRIX_EXTRA_ARGS: ${{ matrix.extra_args }}
MATRIX_ENV_VARS: ${{ matrix.env_vars }}
MATRIX_LM_EVAL_NUM_FEWSHOT: ${{ matrix.lm_eval_num_fewshot }}
MATRIX_LM_EVAL_NUM_CONCURRENT: ${{ matrix.lm_eval_num_concurrent }}
MATRIX_LM_EVAL_USE_CHAT_COMPLETIONS: ${{ matrix.lm_eval_use_chat_completions }}
MATRIX_LM_EVAL_EXTRA_MODEL_ARGS: ${{ matrix.lm_eval_extra_model_args }}
MATRIX_LM_EVAL_BATCH_SIZE: ${{ matrix.lm_eval_batch_size }}
MATRIX_LM_EVAL_GEN_KWARGS: ${{ matrix.lm_eval_gen_kwargs }}
MATRIX_ACCURACY_TEST_THRESHOLD: ${{ matrix.accuracy_test_threshold }}
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
SKIP_DOCKER_LOGIN: ${{ github.event.pull_request.head.repo.fork && '1' || '0' }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
HF_TOKEN: ${{ secrets.AMD_HF_TOKEN }}
run: |
set -euo pipefail
chmod +x .github/scripts/plugin_ci/run_sglang_ci.sh
bash .github/scripts/plugin_ci/run_sglang_ci.sh
- name: Add SGLang result to job summary
if: always()
env:
CELL_JSON: ${{ steps.cell.outputs.cell_json }}
run: |
python3 - <<'PY'
import json
import os
from pathlib import Path
cell = json.loads(os.environ.get("CELL_JSON") or "{}")
result_root = Path(os.environ["RESULT_DIR"])
outputs = list(result_root.rglob("atom_sglang_accuracy_output.txt"))
with Path(os.environ["GITHUB_STEP_SUMMARY"]).open("a", encoding="utf-8") as summary:
summary.write(f"## {cell.get('id', 'SGLang plugin CI')}\n\n")
if outputs:
text = outputs[0].read_text(encoding="utf-8", errors="replace")
lines = text.splitlines()
table = []
capture = False
for line in lines:
if "|Tasks|Version|" in line:
capture = True
if capture:
if not line.strip() and table:
break
table.append(line)
if table:
summary.write("\n".join(table) + "\n")
PY
- name: Upload SGLang artifacts
if: always()
uses: actions/upload-artifact@v7
with:
name: sglang-${{ matrix.model_name }}-artifacts
path: plugin-ci-results/
if-no-files-found: ignore
atom-sglang-test-gate:
name: ${{ ((github.event_name != 'pull_request_review' && !(github.event.action == 'labeled' && !(github.event.label.name == 'ci:sglang' || (github.event.label.name == 'ci:full' && !contains(github.event.pull_request.labels.*.name, 'ci:sglang'))))) || needs.ci-gate.outputs.should_run == 'true') && 'ATOM SGLang Test Gate' || 'ATOM SGLang Test Gate not requested' }}
if: always()
runs-on: ubuntu-latest
permissions:
contents: read
needs:
- ci-gate
- check-signal
- download_aiter_wheel
- atom-sglang-accuracy
steps:
- name: Checkout ATOM repo
uses: actions/checkout@v6
- name: Evaluate ATOM SGLang test gate
uses: ./.github/actions/evaluate-test-gate
with:
gate-name: ATOM SGLang Test Gate
suite-name: ATOM SGLang tests
should-run: ${{ needs.ci-gate.outputs.should_run }}
decidable: ${{ needs.ci-gate.outputs.decidable }}
reason: ${{ needs.ci-gate.outputs.reason }}
ci-gate-result: ${{ needs.ci-gate.result }}
required-results: |
check-signal=${{ needs.check-signal.result }}
download_aiter_wheel=${{ needs.download_aiter_wheel.result }}
atom-sglang-accuracy=${{ needs.atom-sglang-accuracy.result }}