Skip to content

Commit 7b56882

Browse files
NicolasHugfacebook-github-bot
authored andcommitted
[fbsync] Using conda metapackage when installing cuda 11.6 and 11.7 (#6371)
Summary: * Testing conda metapackage * Testing * Testing pytorch-cuda * Testing * Testing * Testing * Testing * Testing * Using new metapackage * Testing * Simplifing logic * Further simplifying Reviewed By: datumbox Differential Revision: D38824234 fbshipit-source-id: 873f73ed4da7f00723747a5d03800d76ae7dfbda
1 parent 83d5853 commit 7b56882

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

.circleci/unittest/linux/scripts/install.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,10 @@ else
2222
echo "Using CUDA $CUDA_VERSION as determined by CU_VERSION"
2323
version="$(python -c "print('.'.join(\"${CUDA_VERSION}\".split('.')[:2]))")"
2424

25-
cuda_toolkit_pckg="cudatoolkit"
26-
if [[ "$CU_VERSION" == cu116 ]]; then
27-
cuda_toolkit_pckg="cuda"
25+
cudatoolkit="nvidia::cudatoolkit=${version}"
26+
if [[ "$version" == "11.6" || "$version" == "11.7" ]]; then
27+
cudatoolkit=" pytorch-cuda=${version}"
2828
fi
29-
cudatoolkit="nvidia::${cuda_toolkit_pckg}=${version}"
3029
fi
3130

3231
case "$(uname -s)" in

packaging/pkg_helpers.bash

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,11 @@ setup_conda_cudatoolkit_constraint() {
261261
export CONDA_BUILD_VARIANT="cpu"
262262
else
263263
case "$CU_VERSION" in
264+
cu117)
265+
export CONDA_CUDATOOLKIT_CONSTRAINT="- pytorch-cuda=11.7 # [not osx]"
266+
;;
264267
cu116)
265-
export CONDA_CUDATOOLKIT_CONSTRAINT="- cuda >=11.6,<11.7 # [not osx]"
268+
export CONDA_CUDATOOLKIT_CONSTRAINT="- pytorch-cuda=11.6 # [not osx]"
266269
;;
267270
cu113)
268271
export CONDA_CUDATOOLKIT_CONSTRAINT="- cudatoolkit >=11.3,<11.4 # [not osx]"
@@ -290,8 +293,11 @@ setup_conda_cudatoolkit_plain_constraint() {
290293
export CMAKE_USE_CUDA=0
291294
else
292295
case "$CU_VERSION" in
296+
cu117)
297+
export CONDA_CUDATOOLKIT_CONSTRAINT="pytorch-cuda=11.7"
298+
;;
293299
cu116)
294-
export CONDA_CUDATOOLKIT_CONSTRAINT="cuda=11.6"
300+
export CONDA_CUDATOOLKIT_CONSTRAINT="pytorch-cuda=11.6"
295301
;;
296302
cu113)
297303
export CONDA_CUDATOOLKIT_CONSTRAINT="cudatoolkit=11.3"

0 commit comments

Comments
 (0)