Skip to content

Commit e16d394

Browse files
committed
feat(hygon): add BW1000 training support
1 parent 067efe6 commit e16d394

15 files changed

Lines changed: 2195 additions & 1421 deletions

File tree

.github/configs/hygon.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
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+
# Hygon BW1000 hardware configuration. Training cases are selected in
16+
# tests/test_utils/config/platforms/hygon.yaml.
17+
hardware_name: hygon
18+
display_name: "Hygon BW1000 Tests"
19+
20+
# The runner and registry share the same host, avoiding a 32 GB remote push.
21+
ci_image: harbor.baai.ac.cn/flagos-dev/flagscale:8b5c7f1-hygon-dev
22+
ci_train_image: harbor.baai.ac.cn/flagos-dev/flagscale:8b5c7f1-hygon-dev
23+
ci_inference_image: harbor.baai.ac.cn/flagos-dev/flagscale:8b5c7f1-hygon-dev
24+
25+
runner_labels: ["flagscale-hygon-bw1000-gpu8"]
26+
27+
# Image construction is consumed by build_image_common.yml. FlagCX must be
28+
# finalized on a BW1000 host because its native extension probes DTK devices.
29+
build:
30+
tasks:
31+
train:
32+
dockerfile: docker/hygon/Dockerfile.train
33+
image: harbor.baai.ac.cn/flagos-dev/flagscale:8b5c7f1-hygon-dev
34+
target: dev
35+
buildkit: false
36+
finalize_options: >-
37+
--device=/dev/kfd
38+
--device=/dev/dri
39+
--group-add video
40+
--ipc=host
41+
--volume /opt/hyhal:/opt/hyhal:ro
42+
--cap-add SYS_PTRACE
43+
--security-opt seccomp=unconfined
44+
finalize_command: /usr/local/bin/flagscale-hygon-finalize-flagcx
45+
verify_command: >-
46+
python -c 'import torch; import flag_gems; import transformer_engine;
47+
import flagcx; from flagcx import _C;
48+
assert torch.cuda.device_count() == 8;
49+
print("Hygon training stack: OK")'
50+
51+
container_volumes:
52+
- /opt/hyhal:/opt/hyhal:ro
53+
- /public-flash/lihongyang/data:/home/gitlab-runner/data:ro
54+
- /public-flash/lihongyang/qwentokenizer:/home/gitlab-runner/tokenizers/qwentokenizer:ro
55+
56+
# DTK exposes BW1000 devices through the KFD/DRI compatibility interfaces.
57+
# The BW1000 runner network intermittently resets GitHub HTTP/2 transfers, so
58+
# pass Git's documented environment config to force checkout onto HTTP/1.1.
59+
container_options: >-
60+
--device=/dev/kfd
61+
--device=/dev/dri
62+
--group-add video
63+
--ipc=host
64+
--env GIT_CONFIG_COUNT=1
65+
--env GIT_CONFIG_KEY_0=http.version
66+
--env GIT_CONFIG_VALUE_0=HTTP/1.1
67+
--shm-size=64g
68+
--user root
69+
--ulimit nofile=1048576:1048576
70+
--cap-add SYS_PTRACE
71+
--security-opt seccomp=unconfined
72+
73+
pkg_mgr: "pip"
74+
env_path: "/usr/local"
75+
env_names:
76+
train: ""
77+
hetero_train: ""
78+
inference: ""
79+
rl: ""

0 commit comments

Comments
 (0)