Skip to content

Using conda metapackage when installing cuda 11.6 and 11.7 #6371

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Aug 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .circleci/unittest/linux/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@ else
echo "Using CUDA $CUDA_VERSION as determined by CU_VERSION"
version="$(python -c "print('.'.join(\"${CUDA_VERSION}\".split('.')[:2]))")"

cuda_toolkit_pckg="cudatoolkit"
if [[ "$CU_VERSION" == cu116 ]]; then
cuda_toolkit_pckg="cuda"
cudatoolkit="nvidia::cudatoolkit=${version}"
if [[ "$version" == "11.6" || "$version" == "11.7" ]]; then
cudatoolkit=" pytorch-cuda=${version}"
fi
cudatoolkit="nvidia::${cuda_toolkit_pckg}=${version}"
fi

case "$(uname -s)" in
Expand Down
10 changes: 8 additions & 2 deletions packaging/pkg_helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,11 @@ setup_conda_cudatoolkit_constraint() {
export CONDA_BUILD_VARIANT="cpu"
else
case "$CU_VERSION" in
cu117)
export CONDA_CUDATOOLKIT_CONSTRAINT="- pytorch-cuda=11.7 # [not osx]"
;;
cu116)
export CONDA_CUDATOOLKIT_CONSTRAINT="- cuda >=11.6,<11.7 # [not osx]"
export CONDA_CUDATOOLKIT_CONSTRAINT="- pytorch-cuda=11.6 # [not osx]"
;;
cu113)
export CONDA_CUDATOOLKIT_CONSTRAINT="- cudatoolkit >=11.3,<11.4 # [not osx]"
Expand Down Expand Up @@ -290,8 +293,11 @@ setup_conda_cudatoolkit_plain_constraint() {
export CMAKE_USE_CUDA=0
else
case "$CU_VERSION" in
cu117)
export CONDA_CUDATOOLKIT_CONSTRAINT="pytorch-cuda=11.7"
;;
cu116)
export CONDA_CUDATOOLKIT_CONSTRAINT="cuda=11.6"
export CONDA_CUDATOOLKIT_CONSTRAINT="pytorch-cuda=11.6"
;;
cu113)
export CONDA_CUDATOOLKIT_CONSTRAINT="cudatoolkit=11.3"
Expand Down