Skip to content

Commit

Permalink
.circleci: Add python 3.9 builds for macOS (pytorch#47689)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: pytorch#47689

Signed-off-by: Eli Uriegas <eliuriegas@fb.com>

Test Plan: Imported from OSS

Reviewed By: janeyx99

Differential Revision: D25029226

Pulled By: seemethere

fbshipit-source-id: 1db2b021d3adf243453f4405219d5ce03d03a9c1
  • Loading branch information
seemethere authored and facebook-github-bot committed Nov 17, 2020
1 parent 04545f4 commit 05dc982
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 13 deletions.
18 changes: 7 additions & 11 deletions .circleci/cimodel/data/binary_build_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ def get_processor_arch_name(gpu_version):
"cu" + gpu_version.strip("cuda") if gpu_version.startswith("cuda") else gpu_version
)

PYTHON_NO_39 = [
v for v in dimensions.STANDARD_PYTHON_VERSIONS if v not in ['3.9']
]

LINUX_PACKAGE_VARIANTS = OrderedDict(
manywheel=[
Expand All @@ -44,18 +47,11 @@ def get_processor_arch_name(gpu_version):
],
)

# TODO: There's an issue with current Python 3.9 builds that only occurs during
# windows builds, let's just not build 3.9 for windows and figure out how
# to resolve afterwards
PYTHON_VERSIONS_NO_39 = [
v for v in dimensions.STANDARD_PYTHON_VERSIONS if v not in ['3.9']
]

CONFIG_TREE_DATA = OrderedDict(
linux=(dimensions.GPU_VERSIONS, LINUX_PACKAGE_VARIANTS),
macos=([None], OrderedDict(
wheel=PYTHON_VERSIONS_NO_39,
conda=PYTHON_VERSIONS_NO_39,
wheel=dimensions.STANDARD_PYTHON_VERSIONS,
conda=dimensions.STANDARD_PYTHON_VERSIONS,
libtorch=[
"3.7",
],
Expand All @@ -64,8 +60,8 @@ def get_processor_arch_name(gpu_version):
windows=(
[v for v in dimensions.GPU_VERSIONS if v not in ['cuda92'] + dimensions.ROCM_VERSION_LABELS],
OrderedDict(
wheel=PYTHON_VERSIONS_NO_39,
conda=PYTHON_VERSIONS_NO_39,
wheel=PYTHON_NO_39,
conda=PYTHON_NO_39,
libtorch=[
"3.7",
],
Expand Down
66 changes: 66 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2990,6 +2990,16 @@ workflows:
tags:
only:
- /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
- binary_mac_build:
name: binary_macos_wheel_3_9_cpu_nightly_build
build_environment: "wheel 3.9 cpu"
filters:
branches:
only:
- /.*/
tags:
only:
- /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
- binary_mac_build:
name: binary_macos_conda_3_6_cpu_nightly_build
build_environment: "conda 3.6 cpu"
Expand Down Expand Up @@ -3020,6 +3030,16 @@ workflows:
tags:
only:
- /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
- binary_mac_build:
name: binary_macos_conda_3_9_cpu_nightly_build
build_environment: "conda 3.9 cpu"
filters:
branches:
only:
- /.*/
tags:
only:
- /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
- binary_mac_build:
name: binary_macos_libtorch_3_7_cpu_nightly_build
build_environment: "libtorch 3.7 cpu"
Expand Down Expand Up @@ -6360,6 +6380,20 @@ workflows:
- /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
package_type: wheel
upload_subfolder: cpu
- binary_upload:
name: binary_macos_wheel_3_9_cpu_nightly_upload
context: org-member
requires:
- binary_macos_wheel_3_9_cpu_nightly_build
filters:
branches:
only:
- nightly
tags:
only:
- /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
package_type: wheel
upload_subfolder: cpu
- binary_upload:
name: binary_macos_conda_3_6_cpu_nightly_upload
context: org-member
Expand Down Expand Up @@ -6402,6 +6436,20 @@ workflows:
- /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
package_type: conda
upload_subfolder: cpu
- binary_upload:
name: binary_macos_conda_3_9_cpu_nightly_upload
context: org-member
requires:
- binary_macos_conda_3_9_cpu_nightly_build
filters:
branches:
only:
- nightly
tags:
only:
- /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
package_type: conda
upload_subfolder: cpu
- binary_upload:
name: binary_macos_libtorch_3_7_cpu_nightly_upload
context: org-member
Expand Down Expand Up @@ -8990,6 +9038,15 @@ workflows:
branches:
only:
- postnightly
- smoke_mac_test:
name: smoke_macos_wheel_3_9_cpu_nightly
build_environment: "wheel 3.9 cpu"
requires:
- update_s3_htmls
filters:
branches:
only:
- postnightly
- smoke_mac_test:
name: smoke_macos_conda_3_6_cpu_nightly
build_environment: "conda 3.6 cpu"
Expand Down Expand Up @@ -9017,6 +9074,15 @@ workflows:
branches:
only:
- postnightly
- smoke_mac_test:
name: smoke_macos_conda_3_9_cpu_nightly
build_environment: "conda 3.9 cpu"
requires:
- update_s3_htmls
filters:
branches:
only:
- postnightly
- smoke_mac_test:
name: smoke_macos_libtorch_3_7_cpu_nightly
build_environment: "libtorch 3.7 cpu"
Expand Down
4 changes: 2 additions & 2 deletions .circleci/scripts/binary_macos_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ if [[ "$PACKAGE_TYPE" == libtorch ]]; then
unzip "$pkg" -d /tmp
cd /tmp/libtorch
elif [[ "$PACKAGE_TYPE" == conda ]]; then
conda install -y "$pkg" --offline
conda install -y "$pkg"
else
pip install "$pkg" --no-index --no-dependencies -v
pip install "$pkg" -v
fi

# Test
Expand Down

0 comments on commit 05dc982

Please sign in to comment.