Skip to content

Commit 7792a7c

Browse files
author
root
committed
Merge dev-zyh into dev-hr-musa
2 parents a75dc42 + d4981cd commit 7792a7c

13 files changed

Lines changed: 223 additions & 60 deletions

File tree

.github/scripts/hygon/setup.sh

Lines changed: 60 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,77 @@ git config --global --add safe.directory "$(pwd)"
1515
: "${DEVICE_LIB_PATH:?DEVICE_LIB_PATH is not set}"
1616
: "${LD_LIBRARY_PATH:?LD_LIBRARY_PATH is not set}"
1717

18+
IMAGE_PLUGIN_ROOT="${VLLM_FL_IMAGE_PLUGIN_ROOT:-/opt/vllm-src/vllm-plugin-FL}"
19+
test -d "${IMAGE_PLUGIN_ROOT}/vllm_fl"
20+
21+
# The Hygon CI image already contains the validated plugin commit. Keep the
22+
# checkout available for tests and configs, but load vllm_fl from the image.
23+
HYGON_SITE_DIR="${RUNNER_TEMP:-/tmp}/hygon-python-site"
24+
mkdir -p "${HYGON_SITE_DIR}"
25+
cat > "${HYGON_SITE_DIR}/sitecustomize.py" <<'PY'
26+
import importlib.abc
27+
import importlib.util
28+
import os
29+
import sys
30+
from pathlib import Path
31+
32+
33+
class _ImageVllmFLFinder(importlib.abc.MetaPathFinder):
34+
def __init__(self, root):
35+
self.package_dir = Path(root) / "vllm_fl"
36+
37+
def find_spec(self, fullname, path=None, target=None):
38+
if fullname != "vllm_fl":
39+
return None
40+
init_file = self.package_dir / "__init__.py"
41+
if not init_file.exists():
42+
return None
43+
return importlib.util.spec_from_file_location(
44+
fullname,
45+
init_file,
46+
submodule_search_locations=[str(self.package_dir)],
47+
)
48+
49+
50+
_root = os.environ.get("VLLM_FL_IMAGE_PLUGIN_ROOT")
51+
if _root:
52+
sys.meta_path.insert(0, _ImageVllmFLFinder(_root))
53+
PY
54+
55+
export VLLM_FL_IMAGE_PLUGIN_ROOT="${IMAGE_PLUGIN_ROOT}"
56+
export PYTHONPATH="${HYGON_SITE_DIR}${PYTHONPATH:+:${PYTHONPATH}}"
57+
58+
if [[ -n "${GITHUB_ENV:-}" ]]; then
59+
{
60+
echo "VLLM_FL_IMAGE_PLUGIN_ROOT=${VLLM_FL_IMAGE_PLUGIN_ROOT}"
61+
echo "PYTHONPATH=${PYTHONPATH}"
62+
} >> "${GITHUB_ENV}"
63+
fi
64+
1865
echo "DTK_HOME=${DTK_HOME}"
1966
echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}"
67+
echo "VLLM_FL_IMAGE_PLUGIN_ROOT=${VLLM_FL_IMAGE_PLUGIN_ROOT}"
68+
echo "PYTHONPATH=${PYTHONPATH}"
2069
test -e "${HIP_PATH}/lib/libgalaxyhip.so.5"
2170
test -e "${DTK_HOME}/llvm/lib/libomp.so"
2271

23-
python -m pip install --no-build-isolation --no-deps -e .
24-
2572
python - <<'PY'
73+
import os
74+
from pathlib import Path
75+
2676
import flag_gems
2777
import torch
2878
import vllm
2979
import vllm_fl
3080
81+
image_plugin_root = Path(os.environ["VLLM_FL_IMAGE_PLUGIN_ROOT"]).resolve()
82+
expected_package = image_plugin_root / "vllm_fl"
83+
plugin_file = Path(vllm_fl.__file__).resolve()
84+
if plugin_file != expected_package / "__init__.py" and expected_package not in plugin_file.parents:
85+
raise RuntimeError(
86+
f"Unexpected vllm_fl path: {plugin_file}; expected under {expected_package}"
87+
)
88+
3189
print(f"vLLM import ok: {vllm.__version__}")
3290
print(f"vLLM-FL import ok: {vllm_fl.__file__}")
3391
print(f"FlagGems import ok: {getattr(flag_gems, '__version__', 'unknown')}")

.github/workflows/_benchmark_test.yml

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -68,47 +68,17 @@ jobs:
6868
run: bash .github/scripts/${{ inputs.platform }}/setup.sh
6969

7070
- name: Run benchmark smoke tests
71-
id: benchmark_test
7271
run: |
7372
python tests/run.py \
7473
--platform ${{ inputs.platform }} \
7574
--scope benchmark
7675
77-
- name: Generate benchmark report
78-
if: always() && steps.benchmark_test.outcome == 'success'
79-
run: |
80-
python tests/benchmarks/format_serve_report.py \
81-
--input benchmark-results/serve_result.json \
82-
--output benchmark-results/benchmark_metrics.json
83-
84-
- name: Install jq
85-
if: always() && steps.benchmark_test.outcome == 'success'
86-
run: apt-get update && apt-get install -y jq
87-
88-
- name: Upload benchmark data to backend
89-
continue-on-error: true
90-
if: always() && steps.benchmark_test.outcome == 'success'
91-
uses: flagos-ai/FlagOps/actions/post-benchmark-report@main
92-
env:
93-
NO_PROXY: "flagcicd-inner.flagos.net"
94-
with:
95-
backend_url: 'http://flagcicd-inner.flagos.net:8000'
96-
user_id: '000000000000000000'
97-
report_path: benchmark-results/benchmark_metrics.json
98-
list_code: 'benchmark_${{ inputs.platform }}_vllm_serve_smoke'
99-
list_name: 'Benchmark-vLLM-Serve-Smoke-${{ inputs.platform }}'
100-
header_config: '[{"field":"metric","name":"Benchmark Metric","required":true,"sortable":true,"type":"string"},{"field":"values","name":"Per Step Details","required":false,"sortable":false,"type":"array"},{"field":"avg","name":"Avg","required":true,"sortable":true,"type":"number"},{"field":"p50","name":"P50","required":true,"sortable":true,"type":"number"},{"field":"p99","name":"P99","required":true,"sortable":true,"type":"number"}]'
101-
repository_name: '${{ github.repository }}'
102-
commit_id: ${{ github.event.pull_request.head.sha || github.sha }}
103-
workflow_id: ${{ github.run_id }}
104-
fail_on_error: 'false'
105-
10676
- name: Upload test results
10777
if: always()
10878
uses: actions/upload-artifact@v4
79+
continue-on-error: true
10980
with:
11081
name: benchmark-${{ inputs.platform }}
11182
path: |
11283
test-results-${{ inputs.platform }}.xml
11384
test-results-${{ inputs.platform }}.json
114-
benchmark-results/**

.github/workflows/_build_wheel.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ jobs:
6363
- name: Upload wheel
6464
if: inputs.upload-artifact
6565
uses: actions/upload-artifact@v4
66+
continue-on-error: true
6667
with:
6768
name: wheel
6869
path: dist/*.whl

.github/workflows/_functional_test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ jobs:
7676
- name: Upload test results
7777
if: always()
7878
uses: actions/upload-artifact@v4
79+
continue-on-error: true
7980
with:
8081
name: functional-${{ inputs.platform }}
8182
path: |

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ import torch
138138
from vllm.config.compilation import CompilationConfig
139139
140140
141-
if __name__ == '__main__':
141+
if __name__ == "__main__":
142142
prompts = [
143143
"Hello, my name is",
144144
]

docker/hygon/Dockerfile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ COPY .hygon-runtime/ /
4343
RUN python -m pip install --upgrade \
4444
${INDEX_URL:+--index-url ${INDEX_URL}} \
4545
${EXTRA_INDEX_URL:+--extra-index-url ${EXTRA_INDEX_URL}} \
46-
pip setuptools wheel setuptools-scm
46+
pip "setuptools<81" wheel setuptools-scm
4747

4848
# Replace the base image's vLLM with official vLLM built in empty mode.
4949
RUN python -m pip uninstall -y vllm || true \
@@ -95,7 +95,10 @@ RUN rm -rf /opt/vllm-src/FlagGems \
9595
&& git clone https://github.com/flagos-ai/FlagGems /opt/vllm-src/FlagGems \
9696
&& cd /opt/vllm-src/FlagGems \
9797
&& git checkout "${FLAGGEMS_VERSION}" \
98-
&& python -m pip install --no-build-isolation -e .
98+
&& python -m pip install \
99+
${INDEX_URL:+--index-url ${INDEX_URL}} \
100+
${EXTRA_INDEX_URL:+--extra-index-url ${EXTRA_INDEX_URL}} \
101+
--no-build-isolation -e .
99102

100103
# Install vllm-plugin-FL from the pinned source commit.
101104
RUN rm -rf /opt/vllm-src/vllm-plugin-FL \
@@ -104,7 +107,10 @@ RUN rm -rf /opt/vllm-src/vllm-plugin-FL \
104107
&& cd /opt/vllm-src/vllm-plugin-FL \
105108
&& git checkout "${VLLM_PLUGIN_FL_VERSION}" \
106109
&& CMAKE_ARGS="-DCMAKE_PREFIX_PATH=/opt/dtk;/opt/dtk/hip;/opt/dtk/hsa;/opt/hyhal;/usr/local/hyhal ${CMAKE_ARGS:-}" \
107-
VLLM_VENDOR=cuda python -m pip install --no-build-isolation -e .
110+
VLLM_VENDOR=cuda python -m pip install \
111+
${INDEX_URL:+--index-url ${INDEX_URL}} \
112+
${EXTRA_INDEX_URL:+--extra-index-url ${EXTRA_INDEX_URL}} \
113+
--no-build-isolation -e .
108114

109115
WORKDIR /workspace
110116

tests/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ Unit tests should be fast, isolated, and not require GPU or model weights. Use t
303303
import pytest
304304
import torch
305305
306+
306307
class TestMyOp:
307308
def test_basic(self, device):
308309
"""The `device` fixture returns cuda:0 or npu:0 automatically."""
@@ -322,6 +323,7 @@ import torch
322323

323324
pytestmark = pytest.mark.gpu
324325

326+
325327
def test_my_kernel(device):
326328
x = torch.randn(16, 256, device=device)
327329
result = my_kernel(x)

tests/e2e_tests/serving/test_bge_m3.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,14 @@
1717

1818
SENTENCES_1 = ["What is BGE M3?", "Defination of BM25"]
1919
SENTENCES_2 = [
20-
"BGE M3 is an embedding model supporting dense retrieval, "
21-
"lexical matching and multi-vector interaction.",
22-
"BM25 is a bag-of-words retrieval function that ranks a set "
23-
"of documents based on the query terms appearing in each document",
20+
(
21+
"BGE M3 is an embedding model supporting dense retrieval, "
22+
"lexical matching and multi-vector interaction."
23+
),
24+
(
25+
"BM25 is a bag-of-words retrieval function that ranks a set "
26+
"of documents based on the query terms appearing in each document"
27+
),
2428
]
2529

2630
SIMILARITY_REFERENCE = [[0.6265, 0.3477], [0.3499, 0.678]]
Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,43 @@
1-
# Qwen3.6-27B Hygon smoke configuration (TP=2, eager).
1+
# Copyright 2026 FlagOS Contributors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# Qwen3.6-27B smoke configuration (TP=2, eager).
216

317
llm:
418
model: "/workspace/Qwen3.6-27B"
519
tensor_parallel_size: 2
620
pipeline_parallel_size: 1
7-
max_model_len: 262144
8-
gpu_memory_utilization: 0.90
21+
max_model_len: 8192
22+
gpu_memory_utilization: 0.95
923
enforce_eager: true
10-
enable_log_requests: false
11-
enable_prefix_caching: false
1224
trust_remote_code: false
1325
disable_custom_all_reduce: true
1426

1527
generate:
1628
prompts:
17-
- "介绍一下北京"
29+
- "Introduce yourself,please"
1830
sampling:
1931
max_tokens: 100
2032
temperature: 0.0
2133

2234
serve:
2335
served_model_name: "qwen"
24-
startup_retries: 120
2536
endpoints: ["chat"]
2637
stream: false
2738
max_tokens: 256
2839
chat_messages:
2940
- role: "user"
30-
content: "介绍一下北京"
41+
content: "Introduce yourself,please"
3142
sampling:
32-
temperature: 0.7
43+
temperature: 0.0
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Copyright 2026 FlagOS Contributors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# Qwen3.6-27B Hygon smoke configuration (TP=2, eager).
16+
17+
llm:
18+
model: "/workspace/Qwen3.6-27B"
19+
tensor_parallel_size: 2
20+
pipeline_parallel_size: 1
21+
max_model_len: 262144
22+
gpu_memory_utilization: 0.90
23+
enforce_eager: true
24+
trust_remote_code: false
25+
disable_custom_all_reduce: true
26+
27+
generate:
28+
prompts:
29+
- "介绍一下北京"
30+
sampling:
31+
max_tokens: 100
32+
temperature: 0.0
33+
34+
serve:
35+
served_model_name: "qwen"
36+
extra_engine:
37+
enforce_eager: false
38+
disable_custom_all_reduce: false
39+
enable_log_requests: false
40+
enable_prefix_caching: false
41+
startup_retries: 120
42+
endpoints: ["chat"]
43+
stream: false
44+
max_tokens: 256
45+
chat_messages:
46+
- role: "user"
47+
content: "介绍一下北京"
48+
sampling:
49+
temperature: 0.7

0 commit comments

Comments
 (0)