Skip to content

Commit 0dbe7e1

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 0dbe7e1

3 files changed

Lines changed: 81 additions & 198 deletions

File tree

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

Lines changed: 33 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,33 @@ 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 update -p candle-core --git https://github.com/huggingface/candle --rev d4545ebbbfb37d3cf0e228642ffaaa75b5d6bce9
159+
cargo update -p candle-nn --git https://github.com/huggingface/candle --rev d4545ebbbfb37d3cf0e228642ffaaa75b5d6bce9
160+
134161
- name: Locate MSVC toolchain
135162
shell: pwsh
136163
run: |
@@ -183,3 +210,8 @@ jobs:
183210
uses: softprops/action-gh-release@v2
184211
with:
185212
files: deepseek-ocr-windows-${{ matrix.artifact_suffix }}.zip
213+
214+
- name: Restore manifest and lockfile
215+
if: matrix.cuda == '13.0.2'
216+
shell: pwsh
217+
run: git checkout -- Cargo.toml Cargo.lock

0 commit comments

Comments
 (0)