Skip to content

Commit a1e851f

Browse files
committed
dep(candle): Downgrade Candle to 0.9.2 for workspace; upgrade only in CUDA13 CI
- pin candle-core/candle-nn to the crates.io 0.9.x release so the macOS Metal backend runs on the stable, thread-tolerant implementation (0.9.2-alpha.1 breaks when the model is invoked off the creating thread, which hits our server). - keep the Windows CUDA 13 build on the git tip temporarily by updating those crates during that GH Actions job only, then reverting the lockfile so the repo stays on 0.9.1 locally. - mark cuda13 artifacts as “preview” to reflect the alpha Candle requirement.
1 parent 579efc3 commit a1e851f

3 files changed

Lines changed: 80 additions & 198 deletions

File tree

.github/workflows/build-extended-artifacts.yml

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ jobs:
106106
- cuda: '12.4.1'
107107
artifact_suffix: cuda12-4-1
108108
- cuda: '13.0.2'
109-
artifact_suffix: cuda13-0-2
109+
artifact_suffix: cuda13-0-2-preview
110110
steps:
111111
- name: Checkout repository
112112
uses: actions/checkout@v4
@@ -131,6 +131,32 @@ jobs:
131131
method: local
132132
log-file-suffix: windows-cuda.txt
133133

134+
- name: Switch Candle manifest to git tip
135+
if: matrix.cuda == '13.0.2'
136+
shell: pwsh
137+
run: |
138+
python - <<'PY'
139+
from pathlib import Path
140+
141+
path = Path('Cargo.toml')
142+
text = path.read_text()
143+
stable_core = 'candle-core = { version = "0.9", default-features = false }'
144+
stable_nn = 'candle-nn = { version = "0.9", default-features = false }'
145+
git_core = 'candle-core = { git = "https://github.com/huggingface/candle", rev = "d4545ebbbfb37d3cf0e228642ffaaa75b5d6bce9", default-features = false }'
146+
git_nn = 'candle-nn = { git = "https://github.com/huggingface/candle", rev = "d4545ebbbfb37d3cf0e228642ffaaa75b5d6bce9", default-features = false }'
147+
if stable_core not in text or stable_nn not in text:
148+
raise SystemExit('Expected stable candle deps not found in Cargo.toml')
149+
text = text.replace(stable_core, git_core, 1)
150+
text = text.replace(stable_nn, git_nn, 1)
151+
path.write_text(text)
152+
PY
153+
154+
- name: Upgrade Candle to git tip for CUDA 13
155+
if: matrix.cuda == '13.0.2'
156+
shell: pwsh
157+
run: |
158+
cargo fetch
159+
134160
- name: Locate MSVC toolchain
135161
shell: pwsh
136162
run: |
@@ -183,3 +209,8 @@ jobs:
183209
uses: softprops/action-gh-release@v2
184210
with:
185211
files: deepseek-ocr-windows-${{ matrix.artifact_suffix }}.zip
212+
213+
- name: Restore manifest and lockfile
214+
if: matrix.cuda == '13.0.2'
215+
shell: pwsh
216+
run: git checkout -- Cargo.toml Cargo.lock

0 commit comments

Comments
 (0)