Skip to content

Commit 7ab8532

Browse files
malfetpytorchmergebot
authored andcommitted
[BE] Get rid of cross-compile and x86 build options for Mac (pytorch#150362)
As both cross-compilation and x86 builds has been removed a while back Remove stale TODO about building with OpenMP support Pull Request resolved: pytorch#150362 Approved by: https://github.com/atalman, https://github.com/clee2000
1 parent 4ce0b95 commit 7ab8532

File tree

1 file changed

+3
-24
lines changed

1 file changed

+3
-24
lines changed

.ci/pytorch/macos-build.sh

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,6 @@ if which sccache > /dev/null; then
3333
export PATH="${tmp_dir}:$PATH"
3434
fi
3535

36-
cross_compile_arm64() {
37-
# Cross compilation for arm64
38-
# Explicitly set USE_DISTRIBUTED=0 to align with the default build config on mac. This also serves as the sole CI config that tests
39-
# that building with USE_DISTRIBUTED=0 works at all. See https://github.com/pytorch/pytorch/issues/86448
40-
USE_DISTRIBUTED=0 CMAKE_OSX_ARCHITECTURES=arm64 MACOSX_DEPLOYMENT_TARGET=11.0 USE_MKLDNN=OFF USE_QNNPACK=OFF WERROR=1 BUILD_TEST=OFF USE_PYTORCH_METAL=1 python setup.py bdist_wheel
41-
}
42-
43-
compile_arm64() {
44-
# Compilation for arm64
45-
# TODO: Compile with OpenMP support (but this causes CI regressions as cross-compilation were done with OpenMP disabled)
46-
USE_DISTRIBUTED=0 USE_OPENMP=1 MACOSX_DEPLOYMENT_TARGET=11.0 WERROR=1 BUILD_TEST=OFF USE_PYTORCH_METAL=1 python setup.py bdist_wheel
47-
}
48-
49-
compile_x86_64() {
50-
USE_DISTRIBUTED=0 WERROR=1 python setup.py bdist_wheel --plat-name=macosx_10_9_x86_64
51-
}
52-
5336
build_lite_interpreter() {
5437
echo "Testing libtorch (lite interpreter)."
5538

@@ -71,16 +54,12 @@ build_lite_interpreter() {
7154
print_cmake_info
7255

7356
if [[ ${BUILD_ENVIRONMENT} = *arm64* ]]; then
74-
if [[ $(uname -m) == "arm64" ]]; then
75-
compile_arm64
76-
else
77-
cross_compile_arm64
78-
fi
57+
# Explicitly set USE_DISTRIBUTED=0 to align with the default build config on mac. This also serves as the sole CI config that tests
58+
# that building with USE_DISTRIBUTED=0 works at all. See https://github.com/pytorch/pytorch/issues/86448
59+
USE_DISTRIBUTED=0 USE_OPENMP=1 MACOSX_DEPLOYMENT_TARGET=11.0 WERROR=1 BUILD_TEST=OFF USE_PYTORCH_METAL=1 python setup.py bdist_wheel
7960
elif [[ ${BUILD_ENVIRONMENT} = *lite-interpreter* ]]; then
8061
export BUILD_LITE_INTERPRETER=1
8162
build_lite_interpreter
82-
else
83-
compile_x86_64
8463
fi
8564

8665
if which sccache > /dev/null; then

0 commit comments

Comments
 (0)