Skip to content

Commit

Permalink
Merge pull request conda-forge#244 from conda-forge-admin/conda_forge…
Browse files Browse the repository at this point in the history
…_admin_243

Adjust OSX builds to avoid co-installed incompatible versions of OpenMP
  • Loading branch information
hmaarrfk authored Jun 26, 2024
2 parents 437d51a + b825e98 commit b362c03
Show file tree
Hide file tree
Showing 27 changed files with 46 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ c_stdlib_version:
cdt_name:
- cos7
channel_sources:
- conda-forge/label/numpy_rc,conda-forge
- conda-forge
channel_targets:
- conda-forge main
cuda_compiler:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ c_stdlib_version:
cdt_name:
- cos7
channel_sources:
- conda-forge/label/numpy_rc,conda-forge
- conda-forge
channel_targets:
- conda-forge main
cuda_compiler:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ c_stdlib_version:
cdt_name:
- cos7
channel_sources:
- conda-forge/label/numpy_rc,conda-forge
- conda-forge
channel_targets:
- conda-forge main
cuda_compiler:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ c_stdlib_version:
cdt_name:
- cos7
channel_sources:
- conda-forge/label/numpy_rc,conda-forge
- conda-forge
channel_targets:
- conda-forge main
cuda_compiler:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ c_stdlib_version:
cdt_name:
- cos7
channel_sources:
- conda-forge/label/numpy_rc,conda-forge
- conda-forge
channel_targets:
- conda-forge main
cuda_compiler:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ c_stdlib_version:
cdt_name:
- cos7
channel_sources:
- conda-forge/label/numpy_rc,conda-forge
- conda-forge
channel_targets:
- conda-forge main
cuda_compiler:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ cdt_arch:
cdt_name:
- cos7
channel_sources:
- conda-forge/label/numpy_rc,conda-forge
- conda-forge
channel_targets:
- conda-forge main
cuda_compiler:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ cdt_arch:
cdt_name:
- cos7
channel_sources:
- conda-forge/label/numpy_rc,conda-forge
- conda-forge
channel_targets:
- conda-forge main
cuda_compiler:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ c_stdlib:
c_stdlib_version:
- '10.15'
channel_sources:
- conda-forge/label/numpy_rc,conda-forge
- conda-forge
channel_targets:
- conda-forge main
cuda_compiler:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ c_stdlib:
c_stdlib_version:
- '10.15'
channel_sources:
- conda-forge/label/numpy_rc,conda-forge
- conda-forge
channel_targets:
- conda-forge main
cuda_compiler:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ c_stdlib:
c_stdlib_version:
- '10.15'
channel_sources:
- conda-forge/label/numpy_rc,conda-forge
- conda-forge
channel_targets:
- conda-forge main
cuda_compiler:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ c_stdlib:
c_stdlib_version:
- '10.15'
channel_sources:
- conda-forge/label/numpy_rc,conda-forge
- conda-forge
channel_targets:
- conda-forge main
cuda_compiler:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ c_stdlib:
c_stdlib_version:
- '10.15'
channel_sources:
- conda-forge/label/numpy_rc,conda-forge
- conda-forge
channel_targets:
- conda-forge main
cuda_compiler:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ c_stdlib:
c_stdlib_version:
- '10.15'
channel_sources:
- conda-forge/label/numpy_rc,conda-forge
- conda-forge
channel_targets:
- conda-forge main
cuda_compiler:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ c_stdlib:
c_stdlib_version:
- '10.15'
channel_sources:
- conda-forge/label/numpy_rc,conda-forge
- conda-forge
channel_targets:
- conda-forge main
cuda_compiler:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ c_stdlib:
c_stdlib_version:
- '10.15'
channel_sources:
- conda-forge/label/numpy_rc,conda-forge
- conda-forge
channel_targets:
- conda-forge main
cuda_compiler:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ c_stdlib:
c_stdlib_version:
- '10.15'
channel_sources:
- conda-forge/label/numpy_rc,conda-forge
- conda-forge
channel_targets:
- conda-forge main
cuda_compiler:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ c_stdlib:
c_stdlib_version:
- '10.15'
channel_sources:
- conda-forge/label/numpy_rc,conda-forge
- conda-forge
channel_targets:
- conda-forge main
cuda_compiler:
Expand Down
2 changes: 1 addition & 1 deletion .ci_support/osx_arm64_numpy1.22python3.8.____cpython.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ c_stdlib:
c_stdlib_version:
- '11.0'
channel_sources:
- conda-forge/label/numpy_rc,conda-forge
- conda-forge
channel_targets:
- conda-forge main
cuda_compiler:
Expand Down
2 changes: 1 addition & 1 deletion .ci_support/osx_arm64_numpy2.0python3.10.____cpython.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ c_stdlib:
c_stdlib_version:
- '11.0'
channel_sources:
- conda-forge/label/numpy_rc,conda-forge
- conda-forge
channel_targets:
- conda-forge main
cuda_compiler:
Expand Down
2 changes: 1 addition & 1 deletion .ci_support/osx_arm64_numpy2.0python3.11.____cpython.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ c_stdlib:
c_stdlib_version:
- '11.0'
channel_sources:
- conda-forge/label/numpy_rc,conda-forge
- conda-forge
channel_targets:
- conda-forge main
cuda_compiler:
Expand Down
2 changes: 1 addition & 1 deletion .ci_support/osx_arm64_numpy2.0python3.12.____cpython.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ c_stdlib:
c_stdlib_version:
- '11.0'
channel_sources:
- conda-forge/label/numpy_rc,conda-forge
- conda-forge
channel_targets:
- conda-forge main
cuda_compiler:
Expand Down
2 changes: 1 addition & 1 deletion .ci_support/osx_arm64_numpy2.0python3.9.____cpython.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ c_stdlib:
c_stdlib_version:
- '11.0'
channel_sources:
- conda-forge/label/numpy_rc,conda-forge
- conda-forge
channel_targets:
- conda-forge main
cuda_compiler:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/conda-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
steps:

- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- name: Build on Linux
if: matrix.os == 'ubuntu'
Expand Down Expand Up @@ -126,7 +126,7 @@ jobs:
./.scripts/run_osx_build.sh
- name: Install Miniconda for windows
uses: conda-incubator/setup-miniconda@v3
uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3.0.4
with:
miniforge-version: latest
miniforge-variant: Mambaforge
Expand Down
4 changes: 4 additions & 0 deletions recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

set -ex

# https://github.com/conda-forge/pytorch-cpu-feedstock/issues/243
# https://github.com/pytorch/pytorch/blob/v2.3.1/setup.py#L341
export PACKAGE_TYPE=conda

# remove pyproject.toml to avoid installing deps from pip
rm -rf pyproject.toml

Expand Down
30 changes: 16 additions & 14 deletions recipe/build_pytorch.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
set -x
if [[ "$megabuild" == true ]]; then
source $RECIPE_DIR/build.sh
# if $SP_DIR/torch doesn't exist here, the installation
# of pytorch (see build_libtorch.sh call above) failed
pushd $SP_DIR/torch
for f in bin/* lib/* share/* include/*; do
if [[ -e "$PREFIX/$f" ]]; then
rm -rf $f
ln -sf $PREFIX/$f $PWD/$f
fi
done
else
$PREFIX/bin/python -m pip install --no-deps --no-cache-dir torch-*.whl
fi
source $RECIPE_DIR/build.sh

# if $SP_DIR/torch doesn't exist here, the installation
# of pytorch (see build_libtorch.sh call above) failed
pushd $SP_DIR/torch

# Make symlinks for libraries and headers from libtorch into $SP_DIR/torch
# Also remove the vendorered libraries they seem to include
# https://github.com/conda-forge/pytorch-cpu-feedstock/issues/243
# https://github.com/pytorch/pytorch/blob/v2.3.1/setup.py#L341
for f in bin/* lib/* share/* include/*; do
if [[ -e "$PREFIX/$f" ]]; then
rm -rf $f
ln -sf $PREFIX/$f $PWD/$f
fi
done
2 changes: 1 addition & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% set version = "2.3.1" %}
{% set build = 0 %}
{% set build = 1 %}

{% if cuda_compiler_version != "None" %}
{% set build = build + 200 %}
Expand Down

0 comments on commit b362c03

Please sign in to comment.