Skip to content

Commit 69c3c2e

Browse files
committed
Try bring up iluvatar backend test
1 parent 239a4f5 commit 69c3c2e

File tree

7 files changed

+45
-20
lines changed

7 files changed

+45
-20
lines changed

.github/workflows/backend-test.yaml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,9 @@ on:
2626
required: false
2727
type: string
2828
default: ''
29-
30-
# NOTE: The following environment variables are for CI runners to
31-
# mitigate the network connection problems. However, this may not work
32-
# if the PR is triggered from a forked repository because in that case
33-
# GitHub doesn't allow the workflow to access any secrets.
34-
# env:
35-
# http_proxy: ${{ secrets.HTTP_PROXY }}
36-
# https_proxy: ${{ secrets.HTTPS_PROXY }}
29+
secrets:
30+
RUNNER_SSH_KEY:
31+
required: true
3732

3833
permissions:
3934
contents: read

.github/workflows/unittest.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ jobs:
113113
runner_label: h20
114114
gpu_check_script: tools/gpu_check.sh
115115
test_script: tools/run_backend_tests_nvidia.sh
116+
secrets:
117+
RUNNER_SSH_KEY: ${{ secrets.RUNNER_SSH_KEY }}
116118

117119
backend-ascend:
118120
needs: preprocess
@@ -123,16 +125,20 @@ jobs:
123125
runner_label: ascend_CI
124126
gpu_check_script: tools/gpu_check_ascend.sh
125127
test_script: tools/run_backend_tests.sh
128+
secrets:
129+
RUNNER_SSH_KEY: ${{ secrets.RUNNER_SSH_KEY }}
126130

127131
backend-iluvatar:
128132
needs: preprocess
129133
if: contains(needs.preprocess.outputs.labels, 'vendor/Iluvatar')
130134
uses: ./.github/workflows/backend-test.yaml
131135
with:
132136
vendor: iluvatar
133-
runner_label: iluvatar_CI
137+
runner_label: iluvatar
134138
gpu_check_script: tools/gpu_check_iluvatar.sh
135139
test_script: tools/run_backend_tests.sh
140+
secrets:
141+
RUNNER_SSH_KEY: ${{ secrets.RUNNER_SSH_KEY }}
136142

137143
backend-metax:
138144
needs: preprocess
@@ -142,6 +148,8 @@ jobs:
142148
vendor: metax
143149
runner_label: metax_CI
144150
test_script: tools/run_backend_tests_metax.sh
151+
secrets:
152+
RUNNER_SSH_KEY: ${{ secrets.RUNNER_SSH_KEY }}
145153

146154
backend-moore:
147155
needs: preprocess
@@ -152,6 +160,8 @@ jobs:
152160
runner_label: moore_CI
153161
gpu_check_script: tools/gpu_check_moore.sh
154162
test_script: tools/run_backend_tests.sh
163+
secrets:
164+
RUNNER_SSH_KEY: ${{ secrets.RUNNER_SSH_KEY }}
155165

156166
# TODO(Qiming): This job doesn't require an nvidia backend, the generic
157167
# test-op workflow should be fine.
@@ -165,3 +175,5 @@ jobs:
165175
gpu_check_script: tools/gpu_check.sh
166176
test_script: tools/test-op-experimental.sh
167177
changed_files: ${{ needs.preprocess.outputs.changed_files }}
178+
secrets:
179+
RUNNER_SSH_KEY: ${{ secrets.RUNNER_SSH_KEY }}

pyproject.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,18 @@ official_torch_270 = [
6262
"torchaudio==2.7.0",
6363
]
6464

65+
cuda_runtime = [
66+
"nvidia-cublas-cu12",
67+
"nvidia-cuda-runtime-cu12",
68+
"nvidia-cuda-nvrtc-cu12",
69+
]
70+
6571
nvidia = [
6672
"flag_gems[official_torch_290]",
6773
]
6874

6975
iluvatar = [
76+
"flag_gems[cuda_runtime]",
7077
"torch==2.7.1+corex.4.4.0",
7178
"torchaudio==2.7.1+corex.4.4.0",
7279
"torchvision==0.22.1+corex.4.4.0",

src/flag_gems/runtime/backend/_iluvatar/op_black_list.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@
22
# Description: List of operators unsupported (FALSE) in the current environment
33
# test based: 2026-03-11
44
# Source: Operator Compatibility Test Table
5-
5+
#
66
unsupported_operators:
77
- name: grouped_topk
8-
reason: "All dtypes failed"
8+
reason: All dtypes failed
99

1010
- name: topk_softmax
11-
reason: "vllm not supported"
11+
reason: vllm not supported
1212

1313
summary:
1414
total_unsupported: 2
15-
note: "This list is based on items explicitly marked as FALSE in the provided table. Certain operators (e.g., conv1d, index_add) have blank entries in some columns and are therefore excluded; their support status requires further verification."
15+
note: |
16+
This list is based on items explicitly marked as FALSE in the provided table.
17+
Certain operators (e.g., `conv1d`, `index_add`) have blank entries in some columns and
18+
are therefore excluded; their support status requires further verification.

src/flag_gems/runtime/backend/_iluvatar/ops/div.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
from flag_gems.utils import pointwise_dynamic, tl_extra_shim
88

9+
# TODO: Check if this logger instantiation is good
910
logger = logging.getLogger(__name__)
1011
div_rn = tl_extra_shim.div_rn
1112
div_rz = tl_extra_shim.div_rz

tools/gpu_check_iluvatar.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
memory_usage_max=30000 # Maximum memory usage limit (MB)
55
sleep_time=120 # Wait time (seconds), default is 2 minutes
66

7+
export LD_LIBRARY_PATH=/usr/local/corex/lib:$LD_LIBRARY_PATH
8+
79
# Get the number of GPUs
810
gpu_count=$(ixsmi --query-gpu=name --format=csv,noheader 2>/dev/null | wc -l)
911

tools/run_backend_tests_iluvatar.sh

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,17 @@
33
VENDOR=${1:?"Usage: bash tools/run_backend_tests_iluvatar.sh <vendor>"}
44
export GEMS_VENDOR=$VENDOR
55

6-
source tools/run_command.sh
7-
86
echo "Running FlagGems tests with GEMS_VENDOR=$VENDOR"
97

10-
run_command python3 -m pytest -s tests/test_tensor_constructor_ops.py
11-
run_command python3 -m pytest -s tests/test_shape_utils.py
12-
run_command python3 -m pytest -s tests/test_tensor_wrapper.py
13-
run_command python3 -m pytest -s tests/test_pointwise_dynamic.py
14-
run_command python3 -m pytest -s tests/test_distribution_ops.py
8+
export PYENV_ROOT="$HOME/.pyenv"
9+
export PATH="$PYENV_ROOT/bin:$PATH"
10+
eval "$(pyenv init - bash)"
11+
12+
pip install -U pip
13+
pip install uv
14+
uv venv
15+
source .venv/bin/activate
16+
uv pip install setuptools==82.0.1 scikit-build-core==0.12.2 pybind11==3.0.3 cmake==3.31.10 ninja==1.13.0
17+
uv pip install -e .[iluvatar,test]
18+
19+
pytest -s tests

0 commit comments

Comments
 (0)