diff --git a/.circleci/config.yml b/.circleci/config.yml index c3263b562e..7007cfedda 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -71,7 +71,7 @@ binary_common: &binary_common python_version: description: "Python version to build against (e.g., 3.8)" type: string - cuda_version: + cu_version: description: "CUDA version to build against (e.g., cpu, cu101)" type: string default: "cpu" @@ -87,7 +87,7 @@ binary_common: &binary_common PYTHON_VERSION: << parameters.python_version >> BUILD_VERSION: << parameters.build_version >> PYTORCH_VERSION: << parameters.pytorch_version >> - CU_VERSION: << parameters.cuda_version >> + CU_VERSION: << parameters.cu_version >> smoke_test_common: &smoke_test_common <<: *binary_common @@ -143,6 +143,7 @@ jobs: resource_class: 2xlarge+ steps: - checkout + - designate_upload_channel - attach_workspace: at: third_party - run: packaging/build_wheel.sh @@ -160,6 +161,7 @@ jobs: resource_class: 2xlarge+ steps: - checkout + - designate_upload_channel - load_conda_channel_flags - attach_workspace: at: third_party @@ -178,6 +180,7 @@ jobs: steps: - checkout - install_build_tools_macos + - designate_upload_channel - load_conda_channel_flags - attach_workspace: at: third_party @@ -204,6 +207,7 @@ jobs: steps: - checkout - install_build_tools_macos + - designate_upload_channel - load_conda_channel_flags - attach_workspace: at: third_party @@ -227,6 +231,7 @@ jobs: name: windows-cpu steps: - checkout + - designate_upload_channel - load_conda_channel_flags - run: name: build @@ -247,6 +252,7 @@ jobs: name: windows-cpu steps: - checkout + - designate_upload_channel - load_conda_channel_flags - run: name: build @@ -462,7 +468,7 @@ jobs: command: docker run -t --gpus all -e PYTHON_VERSION -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/setup_env.sh - run: name: Install torchaudio - command: docker run -t --gpus all -e UPLOAD_CHANNEL -e CONDA_CHANNEL_FLAGS -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/install.sh + command: docker run -t --gpus all -e UPLOAD_CHANNEL -e CONDA_CHANNEL_FLAGS -e CU_VERSION -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/install.sh - run: name: Run tests command: docker run -t --gpus all -v $PWD:$PWD -w $PWD -e "TORCHAUDIO_TEST_FORCE_CUDA=1" "${image_name}" .circleci/unittest/linux/scripts/run_test.sh @@ -499,7 +505,7 @@ jobs: name: windows-gpu environment: <<: *environment - CUDA_VERSION: "10.2" + CU_VERSION: "10.2" steps: - checkout - designate_upload_channel @@ -526,10 +532,10 @@ jobs: steps: - checkout - install_build_tools_macos + - designate_upload_channel - load_conda_channel_flags - attach_workspace: at: third_party - - designate_upload_channel - run: name: Setup command: .circleci/unittest/linux/scripts/setup_env.sh @@ -569,6 +575,7 @@ jobs: - attach_workspace: at: ~/workspace - checkout + - designate_upload_channel - load_conda_channel_flags - run: name: Install pytorch-audio @@ -631,61 +638,61 @@ workflows: - download_third_parties_nix: name: download_third_parties_nix - binary_linux_wheel: - cuda_version: cpu + cu_version: cpu name: binary_linux_wheel_py3.6_cpu python_version: '3.6' requires: - download_third_parties_nix - binary_linux_wheel: - cuda_version: cu102 + cu_version: cu102 name: binary_linux_wheel_py3.6_cu102 python_version: '3.6' requires: - download_third_parties_nix wheel_docker_image: pytorch/manylinux-cuda102 - binary_linux_wheel: - cuda_version: cu111 + cu_version: cu111 name: binary_linux_wheel_py3.6_cu111 python_version: '3.6' requires: - download_third_parties_nix wheel_docker_image: pytorch/manylinux-cuda111 - binary_linux_wheel: - cuda_version: rocm4.1 + cu_version: rocm4.1 name: binary_linux_wheel_py3.6_rocm4.1 python_version: '3.6' requires: - download_third_parties_nix wheel_docker_image: pytorch/manylinux-rocm:4.1 - binary_linux_wheel: - cuda_version: cpu + cu_version: cpu name: binary_linux_wheel_py3.7_cpu python_version: '3.7' requires: - download_third_parties_nix - binary_linux_wheel: - cuda_version: cu102 + cu_version: cu102 name: binary_linux_wheel_py3.7_cu102 python_version: '3.7' requires: - download_third_parties_nix wheel_docker_image: pytorch/manylinux-cuda102 - binary_linux_wheel: - cuda_version: cu111 + cu_version: cu111 name: binary_linux_wheel_py3.7_cu111 python_version: '3.7' requires: - download_third_parties_nix wheel_docker_image: pytorch/manylinux-cuda111 - binary_linux_wheel: - cuda_version: rocm4.1 + cu_version: rocm4.1 name: binary_linux_wheel_py3.7_rocm4.1 python_version: '3.7' requires: - download_third_parties_nix wheel_docker_image: pytorch/manylinux-rocm:4.1 - binary_linux_wheel: - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -697,303 +704,303 @@ workflows: requires: - download_third_parties_nix - binary_linux_wheel: - cuda_version: cu102 + cu_version: cu102 name: binary_linux_wheel_py3.8_cu102 python_version: '3.8' requires: - download_third_parties_nix wheel_docker_image: pytorch/manylinux-cuda102 - binary_linux_wheel: - cuda_version: cu111 + cu_version: cu111 name: binary_linux_wheel_py3.8_cu111 python_version: '3.8' requires: - download_third_parties_nix wheel_docker_image: pytorch/manylinux-cuda111 - binary_linux_wheel: - cuda_version: rocm4.1 + cu_version: rocm4.1 name: binary_linux_wheel_py3.8_rocm4.1 python_version: '3.8' requires: - download_third_parties_nix wheel_docker_image: pytorch/manylinux-rocm:4.1 - binary_linux_wheel: - cuda_version: cpu + cu_version: cpu name: binary_linux_wheel_py3.9_cpu python_version: '3.9' requires: - download_third_parties_nix - binary_linux_wheel: - cuda_version: cu102 + cu_version: cu102 name: binary_linux_wheel_py3.9_cu102 python_version: '3.9' requires: - download_third_parties_nix wheel_docker_image: pytorch/manylinux-cuda102 - binary_linux_wheel: - cuda_version: cu111 + cu_version: cu111 name: binary_linux_wheel_py3.9_cu111 python_version: '3.9' requires: - download_third_parties_nix wheel_docker_image: pytorch/manylinux-cuda111 - binary_linux_wheel: - cuda_version: rocm4.1 + cu_version: rocm4.1 name: binary_linux_wheel_py3.9_rocm4.1 python_version: '3.9' requires: - download_third_parties_nix wheel_docker_image: pytorch/manylinux-rocm:4.1 - binary_macos_wheel: - cuda_version: cpu + cu_version: cpu name: binary_macos_wheel_py3.6_cpu python_version: '3.6' requires: - download_third_parties_nix - binary_macos_wheel: - cuda_version: cpu + cu_version: cpu name: binary_macos_wheel_py3.7_cpu python_version: '3.7' requires: - download_third_parties_nix - binary_macos_wheel: - cuda_version: cpu + cu_version: cpu name: binary_macos_wheel_py3.8_cpu python_version: '3.8' requires: - download_third_parties_nix - binary_macos_wheel: - cuda_version: cpu + cu_version: cpu name: binary_macos_wheel_py3.9_cpu python_version: '3.9' requires: - download_third_parties_nix - binary_windows_wheel: - cuda_version: cpu + cu_version: cpu name: binary_windows_wheel_py3.6_cpu python_version: '3.6' - binary_windows_wheel: - cuda_version: cu102 + cu_version: cu102 name: binary_windows_wheel_py3.6_cu102 python_version: '3.6' wheel_docker_image: pytorch/manylinux-cuda102 - binary_windows_wheel: - cuda_version: cu111 + cu_version: cu111 name: binary_windows_wheel_py3.6_cu111 python_version: '3.6' wheel_docker_image: pytorch/manylinux-cuda111 - binary_windows_wheel: - cuda_version: cpu + cu_version: cpu name: binary_windows_wheel_py3.7_cpu python_version: '3.7' - binary_windows_wheel: - cuda_version: cu102 + cu_version: cu102 name: binary_windows_wheel_py3.7_cu102 python_version: '3.7' wheel_docker_image: pytorch/manylinux-cuda102 - binary_windows_wheel: - cuda_version: cu111 + cu_version: cu111 name: binary_windows_wheel_py3.7_cu111 python_version: '3.7' wheel_docker_image: pytorch/manylinux-cuda111 - binary_windows_wheel: - cuda_version: cpu + cu_version: cpu name: binary_windows_wheel_py3.8_cpu python_version: '3.8' - binary_windows_wheel: - cuda_version: cu102 + cu_version: cu102 name: binary_windows_wheel_py3.8_cu102 python_version: '3.8' wheel_docker_image: pytorch/manylinux-cuda102 - binary_windows_wheel: - cuda_version: cu111 + cu_version: cu111 name: binary_windows_wheel_py3.8_cu111 python_version: '3.8' wheel_docker_image: pytorch/manylinux-cuda111 - binary_windows_wheel: - cuda_version: cpu + cu_version: cpu name: binary_windows_wheel_py3.9_cpu python_version: '3.9' - binary_windows_wheel: - cuda_version: cu102 + cu_version: cu102 name: binary_windows_wheel_py3.9_cu102 python_version: '3.9' wheel_docker_image: pytorch/manylinux-cuda102 - binary_windows_wheel: - cuda_version: cu111 + cu_version: cu111 name: binary_windows_wheel_py3.9_cu111 python_version: '3.9' wheel_docker_image: pytorch/manylinux-cuda111 - binary_linux_conda: conda_docker_image: pytorch/conda-builder:cpu - cuda_version: cpu + cu_version: cpu name: binary_linux_conda_py3.6_cpu python_version: '3.6' requires: - download_third_parties_nix - binary_linux_conda: conda_docker_image: pytorch/conda-builder:cuda102 - cuda_version: cu102 + cu_version: cu102 name: binary_linux_conda_py3.6_cu102 python_version: '3.6' requires: - download_third_parties_nix - binary_linux_conda: conda_docker_image: pytorch/conda-builder:cuda111 - cuda_version: cu111 + cu_version: cu111 name: binary_linux_conda_py3.6_cu111 python_version: '3.6' requires: - download_third_parties_nix - binary_linux_conda: conda_docker_image: pytorch/conda-builder:cpu - cuda_version: cpu + cu_version: cpu name: binary_linux_conda_py3.7_cpu python_version: '3.7' requires: - download_third_parties_nix - binary_linux_conda: conda_docker_image: pytorch/conda-builder:cuda102 - cuda_version: cu102 + cu_version: cu102 name: binary_linux_conda_py3.7_cu102 python_version: '3.7' requires: - download_third_parties_nix - binary_linux_conda: conda_docker_image: pytorch/conda-builder:cuda111 - cuda_version: cu111 + cu_version: cu111 name: binary_linux_conda_py3.7_cu111 python_version: '3.7' requires: - download_third_parties_nix - binary_linux_conda: conda_docker_image: pytorch/conda-builder:cpu - cuda_version: cpu + cu_version: cpu name: binary_linux_conda_py3.8_cpu python_version: '3.8' requires: - download_third_parties_nix - binary_linux_conda: conda_docker_image: pytorch/conda-builder:cuda102 - cuda_version: cu102 + cu_version: cu102 name: binary_linux_conda_py3.8_cu102 python_version: '3.8' requires: - download_third_parties_nix - binary_linux_conda: conda_docker_image: pytorch/conda-builder:cuda111 - cuda_version: cu111 + cu_version: cu111 name: binary_linux_conda_py3.8_cu111 python_version: '3.8' requires: - download_third_parties_nix - binary_linux_conda: conda_docker_image: pytorch/conda-builder:cpu - cuda_version: cpu + cu_version: cpu name: binary_linux_conda_py3.9_cpu python_version: '3.9' requires: - download_third_parties_nix - binary_linux_conda: conda_docker_image: pytorch/conda-builder:cuda102 - cuda_version: cu102 + cu_version: cu102 name: binary_linux_conda_py3.9_cu102 python_version: '3.9' requires: - download_third_parties_nix - binary_linux_conda: conda_docker_image: pytorch/conda-builder:cuda111 - cuda_version: cu111 + cu_version: cu111 name: binary_linux_conda_py3.9_cu111 python_version: '3.9' requires: - download_third_parties_nix - binary_macos_conda: conda_docker_image: pytorch/conda-builder:cpu - cuda_version: cpu + cu_version: cpu name: binary_macos_conda_py3.6_cpu python_version: '3.6' requires: - download_third_parties_nix - binary_macos_conda: conda_docker_image: pytorch/conda-builder:cpu - cuda_version: cpu + cu_version: cpu name: binary_macos_conda_py3.7_cpu python_version: '3.7' requires: - download_third_parties_nix - binary_macos_conda: conda_docker_image: pytorch/conda-builder:cpu - cuda_version: cpu + cu_version: cpu name: binary_macos_conda_py3.8_cpu python_version: '3.8' requires: - download_third_parties_nix - binary_macos_conda: conda_docker_image: pytorch/conda-builder:cpu - cuda_version: cpu + cu_version: cpu name: binary_macos_conda_py3.9_cpu python_version: '3.9' requires: - download_third_parties_nix - binary_windows_conda: conda_docker_image: pytorch/conda-builder:cpu - cuda_version: cpu + cu_version: cpu name: binary_windows_conda_py3.6_cpu python_version: '3.6' - binary_windows_conda: conda_docker_image: pytorch/conda-builder:cuda102 - cuda_version: cu102 + cu_version: cu102 name: binary_windows_conda_py3.6_cu102 python_version: '3.6' - binary_windows_conda: conda_docker_image: pytorch/conda-builder:cuda111 - cuda_version: cu111 + cu_version: cu111 name: binary_windows_conda_py3.6_cu111 python_version: '3.6' - binary_windows_conda: conda_docker_image: pytorch/conda-builder:cpu - cuda_version: cpu + cu_version: cpu name: binary_windows_conda_py3.7_cpu python_version: '3.7' - binary_windows_conda: conda_docker_image: pytorch/conda-builder:cuda102 - cuda_version: cu102 + cu_version: cu102 name: binary_windows_conda_py3.7_cu102 python_version: '3.7' - binary_windows_conda: conda_docker_image: pytorch/conda-builder:cuda111 - cuda_version: cu111 + cu_version: cu111 name: binary_windows_conda_py3.7_cu111 python_version: '3.7' - binary_windows_conda: conda_docker_image: pytorch/conda-builder:cpu - cuda_version: cpu + cu_version: cpu name: binary_windows_conda_py3.8_cpu python_version: '3.8' - binary_windows_conda: conda_docker_image: pytorch/conda-builder:cuda102 - cuda_version: cu102 + cu_version: cu102 name: binary_windows_conda_py3.8_cu102 python_version: '3.8' - binary_windows_conda: conda_docker_image: pytorch/conda-builder:cuda111 - cuda_version: cu111 + cu_version: cu111 name: binary_windows_conda_py3.8_cu111 python_version: '3.8' - binary_windows_conda: conda_docker_image: pytorch/conda-builder:cpu - cuda_version: cpu + cu_version: cpu name: binary_windows_conda_py3.9_cpu python_version: '3.9' - binary_windows_conda: conda_docker_image: pytorch/conda-builder:cuda102 - cuda_version: cu102 + cu_version: cu102 name: binary_windows_conda_py3.9_cu102 python_version: '3.9' - binary_windows_conda: conda_docker_image: pytorch/conda-builder:cuda111 - cuda_version: cu111 + cu_version: cu111 name: binary_windows_conda_py3.9_cu111 python_version: '3.9' - build_docs: @@ -1029,109 +1036,109 @@ workflows: - download_third_parties_nix: name: download_third_parties_nix - unittest_linux_cpu: - cuda_version: cpu + cu_version: cpu name: unittest_linux_cpu_py3.6 python_version: '3.6' requires: - download_third_parties_nix - stylecheck: - cuda_version: cpu + cu_version: cpu name: stylecheck_py3.6 python_version: '3.6' - unittest_linux_cpu: - cuda_version: cpu + cu_version: cpu name: unittest_linux_cpu_py3.7 python_version: '3.7' requires: - download_third_parties_nix - unittest_linux_cpu: - cuda_version: cpu + cu_version: cpu name: unittest_linux_cpu_py3.8 python_version: '3.8' requires: - download_third_parties_nix - unittest_linux_cpu: - cuda_version: cpu + cu_version: cpu name: unittest_linux_cpu_py3.9 python_version: '3.9' requires: - download_third_parties_nix - unittest_linux_gpu: - cuda_version: cu102 + cu_version: cu102 name: unittest_linux_gpu_py3.6 python_version: '3.6' requires: - download_third_parties_nix - unittest_linux_gpu: - cuda_version: cu102 + cu_version: cu102 name: unittest_linux_gpu_py3.7 python_version: '3.7' requires: - download_third_parties_nix - unittest_linux_gpu: - cuda_version: cu102 + cu_version: cu102 name: unittest_linux_gpu_py3.8 python_version: '3.8' requires: - download_third_parties_nix - unittest_linux_gpu: - cuda_version: cu102 + cu_version: cu102 name: unittest_linux_gpu_py3.9 python_version: '3.9' requires: - download_third_parties_nix - unittest_windows_cpu: - cuda_version: cpu + cu_version: cpu name: unittest_windows_cpu_py3.6 python_version: '3.6' - unittest_windows_cpu: - cuda_version: cpu + cu_version: cpu name: unittest_windows_cpu_py3.7 python_version: '3.7' - unittest_windows_cpu: - cuda_version: cpu + cu_version: cpu name: unittest_windows_cpu_py3.8 python_version: '3.8' - unittest_windows_cpu: - cuda_version: cpu + cu_version: cpu name: unittest_windows_cpu_py3.9 python_version: '3.9' - unittest_windows_gpu: - cuda_version: cu102 + cu_version: cu102 name: unittest_windows_gpu_py3.6 python_version: '3.6' - unittest_windows_gpu: - cuda_version: cu102 + cu_version: cu102 name: unittest_windows_gpu_py3.7 python_version: '3.7' - unittest_windows_gpu: - cuda_version: cu102 + cu_version: cu102 name: unittest_windows_gpu_py3.8 python_version: '3.8' - unittest_windows_gpu: - cuda_version: cu102 + cu_version: cu102 name: unittest_windows_gpu_py3.9 python_version: '3.9' - unittest_macos_cpu: - cuda_version: cpu + cu_version: cpu name: unittest_macos_cpu_py3.6 python_version: '3.6' requires: - download_third_parties_nix - unittest_macos_cpu: - cuda_version: cpu + cu_version: cpu name: unittest_macos_cpu_py3.7 python_version: '3.7' requires: - download_third_parties_nix - unittest_macos_cpu: - cuda_version: cpu + cu_version: cpu name: unittest_macos_cpu_py3.8 python_version: '3.8' requires: - download_third_parties_nix - unittest_macos_cpu: - cuda_version: cpu + cu_version: cpu name: unittest_macos_cpu_py3.9 python_version: '3.9' requires: @@ -1151,7 +1158,7 @@ workflows: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: download_third_parties_nix - binary_linux_wheel: - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -1174,7 +1181,7 @@ workflows: requires: - nightly_binary_linux_wheel_py3.6_cpu - smoke_test_linux_pip: - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -1186,7 +1193,7 @@ workflows: requires: - nightly_binary_linux_wheel_py3.6_cpu_upload - binary_linux_wheel: - cuda_version: cu102 + cu_version: cu102 filters: branches: only: @@ -1210,7 +1217,7 @@ workflows: requires: - nightly_binary_linux_wheel_py3.6_cu102 - smoke_test_linux_pip: - cuda_version: cu102 + cu_version: cu102 filters: branches: only: @@ -1222,7 +1229,7 @@ workflows: requires: - nightly_binary_linux_wheel_py3.6_cu102_upload - binary_linux_wheel: - cuda_version: cu111 + cu_version: cu111 filters: branches: only: @@ -1246,7 +1253,7 @@ workflows: requires: - nightly_binary_linux_wheel_py3.6_cu111 - smoke_test_linux_pip: - cuda_version: cu111 + cu_version: cu111 filters: branches: only: @@ -1258,7 +1265,7 @@ workflows: requires: - nightly_binary_linux_wheel_py3.6_cu111_upload - binary_linux_wheel: - cuda_version: rocm4.1 + cu_version: rocm4.1 filters: branches: only: @@ -1282,7 +1289,7 @@ workflows: requires: - nightly_binary_linux_wheel_py3.6_rocm4.1 - smoke_test_linux_pip: - cuda_version: rocm4.1 + cu_version: rocm4.1 filters: branches: only: @@ -1294,7 +1301,7 @@ workflows: requires: - nightly_binary_linux_wheel_py3.6_rocm4.1_upload - binary_linux_wheel: - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -1317,7 +1324,7 @@ workflows: requires: - nightly_binary_linux_wheel_py3.7_cpu - smoke_test_linux_pip: - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -1329,7 +1336,7 @@ workflows: requires: - nightly_binary_linux_wheel_py3.7_cpu_upload - binary_linux_wheel: - cuda_version: cu102 + cu_version: cu102 filters: branches: only: @@ -1353,7 +1360,7 @@ workflows: requires: - nightly_binary_linux_wheel_py3.7_cu102 - smoke_test_linux_pip: - cuda_version: cu102 + cu_version: cu102 filters: branches: only: @@ -1365,7 +1372,7 @@ workflows: requires: - nightly_binary_linux_wheel_py3.7_cu102_upload - binary_linux_wheel: - cuda_version: cu111 + cu_version: cu111 filters: branches: only: @@ -1389,7 +1396,7 @@ workflows: requires: - nightly_binary_linux_wheel_py3.7_cu111 - smoke_test_linux_pip: - cuda_version: cu111 + cu_version: cu111 filters: branches: only: @@ -1401,7 +1408,7 @@ workflows: requires: - nightly_binary_linux_wheel_py3.7_cu111_upload - binary_linux_wheel: - cuda_version: rocm4.1 + cu_version: rocm4.1 filters: branches: only: @@ -1425,7 +1432,7 @@ workflows: requires: - nightly_binary_linux_wheel_py3.7_rocm4.1 - smoke_test_linux_pip: - cuda_version: rocm4.1 + cu_version: rocm4.1 filters: branches: only: @@ -1437,7 +1444,7 @@ workflows: requires: - nightly_binary_linux_wheel_py3.7_rocm4.1_upload - binary_linux_wheel: - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -1460,7 +1467,7 @@ workflows: requires: - nightly_binary_linux_wheel_py3.8_cpu - smoke_test_linux_pip: - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -1472,7 +1479,7 @@ workflows: requires: - nightly_binary_linux_wheel_py3.8_cpu_upload - binary_linux_wheel: - cuda_version: cu102 + cu_version: cu102 filters: branches: only: @@ -1496,7 +1503,7 @@ workflows: requires: - nightly_binary_linux_wheel_py3.8_cu102 - smoke_test_linux_pip: - cuda_version: cu102 + cu_version: cu102 filters: branches: only: @@ -1508,7 +1515,7 @@ workflows: requires: - nightly_binary_linux_wheel_py3.8_cu102_upload - binary_linux_wheel: - cuda_version: cu111 + cu_version: cu111 filters: branches: only: @@ -1532,7 +1539,7 @@ workflows: requires: - nightly_binary_linux_wheel_py3.8_cu111 - smoke_test_linux_pip: - cuda_version: cu111 + cu_version: cu111 filters: branches: only: @@ -1544,7 +1551,7 @@ workflows: requires: - nightly_binary_linux_wheel_py3.8_cu111_upload - binary_linux_wheel: - cuda_version: rocm4.1 + cu_version: rocm4.1 filters: branches: only: @@ -1568,7 +1575,7 @@ workflows: requires: - nightly_binary_linux_wheel_py3.8_rocm4.1 - smoke_test_linux_pip: - cuda_version: rocm4.1 + cu_version: rocm4.1 filters: branches: only: @@ -1580,7 +1587,7 @@ workflows: requires: - nightly_binary_linux_wheel_py3.8_rocm4.1_upload - binary_linux_wheel: - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -1603,7 +1610,7 @@ workflows: requires: - nightly_binary_linux_wheel_py3.9_cpu - smoke_test_linux_pip: - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -1615,7 +1622,7 @@ workflows: requires: - nightly_binary_linux_wheel_py3.9_cpu_upload - binary_linux_wheel: - cuda_version: cu102 + cu_version: cu102 filters: branches: only: @@ -1639,7 +1646,7 @@ workflows: requires: - nightly_binary_linux_wheel_py3.9_cu102 - smoke_test_linux_pip: - cuda_version: cu102 + cu_version: cu102 filters: branches: only: @@ -1651,7 +1658,7 @@ workflows: requires: - nightly_binary_linux_wheel_py3.9_cu102_upload - binary_linux_wheel: - cuda_version: cu111 + cu_version: cu111 filters: branches: only: @@ -1675,7 +1682,7 @@ workflows: requires: - nightly_binary_linux_wheel_py3.9_cu111 - smoke_test_linux_pip: - cuda_version: cu111 + cu_version: cu111 filters: branches: only: @@ -1687,7 +1694,7 @@ workflows: requires: - nightly_binary_linux_wheel_py3.9_cu111_upload - binary_linux_wheel: - cuda_version: rocm4.1 + cu_version: rocm4.1 filters: branches: only: @@ -1711,7 +1718,7 @@ workflows: requires: - nightly_binary_linux_wheel_py3.9_rocm4.1 - smoke_test_linux_pip: - cuda_version: rocm4.1 + cu_version: rocm4.1 filters: branches: only: @@ -1723,7 +1730,7 @@ workflows: requires: - nightly_binary_linux_wheel_py3.9_rocm4.1_upload - binary_macos_wheel: - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -1746,7 +1753,7 @@ workflows: requires: - nightly_binary_macos_wheel_py3.6_cpu - binary_macos_wheel: - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -1769,7 +1776,7 @@ workflows: requires: - nightly_binary_macos_wheel_py3.7_cpu - binary_macos_wheel: - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -1792,7 +1799,7 @@ workflows: requires: - nightly_binary_macos_wheel_py3.8_cpu - binary_macos_wheel: - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -1815,7 +1822,7 @@ workflows: requires: - nightly_binary_macos_wheel_py3.9_cpu - binary_windows_wheel: - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -1836,7 +1843,7 @@ workflows: requires: - nightly_binary_windows_wheel_py3.6_cpu - smoke_test_windows_pip: - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -1848,7 +1855,7 @@ workflows: requires: - nightly_binary_windows_wheel_py3.6_cpu_upload - binary_windows_wheel: - cuda_version: cu102 + cu_version: cu102 filters: branches: only: @@ -1870,7 +1877,7 @@ workflows: requires: - nightly_binary_windows_wheel_py3.6_cu102 - smoke_test_windows_pip: - cuda_version: cu102 + cu_version: cu102 filters: branches: only: @@ -1882,7 +1889,7 @@ workflows: requires: - nightly_binary_windows_wheel_py3.6_cu102_upload - binary_windows_wheel: - cuda_version: cu111 + cu_version: cu111 filters: branches: only: @@ -1904,7 +1911,7 @@ workflows: requires: - nightly_binary_windows_wheel_py3.6_cu111 - smoke_test_windows_pip: - cuda_version: cu111 + cu_version: cu111 filters: branches: only: @@ -1916,7 +1923,7 @@ workflows: requires: - nightly_binary_windows_wheel_py3.6_cu111_upload - binary_windows_wheel: - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -1937,7 +1944,7 @@ workflows: requires: - nightly_binary_windows_wheel_py3.7_cpu - smoke_test_windows_pip: - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -1949,7 +1956,7 @@ workflows: requires: - nightly_binary_windows_wheel_py3.7_cpu_upload - binary_windows_wheel: - cuda_version: cu102 + cu_version: cu102 filters: branches: only: @@ -1971,7 +1978,7 @@ workflows: requires: - nightly_binary_windows_wheel_py3.7_cu102 - smoke_test_windows_pip: - cuda_version: cu102 + cu_version: cu102 filters: branches: only: @@ -1983,7 +1990,7 @@ workflows: requires: - nightly_binary_windows_wheel_py3.7_cu102_upload - binary_windows_wheel: - cuda_version: cu111 + cu_version: cu111 filters: branches: only: @@ -2005,7 +2012,7 @@ workflows: requires: - nightly_binary_windows_wheel_py3.7_cu111 - smoke_test_windows_pip: - cuda_version: cu111 + cu_version: cu111 filters: branches: only: @@ -2017,7 +2024,7 @@ workflows: requires: - nightly_binary_windows_wheel_py3.7_cu111_upload - binary_windows_wheel: - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -2038,7 +2045,7 @@ workflows: requires: - nightly_binary_windows_wheel_py3.8_cpu - smoke_test_windows_pip: - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -2050,7 +2057,7 @@ workflows: requires: - nightly_binary_windows_wheel_py3.8_cpu_upload - binary_windows_wheel: - cuda_version: cu102 + cu_version: cu102 filters: branches: only: @@ -2072,7 +2079,7 @@ workflows: requires: - nightly_binary_windows_wheel_py3.8_cu102 - smoke_test_windows_pip: - cuda_version: cu102 + cu_version: cu102 filters: branches: only: @@ -2084,7 +2091,7 @@ workflows: requires: - nightly_binary_windows_wheel_py3.8_cu102_upload - binary_windows_wheel: - cuda_version: cu111 + cu_version: cu111 filters: branches: only: @@ -2106,7 +2113,7 @@ workflows: requires: - nightly_binary_windows_wheel_py3.8_cu111 - smoke_test_windows_pip: - cuda_version: cu111 + cu_version: cu111 filters: branches: only: @@ -2118,7 +2125,7 @@ workflows: requires: - nightly_binary_windows_wheel_py3.8_cu111_upload - binary_windows_wheel: - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -2139,7 +2146,7 @@ workflows: requires: - nightly_binary_windows_wheel_py3.9_cpu - smoke_test_windows_pip: - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -2151,7 +2158,7 @@ workflows: requires: - nightly_binary_windows_wheel_py3.9_cpu_upload - binary_windows_wheel: - cuda_version: cu102 + cu_version: cu102 filters: branches: only: @@ -2173,7 +2180,7 @@ workflows: requires: - nightly_binary_windows_wheel_py3.9_cu102 - smoke_test_windows_pip: - cuda_version: cu102 + cu_version: cu102 filters: branches: only: @@ -2185,7 +2192,7 @@ workflows: requires: - nightly_binary_windows_wheel_py3.9_cu102_upload - binary_windows_wheel: - cuda_version: cu111 + cu_version: cu111 filters: branches: only: @@ -2207,7 +2214,7 @@ workflows: requires: - nightly_binary_windows_wheel_py3.9_cu111 - smoke_test_windows_pip: - cuda_version: cu111 + cu_version: cu111 filters: branches: only: @@ -2220,7 +2227,7 @@ workflows: - nightly_binary_windows_wheel_py3.9_cu111_upload - binary_linux_conda: conda_docker_image: pytorch/conda-builder:cpu - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -2243,7 +2250,7 @@ workflows: requires: - nightly_binary_linux_conda_py3.6_cpu - smoke_test_linux_conda: - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -2256,7 +2263,7 @@ workflows: - nightly_binary_linux_conda_py3.6_cpu_upload - binary_linux_conda: conda_docker_image: pytorch/conda-builder:cuda102 - cuda_version: cu102 + cu_version: cu102 filters: branches: only: @@ -2279,7 +2286,7 @@ workflows: requires: - nightly_binary_linux_conda_py3.6_cu102 - smoke_test_linux_conda: - cuda_version: cu102 + cu_version: cu102 filters: branches: only: @@ -2292,7 +2299,7 @@ workflows: - nightly_binary_linux_conda_py3.6_cu102_upload - binary_linux_conda: conda_docker_image: pytorch/conda-builder:cuda111 - cuda_version: cu111 + cu_version: cu111 filters: branches: only: @@ -2315,7 +2322,7 @@ workflows: requires: - nightly_binary_linux_conda_py3.6_cu111 - smoke_test_linux_conda: - cuda_version: cu111 + cu_version: cu111 filters: branches: only: @@ -2328,7 +2335,7 @@ workflows: - nightly_binary_linux_conda_py3.6_cu111_upload - binary_linux_conda: conda_docker_image: pytorch/conda-builder:cpu - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -2351,7 +2358,7 @@ workflows: requires: - nightly_binary_linux_conda_py3.7_cpu - smoke_test_linux_conda: - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -2364,7 +2371,7 @@ workflows: - nightly_binary_linux_conda_py3.7_cpu_upload - binary_linux_conda: conda_docker_image: pytorch/conda-builder:cuda102 - cuda_version: cu102 + cu_version: cu102 filters: branches: only: @@ -2387,7 +2394,7 @@ workflows: requires: - nightly_binary_linux_conda_py3.7_cu102 - smoke_test_linux_conda: - cuda_version: cu102 + cu_version: cu102 filters: branches: only: @@ -2400,7 +2407,7 @@ workflows: - nightly_binary_linux_conda_py3.7_cu102_upload - binary_linux_conda: conda_docker_image: pytorch/conda-builder:cuda111 - cuda_version: cu111 + cu_version: cu111 filters: branches: only: @@ -2423,7 +2430,7 @@ workflows: requires: - nightly_binary_linux_conda_py3.7_cu111 - smoke_test_linux_conda: - cuda_version: cu111 + cu_version: cu111 filters: branches: only: @@ -2436,7 +2443,7 @@ workflows: - nightly_binary_linux_conda_py3.7_cu111_upload - binary_linux_conda: conda_docker_image: pytorch/conda-builder:cpu - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -2459,7 +2466,7 @@ workflows: requires: - nightly_binary_linux_conda_py3.8_cpu - smoke_test_linux_conda: - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -2472,7 +2479,7 @@ workflows: - nightly_binary_linux_conda_py3.8_cpu_upload - binary_linux_conda: conda_docker_image: pytorch/conda-builder:cuda102 - cuda_version: cu102 + cu_version: cu102 filters: branches: only: @@ -2495,7 +2502,7 @@ workflows: requires: - nightly_binary_linux_conda_py3.8_cu102 - smoke_test_linux_conda: - cuda_version: cu102 + cu_version: cu102 filters: branches: only: @@ -2508,7 +2515,7 @@ workflows: - nightly_binary_linux_conda_py3.8_cu102_upload - binary_linux_conda: conda_docker_image: pytorch/conda-builder:cuda111 - cuda_version: cu111 + cu_version: cu111 filters: branches: only: @@ -2531,7 +2538,7 @@ workflows: requires: - nightly_binary_linux_conda_py3.8_cu111 - smoke_test_linux_conda: - cuda_version: cu111 + cu_version: cu111 filters: branches: only: @@ -2544,7 +2551,7 @@ workflows: - nightly_binary_linux_conda_py3.8_cu111_upload - binary_linux_conda: conda_docker_image: pytorch/conda-builder:cpu - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -2567,7 +2574,7 @@ workflows: requires: - nightly_binary_linux_conda_py3.9_cpu - smoke_test_linux_conda: - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -2580,7 +2587,7 @@ workflows: - nightly_binary_linux_conda_py3.9_cpu_upload - binary_linux_conda: conda_docker_image: pytorch/conda-builder:cuda102 - cuda_version: cu102 + cu_version: cu102 filters: branches: only: @@ -2603,7 +2610,7 @@ workflows: requires: - nightly_binary_linux_conda_py3.9_cu102 - smoke_test_linux_conda: - cuda_version: cu102 + cu_version: cu102 filters: branches: only: @@ -2616,7 +2623,7 @@ workflows: - nightly_binary_linux_conda_py3.9_cu102_upload - binary_linux_conda: conda_docker_image: pytorch/conda-builder:cuda111 - cuda_version: cu111 + cu_version: cu111 filters: branches: only: @@ -2639,7 +2646,7 @@ workflows: requires: - nightly_binary_linux_conda_py3.9_cu111 - smoke_test_linux_conda: - cuda_version: cu111 + cu_version: cu111 filters: branches: only: @@ -2652,7 +2659,7 @@ workflows: - nightly_binary_linux_conda_py3.9_cu111_upload - binary_macos_conda: conda_docker_image: pytorch/conda-builder:cpu - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -2676,7 +2683,7 @@ workflows: - nightly_binary_macos_conda_py3.6_cpu - binary_macos_conda: conda_docker_image: pytorch/conda-builder:cpu - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -2700,7 +2707,7 @@ workflows: - nightly_binary_macos_conda_py3.7_cpu - binary_macos_conda: conda_docker_image: pytorch/conda-builder:cpu - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -2724,7 +2731,7 @@ workflows: - nightly_binary_macos_conda_py3.8_cpu - binary_macos_conda: conda_docker_image: pytorch/conda-builder:cpu - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -2748,7 +2755,7 @@ workflows: - nightly_binary_macos_conda_py3.9_cpu - binary_windows_conda: conda_docker_image: pytorch/conda-builder:cpu - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -2769,7 +2776,7 @@ workflows: requires: - nightly_binary_windows_conda_py3.6_cpu - smoke_test_windows_conda: - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -2782,7 +2789,7 @@ workflows: - nightly_binary_windows_conda_py3.6_cpu_upload - binary_windows_conda: conda_docker_image: pytorch/conda-builder:cuda102 - cuda_version: cu102 + cu_version: cu102 filters: branches: only: @@ -2803,7 +2810,7 @@ workflows: requires: - nightly_binary_windows_conda_py3.6_cu102 - smoke_test_windows_conda: - cuda_version: cu102 + cu_version: cu102 filters: branches: only: @@ -2816,7 +2823,7 @@ workflows: - nightly_binary_windows_conda_py3.6_cu102_upload - binary_windows_conda: conda_docker_image: pytorch/conda-builder:cuda111 - cuda_version: cu111 + cu_version: cu111 filters: branches: only: @@ -2837,7 +2844,7 @@ workflows: requires: - nightly_binary_windows_conda_py3.6_cu111 - smoke_test_windows_conda: - cuda_version: cu111 + cu_version: cu111 filters: branches: only: @@ -2850,7 +2857,7 @@ workflows: - nightly_binary_windows_conda_py3.6_cu111_upload - binary_windows_conda: conda_docker_image: pytorch/conda-builder:cpu - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -2871,7 +2878,7 @@ workflows: requires: - nightly_binary_windows_conda_py3.7_cpu - smoke_test_windows_conda: - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -2884,7 +2891,7 @@ workflows: - nightly_binary_windows_conda_py3.7_cpu_upload - binary_windows_conda: conda_docker_image: pytorch/conda-builder:cuda102 - cuda_version: cu102 + cu_version: cu102 filters: branches: only: @@ -2905,7 +2912,7 @@ workflows: requires: - nightly_binary_windows_conda_py3.7_cu102 - smoke_test_windows_conda: - cuda_version: cu102 + cu_version: cu102 filters: branches: only: @@ -2918,7 +2925,7 @@ workflows: - nightly_binary_windows_conda_py3.7_cu102_upload - binary_windows_conda: conda_docker_image: pytorch/conda-builder:cuda111 - cuda_version: cu111 + cu_version: cu111 filters: branches: only: @@ -2939,7 +2946,7 @@ workflows: requires: - nightly_binary_windows_conda_py3.7_cu111 - smoke_test_windows_conda: - cuda_version: cu111 + cu_version: cu111 filters: branches: only: @@ -2952,7 +2959,7 @@ workflows: - nightly_binary_windows_conda_py3.7_cu111_upload - binary_windows_conda: conda_docker_image: pytorch/conda-builder:cpu - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -2973,7 +2980,7 @@ workflows: requires: - nightly_binary_windows_conda_py3.8_cpu - smoke_test_windows_conda: - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -2986,7 +2993,7 @@ workflows: - nightly_binary_windows_conda_py3.8_cpu_upload - binary_windows_conda: conda_docker_image: pytorch/conda-builder:cuda102 - cuda_version: cu102 + cu_version: cu102 filters: branches: only: @@ -3007,7 +3014,7 @@ workflows: requires: - nightly_binary_windows_conda_py3.8_cu102 - smoke_test_windows_conda: - cuda_version: cu102 + cu_version: cu102 filters: branches: only: @@ -3020,7 +3027,7 @@ workflows: - nightly_binary_windows_conda_py3.8_cu102_upload - binary_windows_conda: conda_docker_image: pytorch/conda-builder:cuda111 - cuda_version: cu111 + cu_version: cu111 filters: branches: only: @@ -3041,7 +3048,7 @@ workflows: requires: - nightly_binary_windows_conda_py3.8_cu111 - smoke_test_windows_conda: - cuda_version: cu111 + cu_version: cu111 filters: branches: only: @@ -3054,7 +3061,7 @@ workflows: - nightly_binary_windows_conda_py3.8_cu111_upload - binary_windows_conda: conda_docker_image: pytorch/conda-builder:cpu - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -3075,7 +3082,7 @@ workflows: requires: - nightly_binary_windows_conda_py3.9_cpu - smoke_test_windows_conda: - cuda_version: cpu + cu_version: cpu filters: branches: only: @@ -3088,7 +3095,7 @@ workflows: - nightly_binary_windows_conda_py3.9_cpu_upload - binary_windows_conda: conda_docker_image: pytorch/conda-builder:cuda102 - cuda_version: cu102 + cu_version: cu102 filters: branches: only: @@ -3109,7 +3116,7 @@ workflows: requires: - nightly_binary_windows_conda_py3.9_cu102 - smoke_test_windows_conda: - cuda_version: cu102 + cu_version: cu102 filters: branches: only: @@ -3122,7 +3129,7 @@ workflows: - nightly_binary_windows_conda_py3.9_cu102_upload - binary_windows_conda: conda_docker_image: pytorch/conda-builder:cuda111 - cuda_version: cu111 + cu_version: cu111 filters: branches: only: @@ -3143,7 +3150,7 @@ workflows: requires: - nightly_binary_windows_conda_py3.9_cu111 - smoke_test_windows_conda: - cuda_version: cu111 + cu_version: cu111 filters: branches: only: diff --git a/.circleci/config.yml.in b/.circleci/config.yml.in index 8a5cef16b3..62b557b623 100644 --- a/.circleci/config.yml.in +++ b/.circleci/config.yml.in @@ -71,7 +71,7 @@ binary_common: &binary_common python_version: description: "Python version to build against (e.g., 3.8)" type: string - cuda_version: + cu_version: description: "CUDA version to build against (e.g., cpu, cu101)" type: string default: "cpu" @@ -87,7 +87,7 @@ binary_common: &binary_common PYTHON_VERSION: << parameters.python_version >> BUILD_VERSION: << parameters.build_version >> PYTORCH_VERSION: << parameters.pytorch_version >> - CU_VERSION: << parameters.cuda_version >> + CU_VERSION: << parameters.cu_version >> smoke_test_common: &smoke_test_common <<: *binary_common @@ -143,6 +143,7 @@ jobs: resource_class: 2xlarge+ steps: - checkout + - designate_upload_channel - attach_workspace: at: third_party - run: packaging/build_wheel.sh @@ -160,6 +161,7 @@ jobs: resource_class: 2xlarge+ steps: - checkout + - designate_upload_channel - load_conda_channel_flags - attach_workspace: at: third_party @@ -178,6 +180,7 @@ jobs: steps: - checkout - install_build_tools_macos + - designate_upload_channel - load_conda_channel_flags - attach_workspace: at: third_party @@ -204,6 +207,7 @@ jobs: steps: - checkout - install_build_tools_macos + - designate_upload_channel - load_conda_channel_flags - attach_workspace: at: third_party @@ -227,6 +231,7 @@ jobs: name: windows-cpu steps: - checkout + - designate_upload_channel - load_conda_channel_flags - run: name: build @@ -247,6 +252,7 @@ jobs: name: windows-cpu steps: - checkout + - designate_upload_channel - load_conda_channel_flags - run: name: build @@ -462,7 +468,7 @@ jobs: command: docker run -t --gpus all -e PYTHON_VERSION -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/setup_env.sh - run: name: Install torchaudio - command: docker run -t --gpus all -e UPLOAD_CHANNEL -e CONDA_CHANNEL_FLAGS -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/install.sh + command: docker run -t --gpus all -e UPLOAD_CHANNEL -e CONDA_CHANNEL_FLAGS -e CU_VERSION -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/install.sh - run: name: Run tests command: docker run -t --gpus all -v $PWD:$PWD -w $PWD -e "TORCHAUDIO_TEST_FORCE_CUDA=1" "${image_name}" .circleci/unittest/linux/scripts/run_test.sh @@ -499,7 +505,7 @@ jobs: name: windows-gpu environment: <<: *environment - CUDA_VERSION: "10.2" + CU_VERSION: "10.2" steps: - checkout - designate_upload_channel @@ -526,10 +532,10 @@ jobs: steps: - checkout - install_build_tools_macos + - designate_upload_channel - load_conda_channel_flags - attach_workspace: at: third_party - - designate_upload_channel - run: name: Setup command: .circleci/unittest/linux/scripts/setup_env.sh @@ -569,6 +575,7 @@ jobs: - attach_workspace: at: ~/workspace - checkout + - designate_upload_channel - load_conda_channel_flags - run: name: Install pytorch-audio diff --git a/.circleci/regenerate.py b/.circleci/regenerate.py index 7730b9bae9..9e3a8a2747 100755 --- a/.circleci/regenerate.py +++ b/.circleci/regenerate.py @@ -126,7 +126,7 @@ def generate_base_workflow(base_workflow_name, python_version, cu_version, filte d = { "name": base_workflow_name, "python_version": python_version, - "cuda_version": cu_version, + "cu_version": cu_version, } if os_type in ['linux', 'macos']: @@ -180,7 +180,7 @@ def generate_smoketest_workflow(pydistro, base_workflow_name, filter_branch, pyt "name": f"{base_workflow_name}_{smoke_suffix}", "requires": [required_build_name], "python_version": python_version, - "cuda_version": cu_version, + "cu_version": cu_version, } if filter_branch: @@ -205,7 +205,7 @@ def unittest_workflows(indentation=6): job = { "name": f"unittest_{os_type}_{device_type}_py{python_version}", "python_version": python_version, - "cuda_version": 'cpu' if device_type=="cpu" else "cu102", + "cu_version": 'cpu' if device_type=="cpu" else "cu102", } if os_type != "windows": @@ -218,7 +218,7 @@ def unittest_workflows(indentation=6): "stylecheck": { "name": f"stylecheck_py{python_version}", "python_version": python_version, - "cuda_version": 'cpu' if device_type=="cpu" else "cu102", + "cu_version": 'cpu' if device_type=="cpu" else "cu102", } }) return indent(indentation, jobs) diff --git a/.circleci/unittest/linux/docker/build_and_push.sh b/.circleci/unittest/linux/docker/build_and_push.sh index e7ced13ad3..425afb4c3e 100755 --- a/.circleci/unittest/linux/docker/build_and_push.sh +++ b/.circleci/unittest/linux/docker/build_and_push.sh @@ -3,7 +3,7 @@ set -euo pipefail if [ $# -ne 1 ]; then - printf "Usage %s \n\n" "$0" + printf "Usage %s \n\n" "$0" exit 1 fi diff --git a/.circleci/unittest/linux/scripts/install.sh b/.circleci/unittest/linux/scripts/install.sh index 50a02f11e3..6855f6b2c9 100755 --- a/.circleci/unittest/linux/scripts/install.sh +++ b/.circleci/unittest/linux/scripts/install.sh @@ -23,14 +23,14 @@ eval "$("${conda_dir}/bin/conda" shell.bash hook)" conda activate "${env_dir}" # 1. Install PyTorch -if [ -z "${CUDA_VERSION:-}" ] ; then +if [ -z "${CU_VERSION:-}" ] ; then if [ "${os}" == MacOSX ] ; then cudatoolkit='' else cudatoolkit="cpuonly" fi else - version="$(python -c "print('.'.join(\"${CUDA_VERSION}\".split('.')[:2]))")" + version="$(python -c "print('.'.join(\"${CU_VERSION}\".split('.')[:2]))")" cudatoolkit="cudatoolkit=${version}" fi printf "Installing PyTorch with %s\n" "${cudatoolkit}" diff --git a/.circleci/unittest/windows/scripts/install.sh b/.circleci/unittest/windows/scripts/install.sh index 770bbf31dd..2bc0c6c223 100644 --- a/.circleci/unittest/windows/scripts/install.sh +++ b/.circleci/unittest/windows/scripts/install.sh @@ -18,10 +18,10 @@ eval "$("${conda_dir}/Scripts/conda.exe" 'shell.bash' 'hook')" conda activate "${env_dir}" # 1. Install PyTorch -if [ -z "${CUDA_VERSION:-}" ] ; then +if [ -z "${CU_VERSION:-}" ] ; then cudatoolkit="cpuonly" else - version="$(python -c "print('.'.join(\"${CUDA_VERSION}\".split('.')[:2]))")" + version="$(python -c "print('.'.join(\"${CU_VERSION}\".split('.')[:2]))")" cudatoolkit="cudatoolkit=${version}" fi printf "Installing PyTorch with %s\n" "${cudatoolkit}" diff --git a/build_tools/setup_helpers/extension.py b/build_tools/setup_helpers/extension.py index 91002fa0e9..9b56762a59 100644 --- a/build_tools/setup_helpers/extension.py +++ b/build_tools/setup_helpers/extension.py @@ -38,7 +38,7 @@ def _get_build(var, default=False): _BUILD_KALDI = False if platform.system() == 'Windows' else _get_build("BUILD_KALDI", True) _BUILD_TRANSDUCER = _get_build("BUILD_TRANSDUCER") _USE_ROCM = _get_build("USE_ROCM") -_USE_CUDA = torch.cuda.is_available() +_USE_CUDA = _get_build("FORCE_CUDA") or torch.cuda.is_available() def get_ext_modules(): diff --git a/packaging/build_conda.sh b/packaging/build_conda.sh index c4a4a009b7..1f6eabb538 100755 --- a/packaging/build_conda.sh +++ b/packaging/build_conda.sh @@ -5,9 +5,12 @@ script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" . "$script_dir/pkg_helpers.bash" export BUILD_TYPE="conda" -export NO_CUDA_PACKAGE=1 +if [[ "${CU_VERSION}" = rocm* ]]; then + export NO_CUDA_PACKAGE=1 +fi setup_env 0.10.0 export SOURCE_ROOT_DIR="$PWD" setup_conda_pytorch_constraint +setup_conda_cudatoolkit_constraint setup_visual_studio_constraint conda build $CONDA_CHANNEL_FLAGS --no-anaconda-upload --python "$PYTHON_VERSION" packaging/torchaudio diff --git a/packaging/build_wheel.sh b/packaging/build_wheel.sh index 24f544d167..50ea3903e3 100755 --- a/packaging/build_wheel.sh +++ b/packaging/build_wheel.sh @@ -5,7 +5,9 @@ script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" . "$script_dir/pkg_helpers.bash" export BUILD_TYPE="wheel" -export NO_CUDA_PACKAGE=1 +if [[ "${CU_VERSION}" = rocm* ]]; then + export NO_CUDA_PACKAGE=1 +fi setup_env 0.10.0 setup_wheel_python pip_install numpy future cmake ninja diff --git a/packaging/pkg_helpers.bash b/packaging/pkg_helpers.bash index 1626938863..79e9336cf6 100644 --- a/packaging/pkg_helpers.bash +++ b/packaging/pkg_helpers.bash @@ -20,6 +20,7 @@ # Precondition: CUDA versions are installed in their conventional locations in # /usr/local/cuda-* # +# TODO: Once the CUDA code reaches beta, remove things around NO_CUDA_PACKAGE # NOTE: Why VERSION_SUFFIX versus PYTORCH_VERSION_SUFFIX? If you're building # a package with CUDA on a platform we support CUDA on, VERSION_SUFFIX == # PYTORCH_VERSION_SUFFIX and everyone is happy. However, if you are building a @@ -45,7 +46,7 @@ setup_cuda() { export VERSION_SUFFIX="$PYTORCH_VERSION_SUFFIX" # If the suffix is non-empty, we will use a wheel subdirectory if [[ -n "$PYTORCH_VERSION_SUFFIX" ]]; then - export WHEEL_DIR="$PYTORCH_VERSION_SUFFIX/" + export WHEEL_DIR="${CU_VERSION}/" fi fi fi @@ -108,7 +109,7 @@ setup_cuda() { export TORCH_CUDA_ARCH_LIST="3.5;5.0+PTX;6.0;7.0" ;; rocm*) - export FORCE_CUDA=1 + export FORCE_CUDA=0 export USE_ROCM=1 ;; cpu) @@ -177,14 +178,6 @@ setup_wheel_python() { conda activate "env$PYTHON_VERSION" else case "$PYTHON_VERSION" in - 2.7) - if [[ -n "$UNICODE_ABI" ]]; then - python_abi=cp27-cp27mu - else - python_abi=cp27-cp27m - fi - ;; - 3.5) python_abi=cp35-cp35m ;; 3.6) python_abi=cp36-cp36m ;; 3.7) python_abi=cp37-cp37m ;; 3.8) python_abi=cp38-cp38 ;; @@ -224,12 +217,11 @@ setup_pip_pytorch_version() { # # You MUST have populated PYTORCH_VERSION_SUFFIX before hand. setup_conda_pytorch_constraint() { - CONDA_CHANNEL_FLAGS="${CONDA_CHANNEL_FLAGS}" if [[ -z "$PYTORCH_VERSION" ]]; then export CONDA_CHANNEL_FLAGS="${CONDA_CHANNEL_FLAGS} -c pytorch-nightly" export PYTORCH_VERSION="$(conda search --json 'pytorch[channel=pytorch-nightly]' | python -c "import sys, json, re; print(re.sub(r'\\+.*$', '', json.load(sys.stdin)['pytorch'][-1]['version']))")" else - export CONDA_CHANNEL_FLAGS="${CONDA_CHANNEL_FLAGS} -c pytorch -c pytorch-test -c pytorch-nightly" + export CONDA_CHANNEL_FLAGS="${CONDA_CHANNEL_FLAGS} -c pytorch -c pytorch-${UPLOAD_CHANNEL}" fi # Some dependencies for Python 3.9 are only on conda-forge if [[ "${PYTHON_VERSION}" = "3.9" ]]; then @@ -239,6 +231,7 @@ setup_conda_pytorch_constraint() { export CONDA_PYTORCH_BUILD_CONSTRAINT="- pytorch==$PYTORCH_VERSION${PYTORCH_VERSION_SUFFIX}" export CONDA_PYTORCH_CONSTRAINT="- pytorch==$PYTORCH_VERSION" else + export CONDA_CHANNEL_FLAGS="${CONDA_CHANNEL_FLAGS} -c conda-forge" export CONDA_PYTORCH_BUILD_CONSTRAINT="- pytorch==${PYTORCH_VERSION}${PYTORCH_VERSION_SUFFIX}" export CONDA_PYTORCH_CONSTRAINT="- pytorch==${PYTORCH_VERSION}${PYTORCH_VERSION_SUFFIX}" fi @@ -251,7 +244,22 @@ setup_conda_cudatoolkit_constraint() { export CONDA_CUDATOOLKIT_CONSTRAINT="" else case "$CU_VERSION" in - cu100) + cu112) + export CONDA_CUDATOOLKIT_CONSTRAINT="- cudatoolkit >=11.2,<11.3 # [not osx]" + ;; + cu111) + export CONDA_CUDATOOLKIT_CONSTRAINT="- cudatoolkit >=11.1,<11.2 # [not osx]" + ;; + cu111) + export CONDA_CUDATOOLKIT_CONSTRAINT="- cudatoolkit >=11.0,<11.1 # [not osx]" + ;; + cu102) + export CONDA_CUDATOOLKIT_CONSTRAINT="- cudatoolkit >=10.2,<10.3 # [not osx]" + ;; + cu101) + export CONDA_CUDATOOLKIT_CONSTRAINT="- cudatoolkit >=10.1,<10.2 # [not osx]" + ;; + cu100) export CONDA_CUDATOOLKIT_CONSTRAINT="- cudatoolkit >=10.0,<10.1 # [not osx]" ;; cu92) diff --git a/packaging/torchaudio/build.sh b/packaging/torchaudio/build.sh index 88bbfce375..3004bb92aa 100644 --- a/packaging/torchaudio/build.sh +++ b/packaging/torchaudio/build.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash set -ex +env BUILD_TRANSDUCER=1 BUILD_SOX=1 python setup.py install --single-version-externally-managed --record=record.txt diff --git a/packaging/torchaudio/meta.yaml b/packaging/torchaudio/meta.yaml index 5f9e485eba..598f3451c9 100644 --- a/packaging/torchaudio/meta.yaml +++ b/packaging/torchaudio/meta.yaml @@ -13,19 +13,27 @@ requirements: host: - python - setuptools - - cpuonly - cmake - ninja - defaults::numpy >=1.11 + {{ environ.get('CONDA_CPUONLY_FEATURE') }} {{ environ.get('CONDA_PYTORCH_BUILD_CONSTRAINT') }} run: - python - defaults::numpy >=1.11 {{ environ.get('CONDA_PYTORCH_CONSTRAINT') }} + {{ environ.get('CONDA_CUDATOOLKIT_CONSTRAINT') }} build: string: py{{py}} + script_env: + - CUDA_HOME + - FORCE_CUDA + - BUILD_VERSION + - TORCH_CUDA_ARCH_LIST + features: + {{ environ.get('CONDA_CPUONLY_FEATURE') }} test: imports: @@ -43,7 +51,7 @@ test: # Ideally we would test this, but conda doesn't provide librosa # - librosa >=0.4.3 - scipy - - cpuonly + {{ environ.get('CONDA_CPUONLY_FEATURE') }} about: home: https://github.com/pytorch/audio