Skip to content

Commit bed02de

Browse files
fangqclaude
andcommitted
[ci] CUDA fallback test: fetch fixed-shape ONNX + --no-arena, target 222 s baseline
User verified the c006293 green run with default 256x256x192 patch on the FIXED-shape ONNX upload. Verified locally that https://neurojson.org/siamize/weights/siam_v03/fold_0_fp16.onnx.7z serves a fixed-shape (input dims [1, 1, 256, 256, 192]) build, byte-identical to the local models/fold_0_fp16.onnx that produced the 222 s baseline. Changes: - Fetch step: replace the dynamic-shape .gz URL with the fixed-shape .7z URL. Install p7zip-full on cache miss (action runners don't ship 7z by default). - Run step: drop --lowmem (and the 600 s / 27 tiles it brought with it). Default 256x256x192 patch + --no-arena restores the 8 tiles of the historical green run; the fixed-shape ONNX's smaller memory profile keeps peak RSS under the GHA cgroup limit. This is a CI-only divergence: weights.cpp's default_weights_url() still points at the dynamic-shape upload so users who want --lowmem's patch shrink get a working network. The CI's fixed-shape choice is documented in the workflow's fetch-step comment with the rationale. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 44b076d commit bed02de

1 file changed

Lines changed: 27 additions & 22 deletions

File tree

.github/workflows/ci.yml

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,30 @@ jobs:
115115
ORT_BUILD: gpu
116116
run: scripts/fetch_deps.sh
117117

118-
- name: Fetch fold_0 weight
118+
- name: Fetch fold_0 weight (fixed-shape, CI-only)
119+
# CI deliberately uses a FIXED-shape (256,256,192) ONNX export
120+
# rather than the dynamic-shape build that weights.cpp's
121+
# default_weights_url() serves. The dynamic-shape build had
122+
# measurable but small perf overhead on huo (~1.23x slower) yet
123+
# on the GHA 16 GB runner specifically the transient memory
124+
# peaks pushed past the cgroup limit even with --no-arena;
125+
# SIGTERM mid-inference. The fixed-shape build matches what
126+
# CI was using at the last green 8-tile / 222 s run (commit
127+
# c006293) and stays well under the runner's memory ceiling.
128+
# If you need to test --lowmem / dynamic-patch behavior, do
129+
# it from a local checkout or update this URL to the
130+
# dynamic-shape upload.
119131
run: |
120-
URL='https://neurojson.org/io/stat.cgi?action=get&db=siam_v03&doc=dynshape&size=95360591&file=fold_0_fp16.onnx.gz'
132+
URL='https://neurojson.org/siamize/weights/siam_v03/fold_0_fp16.onnx.7z'
121133
mkdir -p models
122-
curl -fsSL "$URL" -o models/fold_0_fp16.onnx.gz
123-
gunzip -f models/fold_0_fp16.onnx.gz
134+
if ! command -v 7z >/dev/null; then
135+
sudo apt-get update -qq
136+
sudo apt-get install -y --no-install-recommends p7zip-full
137+
fi
138+
curl -fsSL "$URL" -o models/fold_0_fp16.onnx.7z
139+
7z e -y -omodels models/fold_0_fp16.onnx.7z >/dev/null
140+
rm -f models/fold_0_fp16.onnx.7z
141+
ls -la models/
124142
125143
- name: Configure (CUDA EP)
126144
run: |
@@ -134,27 +152,14 @@ jobs:
134152

135153
- name: Run single-fold inference (expect CPU fallback on GPU-less runner)
136154
# GitHub runners have no NVIDIA GPU, so siamize falls back to
137-
# CPU. Memory and shape constraints stack up here:
138-
#
139-
# - Runner cgroup: ~14 GB available to user processes.
140-
# - Default 256x256x192 patch with arena off peaks ~13 GB
141-
# (newer ORT + dynamic-shape ONNX). SIGTERM at tile 2.
142-
# - Intermediate patches like 224x224x192 are divisible by
143-
# 32 but break the network's skip-connection topology
144-
# deep in the encoder (224 = 7*32 halves to 7->3->1
145-
# whereas 256 = 8*32 halves to 8->4->2; the decoder
146-
# upsamples don't match the 7*32 path, producing a
147-
# "broadcast 3 by 4" Add-node failure).
148-
#
149-
# Net: the only shapes that satisfy BOTH divisibility AND
150-
# the network's clean-halving requirement are 256 and 192
151-
# in each axis. 256x256x192 OOMs; 192x192x128 (--lowmem)
152-
# fits at ~6 GB peak. So we accept the 27-tile / ~600 s
153-
# wall as the price of an end-to-end CI test.
155+
# CPU. With the fixed-shape ONNX fetched above, default
156+
# 256x256x192 + --no-arena fits comfortably on the runner
157+
# (the c006293 historical baseline was 222 s on this exact
158+
# shape). 8 tiles, ~10 GB peak RSS, end-to-end completes.
154159
timeout-minutes: 30
155160
run: |
156161
${{ matrix.binary }} \
157-
--lowmem \
162+
--no-arena \
158163
-i tests/sub-01_T1w.nii.gz \
159164
-o pred_ci.nii.gz \
160165
-M models/fold_0_fp16.onnx \

0 commit comments

Comments
 (0)