Skip to content

Commit 4233c32

Browse files
bottlerfacebook-github-bot
authored andcommitted
cpu wheel builds for linux and mac
Reviewed By: nikhilaravi Differential Revision: D20073426 fbshipit-source-id: fce83c9b63d630de1e6ebe2ff4790f29d11b65cc
1 parent 40be4cf commit 4233c32

File tree

5 files changed

+103
-3
lines changed

5 files changed

+103
-3
lines changed

.circleci/config.in.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,24 @@ jobs:
182182
183183
docker run --gpus all --ipc=host -v $(pwd):/remote -w /remote ${VARS_TO_PASS} ${DOCKER_IMAGE} ./packaging/build_conda.sh
184184
185+
binary_macos_wheel:
186+
<<: *binary_common
187+
macos:
188+
xcode: "9.0"
189+
steps:
190+
- checkout
191+
- run:
192+
# Cannot easily deduplicate this as source'ing activate
193+
# will set environment variables which we need to propagate
194+
# to build_wheel.sh
195+
command: |
196+
curl -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
197+
sh conda.sh -b
198+
source $HOME/miniconda3/bin/activate
199+
packaging/build_wheel.sh
200+
- store_artifacts:
201+
path: dist
202+
185203
workflows:
186204
version: 2
187205
build_and_test:
@@ -193,3 +211,21 @@ workflows:
193211
python_version: "3.7"
194212
pytorch_version: "1.4"
195213
cu_version: "cu100"
214+
- binary_macos_wheel:
215+
build_version: 0.1.0
216+
cu_version: cpu
217+
name: binary_linux_wheel_py3.6_cpu
218+
python_version: '3.6'
219+
pytorch_version: '1.4'
220+
- binary_macos_wheel:
221+
build_version: 0.1.0
222+
cu_version: cpu
223+
name: binary_linux_wheel_py3.7_cpu
224+
python_version: '3.7'
225+
pytorch_version: '1.4'
226+
- binary_macos_wheel:
227+
build_version: 0.1.0
228+
cu_version: cpu
229+
name: binary_linux_wheel_py3.8_cpu
230+
python_version: '3.8'
231+
pytorch_version: '1.4'

.circleci/config.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,24 @@ jobs:
182182
183183
docker run --gpus all --ipc=host -v $(pwd):/remote -w /remote ${VARS_TO_PASS} ${DOCKER_IMAGE} ./packaging/build_conda.sh
184184
185+
binary_macos_wheel:
186+
<<: *binary_common
187+
macos:
188+
xcode: "9.0"
189+
steps:
190+
- checkout
191+
- run:
192+
# Cannot easily deduplicate this as source'ing activate
193+
# will set environment variables which we need to propagate
194+
# to build_wheel.sh
195+
command: |
196+
curl -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
197+
sh conda.sh -b
198+
source $HOME/miniconda3/bin/activate
199+
packaging/build_wheel.sh
200+
- store_artifacts:
201+
path: dist
202+
185203
workflows:
186204
version: 2
187205
build_and_test:
@@ -247,8 +265,44 @@ workflows:
247265
name: binary_linux_conda_py3.8_cu101
248266
python_version: '3.8'
249267
pytorch_version: '1.4'
268+
- binary_linux_wheel:
269+
build_version: 0.1.0
270+
cu_version: cpu
271+
name: binary_linux_wheel_py3.6_cpu
272+
python_version: '3.6'
273+
pytorch_version: '1.4'
274+
- binary_linux_wheel:
275+
build_version: 0.1.0
276+
cu_version: cpu
277+
name: binary_linux_wheel_py3.7_cpu
278+
python_version: '3.7'
279+
pytorch_version: '1.4'
280+
- binary_linux_wheel:
281+
build_version: 0.1.0
282+
cu_version: cpu
283+
name: binary_linux_wheel_py3.8_cpu
284+
python_version: '3.8'
285+
pytorch_version: '1.4'
250286
- binary_linux_conda_cuda:
251287
name: testrun_conda_cuda_py3.7_cu100
252288
python_version: "3.7"
253289
pytorch_version: "1.4"
254290
cu_version: "cu100"
291+
- binary_macos_wheel:
292+
build_version: 0.1.0
293+
cu_version: cpu
294+
name: binary_linux_wheel_py3.6_cpu
295+
python_version: '3.6'
296+
pytorch_version: '1.4'
297+
- binary_macos_wheel:
298+
build_version: 0.1.0
299+
cu_version: cpu
300+
name: binary_linux_wheel_py3.7_cpu
301+
python_version: '3.7'
302+
pytorch_version: '1.4'
303+
- binary_macos_wheel:
304+
build_version: 0.1.0
305+
cu_version: cpu
306+
name: binary_linux_wheel_py3.8_cpu
307+
python_version: '3.8'
308+
pytorch_version: '1.4'

.circleci/regenerate.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
def workflows(prefix="", filter_branch=None, upload=False, indentation=6):
1616
w = []
17-
# add "wheel" here for pypi
1817
for btype in ["conda"]:
1918
for python_version in ["3.6", "3.7", "3.8"]:
2019
for cu_version in ["cu92", "cu100", "cu101"]:
@@ -26,6 +25,17 @@ def workflows(prefix="", filter_branch=None, upload=False, indentation=6):
2625
upload=upload,
2726
filter_branch=filter_branch,
2827
)
28+
for btype in ["wheel"]:
29+
for python_version in ["3.6", "3.7", "3.8"]:
30+
for cu_version in ["cpu"]:
31+
w += workflow_pair(
32+
btype=btype,
33+
python_version=python_version,
34+
cu_version=cu_version,
35+
prefix=prefix,
36+
upload=upload,
37+
filter_branch=filter_branch,
38+
)
2939

3040
return indent(indentation, w)
3141

packaging/pkg_helpers.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ setup_build_version() {
113113
# Set some useful variables for OS X, if applicable
114114
setup_macos() {
115115
if [[ "$(uname)" == Darwin ]]; then
116-
export MACOSX_DEPLOYMENT_TARGET=10.14 CC=clang CXX=clang++
116+
export MACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++
117117
fi
118118
}
119119

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def get_extensions():
2020

2121
extension = CppExtension
2222

23-
extra_compile_args = {"cxx": ["-std=c++17"]}
23+
extra_compile_args = {"cxx": ["-std=c++14"]}
2424
define_macros = []
2525

2626
force_cuda = os.getenv("FORCE_CUDA", "0") == "1"

0 commit comments

Comments
 (0)