diff --git a/.ci/manywheel/build_cuda.sh b/.ci/manywheel/build_cuda.sh index d258110c46301..c55a2ce566ef5 100644 --- a/.ci/manywheel/build_cuda.sh +++ b/.ci/manywheel/build_cuda.sh @@ -57,37 +57,37 @@ fi cuda_version_nodot=$(echo $CUDA_VERSION | tr -d '.') -TORCH_CUDA_ARCH_LIST="5.0;6.0;7.0;7.5;8.0;8.6" -case ${CUDA_VERSION} in - 12.6) - if [[ "$GPU_ARCH_TYPE" = "cuda-aarch64" ]]; then - TORCH_CUDA_ARCH_LIST="9.0" - else - TORCH_CUDA_ARCH_LIST="${TORCH_CUDA_ARCH_LIST};9.0+PTX" - fi - EXTRA_CAFFE2_CMAKE_FLAGS+=("-DATEN_NO_TEST=ON") - ;; - 12.4) - if [[ "$GPU_ARCH_TYPE" = "cuda-aarch64" ]]; then - TORCH_CUDA_ARCH_LIST="9.0" - else +if [ -z "$TORCH_CUDA_ARCH_LIST" ]; then + TORCH_CUDA_ARCH_LIST="5.0;6.0;7.0;7.5;8.0;8.6" + case ${CUDA_VERSION} in + 12.6) + if [[ "$GPU_ARCH_TYPE" = "cuda-aarch64" ]]; then + TORCH_CUDA_ARCH_LIST="9.0" + else + TORCH_CUDA_ARCH_LIST="${TORCH_CUDA_ARCH_LIST};9.0+PTX" + fi + ;; + 12.4) + if [[ "$GPU_ARCH_TYPE" = "cuda-aarch64" ]]; then + TORCH_CUDA_ARCH_LIST="9.0" + else + TORCH_CUDA_ARCH_LIST="${TORCH_CUDA_ARCH_LIST};9.0" + fi + ;; + 12.1) TORCH_CUDA_ARCH_LIST="${TORCH_CUDA_ARCH_LIST};9.0" - fi - EXTRA_CAFFE2_CMAKE_FLAGS+=("-DATEN_NO_TEST=ON") - ;; - 12.1) - TORCH_CUDA_ARCH_LIST="${TORCH_CUDA_ARCH_LIST};9.0" - EXTRA_CAFFE2_CMAKE_FLAGS+=("-DATEN_NO_TEST=ON") - ;; - 11.8) - TORCH_CUDA_ARCH_LIST="${TORCH_CUDA_ARCH_LIST};3.7;9.0" - EXTRA_CAFFE2_CMAKE_FLAGS+=("-DATEN_NO_TEST=ON") - ;; - *) - echo "unknown cuda version $CUDA_VERSION" - exit 1 - ;; -esac + ;; + 11.8) + TORCH_CUDA_ARCH_LIST="${TORCH_CUDA_ARCH_LIST};3.7;9.0" + ;; + *) + echo "unknown cuda version $CUDA_VERSION" + exit 1 + ;; + esac +fi + +EXTRA_CAFFE2_CMAKE_FLAGS+=("-DATEN_NO_TEST=ON") export TORCH_CUDA_ARCH_LIST=${TORCH_CUDA_ARCH_LIST} echo "${TORCH_CUDA_ARCH_LIST}" diff --git a/poolside-changes.md b/poolside-changes.md index 61ecd34f5f986..e282d6557900d 100644 --- a/poolside-changes.md +++ b/poolside-changes.md @@ -2,4 +2,5 @@ * [16th Dec 2024] Added READMEs describing this fork. [PR](https://github.com/poolsideai/pytorch/pull/1). * [17th Dec 2024] Modified Github Actions build CI forkflow. * Added poolside tag to version name [PR](https://github.com/poolsideai/pytorch/pull/2) + * Made cuda\_arch list configurable during CI build [PR](https://github.com/poolsideai/pytorch/pull/3)