Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
73eb67c0
"vscode:/vscode.git/clone" did not exist on "e7ad4c9c8be795e5aca9abb66af2392de32aeb1c"
Unverified
Commit
73eb67c0
authored
May 14, 2025
by
Sai Enduri
Committed by
GitHub
May 14, 2025
Browse files
Enable unit tests for AMD CI. (#6283)
parent
9a91fa0e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
150 additions
and
4 deletions
+150
-4
.github/workflows/pr-test-amd.yml
.github/workflows/pr-test-amd.yml
+125
-1
test/srt/run_suite.py
test/srt/run_suite.py
+12
-0
test/srt/test_full_deepseek_v3.py
test/srt/test_full_deepseek_v3.py
+13
-3
No files found.
.github/workflows/pr-test-amd.yml
View file @
73eb67c0
...
...
@@ -325,11 +325,135 @@ jobs:
run
:
|
docker exec -w /sglang-checkout/test/srt -e SGLANG_IS_IN_CI=1 -e SGLANG_AMD_CI=1 ci_sglang python3 -m unittest test_bench_serving.TestBenchServing.test_moe_offline_throughput_without_radix_cache
unit-test-backend-1-gpu-amd
:
if
:
(github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') &&
github.event.pull_request.draft ==
false
strategy
:
matrix
:
runner
:
[
linux-mi300-gpu-1
,
linux-mi325-gpu-1
]
runs-on
:
${{matrix.runner}}
steps
:
-
name
:
Checkout code
uses
:
actions/checkout@v4
-
name
:
Setup docker
run
:
|
# Ensure GPU isolation if pod is part of kubernetes setup with DEVICE_FLAG.
if [ -f "/etc/podinfo/gha-render-devices" ]; then
DEVICE_FLAG=$(cat /etc/podinfo/gha-render-devices)
else
DEVICE_FLAG="--device /dev/dri"
fi
docker pull lmsysorg/sglang:v0.4.6.post3-rocm630
docker run -dt --user root --device=/dev/kfd $DEVICE_FLAG \
-v ${{ github.workspace }}:/sglang-checkout --ipc=host --group-add video \
--cap-add=SYS_PTRACE -e HF_TOKEN=${HF_TOKEN} --security-opt seccomp=unconfined \
-w /sglang-checkout --name ci_sglang \
lmsysorg/sglang:v0.4.6.post3-rocm630
-
name
:
Install dependencies
run
:
|
docker exec ci_sglang pip install --upgrade pip
docker exec ci_sglang pip uninstall sgl-kernel -y || true
docker exec -w /sglang-checkout/sgl-kernel ci_sglang bash -c "rm -f pyproject.toml && mv pyproject_rocm.toml pyproject.toml && python3 setup_rocm.py install"
docker exec ci_sglang pip install -e "python[dev_hip]"
docker exec -w / ci_sglang git clone https://github.com/merrymercy/human-eval.git
docker exec -w /human-eval ci_sglang pip install -e .
-
name
:
Run test
timeout-minutes
:
30
run
:
|
docker exec -w /sglang-checkout/test/srt -e SGLANG_IS_IN_CI=1 -e SGLANG_AMD_CI=1 -e SGLANG_AITER_MOE=1 ci_sglang python3 run_suite.py --suite per-commit-amd
unit-test-backend-2-gpu-amd
:
if
:
(github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') &&
github.event.pull_request.draft ==
false
strategy
:
matrix
:
runner
:
[
linux-mi300-gpu-2
,
linux-mi325-gpu-2
]
runs-on
:
${{matrix.runner}}
steps
:
-
name
:
Checkout code
uses
:
actions/checkout@v4
-
name
:
Setup docker
run
:
|
# Ensure GPU isolation if pod is part of kubernetes setup with DEVICE_FLAG.
if [ -f "/etc/podinfo/gha-render-devices" ]; then
DEVICE_FLAG=$(cat /etc/podinfo/gha-render-devices)
else
DEVICE_FLAG="--device /dev/dri"
fi
docker pull lmsysorg/sglang:v0.4.6.post3-rocm630
docker run -dt --user root --device=/dev/kfd $DEVICE_FLAG \
-v ${{ github.workspace }}:/sglang-checkout --ipc=host --group-add video \
--cap-add=SYS_PTRACE -e HF_TOKEN=${HF_TOKEN} --security-opt seccomp=unconfined \
-w /sglang-checkout --name ci_sglang \
lmsysorg/sglang:v0.4.6.post3-rocm630
-
name
:
Install dependencies
run
:
|
docker exec ci_sglang pip install --upgrade pip
docker exec ci_sglang pip uninstall sgl-kernel -y || true
docker exec -w /sglang-checkout/sgl-kernel ci_sglang bash -c "rm -f pyproject.toml && mv pyproject_rocm.toml pyproject.toml && python3 setup_rocm.py install"
docker exec ci_sglang pip install -e "python[dev_hip]"
docker exec -w / ci_sglang git clone https://github.com/merrymercy/human-eval.git
docker exec -w /human-eval ci_sglang pip install -e .
-
name
:
Run test
timeout-minutes
:
30
run
:
|
docker exec -w /sglang-checkout/test/srt -e SGLANG_IS_IN_CI=1 -e SGLANG_AMD_CI=1 -e SGLANG_AITER_MOE=1 ci_sglang python3 run_suite.py --suite per-commit-2-gpu-amd
unit-test-backend-8-gpu-amd
:
if
:
(github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') &&
github.event.pull_request.draft ==
false
strategy
:
matrix
:
runner
:
[
linux-mi300-gpu-8
,
linux-mi325-gpu-8
]
runs-on
:
${{matrix.runner}}
steps
:
-
name
:
Checkout code
uses
:
actions/checkout@v4
-
name
:
Setup docker
run
:
|
# Ensure GPU isolation if pod is part of kubernetes setup with DEVICE_FLAG.
if [ -f "/etc/podinfo/gha-render-devices" ]; then
DEVICE_FLAG=$(cat /etc/podinfo/gha-render-devices)
else
DEVICE_FLAG="--device /dev/dri"
fi
docker pull lmsysorg/sglang:v0.4.6.post3-rocm630
docker run -dt --user root --device=/dev/kfd $DEVICE_FLAG \
-v ${{ github.workspace }}:/sglang-checkout --ipc=host --group-add video \
--cap-add=SYS_PTRACE -e HF_TOKEN=${HF_TOKEN} --security-opt seccomp=unconfined \
-w /sglang-checkout --name ci_sglang \
lmsysorg/sglang:v0.4.6.post3-rocm630
-
name
:
Install dependencies
run
:
|
docker exec ci_sglang pip install --upgrade pip
docker exec ci_sglang pip uninstall sgl-kernel -y || true
docker exec -w /sglang-checkout/sgl-kernel ci_sglang bash -c "rm -f pyproject.toml && mv pyproject_rocm.toml pyproject.toml && python3 setup_rocm.py install"
docker exec ci_sglang pip install -e "python[dev_hip]"
docker exec -w / ci_sglang git clone https://github.com/merrymercy/human-eval.git
docker exec -w /human-eval ci_sglang pip install -e .
-
name
:
Run test
timeout-minutes
:
30
run
:
|
docker exec -w /sglang-checkout/test/srt -e SGLANG_IS_IN_CI=1 -e SGLANG_AMD_CI=1 -e SGLANG_AITER_MOE=1 ci_sglang python3 run_suite.py --suite per-commit-8-gpu-amd
finish
:
if
:
always()
needs
:
[
accuracy-test-1-gpu-amd
,
mla-test-1-gpu-amd
,
bench-test-2-gpu-amd
,
accuracy-test-2-gpu-amd
,
performance-test-1-gpu-part-1-amd
,
performance-test-1-gpu-part-2-amd
accuracy-test-2-gpu-amd
,
performance-test-1-gpu-part-1-amd
,
performance-test-1-gpu-part-2-amd
,
unit-test-backend-1-gpu-amd
,
unit-test-backend-2-gpu-amd
,
unit-test-backend-8-gpu-amd
]
runs-on
:
ubuntu-latest
steps
:
...
...
test/srt/run_suite.py
View file @
73eb67c0
...
...
@@ -85,6 +85,12 @@ suites = {
TestFile
(
"test_w8a8_quantization.py"
,
46
),
TestFile
(
"models/lora/test_lora_cuda_graph.py"
,
250
),
],
"per-commit-amd"
:
[
TestFile
(
"test_mla.py"
,
242
),
TestFile
(
"test_mla_deepseek_v3.py"
,
221
),
TestFile
(
"test_torch_compile.py"
,
76
),
TestFile
(
"test_torch_compile_moe.py"
,
172
),
],
"per-commit-2-gpu"
:
[
TestFile
(
"models/lora/test_lora_tp.py"
,
116
),
TestFile
(
"test_data_parallelism.py"
,
73
),
...
...
@@ -95,6 +101,9 @@ suites = {
TestFile
(
"test_update_weights_from_distributed.py"
,
103
),
TestFile
(
"test_verl_engine.py"
,
64
),
],
"per-commit-2-gpu-amd"
:
[
TestFile
(
"test_mla_tp.py"
,
170
),
],
"per-commit-8-gpu"
:
[
# Disabled deepep tests temporarily because it takes too much time.
# TODO: re-enable them after reducing the test time with compilation cache and smaller models.
...
...
@@ -107,6 +116,9 @@ suites = {
TestFile
(
"test_full_deepseek_v3.py"
,
250
),
TestFile
(
"test_pp_single_node.py"
,
150
),
],
"per-commit-8-gpu-amd"
:
[
TestFile
(
"test_full_deepseek_v3.py"
,
250
),
],
"nightly"
:
[
TestFile
(
"test_nightly_gsm8k_eval.py"
),
],
...
...
test/srt/test_full_deepseek_v3.py
View file @
73eb67c0
import
os
import
unittest
from
types
import
SimpleNamespace
...
...
@@ -66,7 +67,10 @@ class TestDeepseekV3(CustomTestCase):
write_github_step_summary
(
f
"### test_bs_1_speed (deepseek-v3)
\n
"
f
"
{
speed
=
:.
2
f
}
token/s
\n
"
)
self
.
assertGreater
(
speed
,
75
)
if
os
.
getenv
(
"SGLANG_AMD_CI"
)
==
"1"
:
self
.
assertGreater
(
speed
,
12
)
else
:
self
.
assertGreater
(
speed
,
75
)
class
TestDeepseekV3MTP
(
CustomTestCase
):
...
...
@@ -144,8 +148,14 @@ class TestDeepseekV3MTP(CustomTestCase):
f
"
{
acc_length
=
:.
2
f
}
\n
"
f
"
{
speed
=
:.
2
f
}
token/s
\n
"
)
self
.
assertGreater
(
acc_length
,
2.9
)
self
.
assertGreater
(
speed
,
105
)
if
os
.
getenv
(
"SGLANG_AMD_CI"
)
==
"1"
:
self
.
assertGreater
(
acc_length
,
2.8
)
else
:
self
.
assertGreater
(
acc_length
,
2.9
)
if
os
.
getenv
(
"SGLANG_AMD_CI"
)
==
"1"
:
self
.
assertGreater
(
speed
,
15
)
else
:
self
.
assertGreater
(
speed
,
105
)
if
__name__
==
"__main__"
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment