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
c47a51db
Unverified
Commit
c47a51db
authored
May 18, 2025
by
Sai Enduri
Committed by
GitHub
May 18, 2025
Browse files
Clean up AMD CI (#6365)
parent
11553c1a
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
150 additions
and
246 deletions
+150
-246
.github/workflows/nightly-test-amd.yml
.github/workflows/nightly-test-amd.yml
+5
-22
.github/workflows/pr-test-amd.yml
.github/workflows/pr-test-amd.yml
+67
-224
scripts/amd_ci_exec.sh
scripts/amd_ci_exec.sh
+37
-0
scripts/amd_ci_install_dependency.sh
scripts/amd_ci_install_dependency.sh
+15
-0
scripts/amd_ci_start_container.sh
scripts/amd_ci_start_container.sh
+26
-0
No files found.
.github/workflows/nightly-test-amd.yml
View file @
c47a51db
...
...
@@ -27,32 +27,15 @@ jobs:
-
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
touch github_summary.md
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
bash scripts/amd_ci_start_container.sh
env
:
GITHUB_WORKSPACE
:
${{ github.workspace }}
-
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 .
docker exec ci_sglang pip install huggingface_hub[hf_xet]
run
:
bash scripts/amd_ci_install_dependency.sh
-
name
:
Nightly Test
run
:
|
docker exec -w /sglang-checkout/test/srt -e SGLANG_IS_IN_CI=1
-e GITHUB_STEP_SUMMARY="/sglang-checkout/github_summary.md"
ci_sglang
python3 run_suite.py --suite nightly-amd --timeout-per-file 7200
bash scripts/amd_ci_exec.sh
-e GITHUB_STEP_SUMMARY="/sglang-checkout/github_summary.md" python3 run_suite.py --suite nightly-amd --timeout-per-file 7200
echo "$(<github_summary.md )" >> $GITHUB_STEP_SUMMARY
.github/workflows/pr-test-amd.yml
View file @
c47a51db
This diff is collapsed.
Click to expand it.
scripts/amd_ci_exec.sh
0 → 100755
View file @
c47a51db
#!/bin/bash
set
-euo
pipefail
# Default working directory
WORKDIR
=
"/sglang-checkout/test/srt"
ENV_ARGS
=(
-e
SGLANG_AMD_CI
=
1
-e
SGLANG_IS_IN_CI
=
1
-e
SGLANG_AITER_MOE
=
1
)
# Parse optional -w/--workdir and -e ENV=VAL flags
while
[[
$#
-gt
0
]]
;
do
case
"
$1
"
in
-w
|
--workdir
)
WORKDIR
=
"
$2
"
shift
2
;;
-e
)
ENV_ARGS+
=(
"-e"
"
$2
"
)
shift
2
;;
--
)
shift
break
;;
*
)
break
;;
esac
done
# Run docker exec
docker
exec
\
-w
"
$WORKDIR
"
\
"
${
ENV_ARGS
[@]
}
"
\
ci_sglang
"
$@
"
scripts/amd_ci_install_dependency.sh
0 → 100755
View file @
c47a51db
#!/bin/bash
set
-euo
pipefail
# Install the required dependencies in CI.
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
.
docker
exec
-w
/ ci_sglang
mkdir
-p
/dummy-grok
mkdir
-p
dummy-grok
&&
wget https://sharkpublic.blob.core.windows.net/sharkpublic/sglang/dummy_grok.json
-O
dummy-grok/config.json
docker
cp
./dummy-grok ci_sglang:/
scripts/amd_ci_start_container.sh
0 → 100755
View file @
c47a51db
#!/bin/bash
set
-euo
pipefail
# Set up DEVICE_FLAG based on Kubernetes pod info
if
[
-f
"/etc/podinfo/gha-render-devices"
]
;
then
DEVICE_FLAG
=
$(
cat
/etc/podinfo/gha-render-devices
)
else
DEVICE_FLAG
=
"--device /dev/dri"
fi
# Pull the image
IMAGE
=
"lmsysorg/sglang:v0.4.6.post3-rocm630"
echo
"Pulling Docker image:
$IMAGE
"
docker pull
"
$IMAGE
"
# Run the container
echo
"Starting container: ci_sglang"
docker run
-dt
--user
root
--device
=
/dev/kfd
$DEVICE_FLAG
\
-v
"
${
GITHUB_WORKSPACE
:-
$PWD
}
:/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
\
"
$IMAGE
"
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