Skip to content

Commit

Permalink
Remove custom PyTorch build dependency logic on 3.11 (#1697)
Browse files Browse the repository at this point in the history
* Remove custom PyTorch build dependency logic on 3.11

* Add a smoke test for openmp
  • Loading branch information
huydhn authored Feb 6, 2024
1 parent da779da commit 96bd851
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
5 changes: 4 additions & 1 deletion run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ if [[ "$cuda_ver" != 'cpu' ]]; then
fi
fi

# Check that OpenBlas is not linked to on Macs
# Check that OpenBlas is not linked to on MacOS
if [[ "$(uname)" == 'Darwin' ]]; then
echo "Checking the OpenBLAS is not linked to"
all_dylibs=($(find "$(python -c "import site; print(site.getsitepackages()[0])")"/torch -name '*.dylib'))
Expand All @@ -153,6 +153,9 @@ if [[ "$(uname)" == 'Darwin' ]]; then
exit 1
fi
done

echo "Checking that OpenMP is available"
python -c "import torch; exit(0 if torch.backends.openmp.is_available() else 1)"
fi

popd
Expand Down
7 changes: 2 additions & 5 deletions wheel/build_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,8 @@ tmp_env_name="wheel_py$python_nodot"
conda create ${EXTRA_CONDA_INSTALL_FLAGS} -yn "$tmp_env_name" python="$desired_python"
source activate "$tmp_env_name"

if [[ "$desired_python" == "3.11" ]]; then
retry pip install -q "numpy${NUMPY_PINNED_VERSION}" "setuptools${SETUPTOOLS_PINNED_VERSION}" "pyyaml${PYYAML_PINNED_VERSION}" typing_extensions requests
else
retry conda install ${EXTRA_CONDA_INSTALL_FLAGS} -yq "numpy${NUMPY_PINNED_VERSION}" nomkl "setuptools${SETUPTOOLS_PINNED_VERSION}" "pyyaml${PYYAML_PINNED_VERSION}" typing_extensions requests
fi
retry conda install ${EXTRA_CONDA_INSTALL_FLAGS} -yq "numpy${NUMPY_PINNED_VERSION}" nomkl "setuptools${SETUPTOOLS_PINNED_VERSION}" "pyyaml${PYYAML_PINNED_VERSION}" typing_extensions requests

if [[ "$(uname -m)" == "arm64" ]]; then
retry conda install ${EXTRA_CONDA_INSTALL_FLAGS} -yq cmake ninja
else
Expand Down

0 comments on commit 96bd851

Please sign in to comment.