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
2b1808ce
Unverified
Commit
2b1808ce
authored
Feb 07, 2025
by
Yineng Zhang
Committed by
GitHub
Feb 07, 2025
Browse files
update unit test in AMD CI (#3366)
parent
e868d0b6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
6 deletions
+42
-6
.github/workflows/pr-test-amd.yml
.github/workflows/pr-test-amd.yml
+36
-0
test/srt/test_mla.py
test/srt/test_mla.py
+6
-6
No files found.
.github/workflows/pr-test-amd.yml
View file @
2b1808ce
...
...
@@ -56,6 +56,42 @@ jobs:
run
:
|
docker exec -w /sglang-checkout/test/srt ci_sglang python3 test_eval_accuracy_large.py
mla-test-1-gpu-amd
:
if
:
github.repository == 'sgl-project/sglang' && github.event.pull_request.draft ==
false
runs-on
:
linux-mi300-gpu-1
steps
:
-
name
:
Checkout code
uses
:
actions/checkout@v3
-
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.2.post2-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=${{ secrets.AMD_HF_TOKEN }} --security-opt seccomp=unconfined \
-w /sglang-checkout --name ci_sglang \
lmsysorg/sglang:v0.4.2.post2-rocm630
-
name
:
Install dependencies
run
:
|
docker exec ci_sglang pip install --upgrade pip
docker exec -w /sglang-checkout/sgl-kernel ci_sglang 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
:
MLA TEST
timeout-minutes
:
20
run
:
|
docker exec -w /sglang-checkout/test/srt ci_sglang python3 test_mla.py
finish
:
needs
:
[
accuracy-test-1-gpu-amd
...
...
test/srt/test_mla.py
View file @
2b1808ce
import
unittest
from
types
import
SimpleNamespace
import
torch
from
sglang.srt.utils
import
kill_process_tree
from
sglang.test.few_shot_gsm8k
import
run_eval
as
run_eval_few_shot_gsm8k
from
sglang.test.run_eval
import
run_eval
...
...
@@ -58,16 +60,14 @@ class TestDeepseekV3(unittest.TestCase):
def
setUpClass
(
cls
):
cls
.
model
=
"lmzheng/sglang-ci-dsv3-test"
cls
.
base_url
=
DEFAULT_URL_FOR_TEST
other_args
=
[
"--trust-remote-code"
]
if
torch
.
cuda
.
is_available
()
and
torch
.
version
.
cuda
:
other_args
.
extend
([
"--enable-torch-compile"
,
"--cuda-graph-max-bs"
,
"2"
])
cls
.
process
=
popen_launch_server
(
cls
.
model
,
cls
.
base_url
,
timeout
=
DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH
,
other_args
=
[
"--trust-remote-code"
,
"--enable-torch-compile"
,
"--cuda-graph-max-bs"
,
"2"
,
],
other_args
=
other_args
,
)
@
classmethod
...
...
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