Skip to content

Commit b9fb73b

Browse files
authored
Merge branch 'ROCm:main' into main
2 parents c652c26 + 5c3d7f0 commit b9fb73b

File tree

1,819 files changed

+41804
-10168
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,819 files changed

+41804
-10168
lines changed

.githooks/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ done
5858
if command -v clang-format >/dev/null; then
5959
for file in $files; do
6060
[[ -L $file ]] && continue
61-
if [[ -e $file ]] && echo $file | grep -Eq '\.c$|\.h$|\.hpp$|\.cpp$|\.cl$|\.h\.in$|\.hpp\.in$|\.cpp\.in$'; then
61+
if [[ -e $file ]] && echo $file | grep -Eq '\.c$|\.h$|\.cuh$|\.hpp$|\.cpp$|\.cl$|\.h\.in$|\.hpp\.in$|\.cpp\.in$'; then
6262
echo "clang-format $file"
6363
clang-format -i -style=file "$file"
6464
git add -u "$file"
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: Sglang Downstream Test
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main] # Triggers on PRs targeting `main`
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
sglang:
15+
name: sglang integration
16+
runs-on: mi300x-1gpu
17+
env:
18+
SGL_BRANCH: v0.4.10
19+
GPU_ARCH: gfx942
20+
HF_TOKEN: ${{ secrets.HF_TOKEN_TEST }}
21+
22+
steps:
23+
- name: Checkout aiter repo
24+
uses: actions/checkout@v4
25+
26+
- name: Clone sglang repo
27+
run: |
28+
git clone https://github.com/sgl-project/sglang.git
29+
30+
# TODO: Currently, we use PAT, it should be replaced by repo token
31+
- name: Make authenticated API request
32+
run: |
33+
curl -sSfL https://api.github.com/repos/casey/just/releases/latest
34+
35+
- name: Workaround to change the connection of unbuntu from http to https
36+
run: |
37+
cd sglang
38+
sed -i "79iRUN sed -i 's|http://|https://|g' /etc/apt/sources.list.d/* && sed -i 's|http://|https://|g' /etc/apt/sources.list && apt update -o Acquire::https::Verify-Peer=false && apt install -o Acquire::https::Verify-Peer=false ca-certificates -y && echo 'Acquire::https::Verify-Peer \"false\";' > /etc/apt/apt.conf.d/99insecure" docker/Dockerfile.rocm
39+
40+
- name: Build sglang_aiter_test image
41+
run: |
42+
cd sglang
43+
sed -i '/ENV AITER_COMMIT="v0.1.4"/c\ARG AITER_COMMIT="v0.1.4"\nENV AITER_COMMIT=${AITER_COMMIT}' docker/Dockerfile.rocm
44+
docker build --no-cache \
45+
--build-arg SGL_BRANCH=${SGL_BRANCH} \
46+
--build-arg GPU_ARCH=${GPU_ARCH} \
47+
--build-arg AITER_REPO=${GITHUB_REPO_URL} \
48+
--build-arg AITER_COMMIT=${GITHUB_COMMIT_SHA} \
49+
-t sglang_aiter_test:ci -f docker/Dockerfile.rocm .
50+
env:
51+
GITHUB_REPO_URL: ${{ github.event.pull_request.head.repo.clone_url || 'https://github.com/ROCm/aiter.git' }}
52+
GITHUB_COMMIT_SHA: ${{ github.event.pull_request.head.sha || github.event.head_commit.id }}
53+
54+
- name: Start CI container
55+
run: |
56+
echo "Clean up containers..."
57+
docker ps -aq -f name=sglang_aiter_test | xargs -r docker stop | xargs -r docker rm
58+
59+
if [ -f "/etc/podinfo/gha-render-devices" ]; then
60+
DEVICE_FLAG=$(cat /etc/podinfo/gha-render-devices)
61+
else
62+
DEVICE_FLAG="--device /dev/dri"
63+
fi
64+
65+
echo "Starting container: sglang_aiter_test:ci"
66+
docker run -dt --user root --device=/dev/kfd $DEVICE_FLAG \
67+
-v "${GITHUB_WORKSPACE:-$PWD}/sglang:/sglang-checkout" \
68+
--ipc=host --group-add video \
69+
--shm-size 32g \
70+
--cap-add=SYS_PTRACE \
71+
-e HF_TOKEN="${HF_TOKEN:-}" \
72+
--security-opt seccomp=unconfined \
73+
-w /sglang-checkout \
74+
--name sglang_aiter_test \
75+
sglang_aiter_test:ci
76+
env:
77+
GITHUB_WORKSPACE: ${{ github.workspace }}
78+
79+
- name: Install wget
80+
run: sudo apt-get update && sudo apt-get install -y wget
81+
82+
- name: Install dependencies
83+
run: |
84+
cd sglang
85+
sed -i 's/ci_sglang/sglang_aiter_test/g' scripts/ci/amd_ci_install_dependency.sh
86+
bash scripts/ci/amd_ci_install_dependency.sh
87+
88+
- name: Evaluate Accuracy
89+
timeout-minutes: 60
90+
run: |
91+
cd sglang
92+
sed -i 's/ci_sglang/sglang_aiter_test/g' scripts/ci/amd_ci_exec.sh
93+
bash scripts/ci/amd_ci_exec.sh pip show aiter || true
94+
bash scripts/ci/amd_ci_exec.sh -e SGLANG_USE_AITER=0 python3 test_eval_accuracy_large.py
95+
bash scripts/ci/amd_ci_exec.sh python3 test_eval_fp8_accuracy.py
96+
bash scripts/ci/amd_ci_exec.sh python3 models/test_qwen_models.py
97+
98+
# TODO: Clean up because some dependencies are installed under root user which can't be removed by runner, these dependencies should be installed as a non-root user
99+
- name: Clean Up
100+
if: always()
101+
run:
102+
docker exec -u root sglang_aiter_test bash -c "rm -rf /sglang-checkout/sgl-kernel; rm -rf /sglang-checkout/python"

3rdparty/composable_kernel

Submodule composable_kernel updated 996 files

aiter/__init__.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,17 @@ def getLogger():
2626
)
2727
console_handler.setFormatter(formatter)
2828
console_handler.setLevel(logging.INFO)
29+
2930
logger.addHandler(console_handler)
31+
if hasattr(torch._dynamo.config, "ignore_logger_methods"):
32+
torch._dynamo.config.ignore_logger_methods = (
33+
logging.Logger.info,
34+
logging.Logger.warning,
35+
logging.Logger.debug,
36+
logger.warning,
37+
logger.info,
38+
logger.debug,
39+
)
3040

3141
return logger
3242

@@ -51,6 +61,7 @@ def getLogger():
5161
from .ops.attention import *
5262
from .ops.custom import *
5363
from .ops.custom_all_reduce import *
64+
from .ops.quick_all_reduce import *
5465
from .ops.moe_op import *
5566
from .ops.moe_sorting import *
5667
from .ops.pos_encoding import *

aiter/aot/triton/compile.cpp

Lines changed: 0 additions & 72 deletions
This file was deleted.

aiter/aot/triton/compile.h

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)