Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj committed Feb 10, 2024
1 parent 02f4d69 commit 09dc0a1
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 15 deletions.
34 changes: 22 additions & 12 deletions .github/workflows/macos-cpu-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,17 @@ jobs:
id: set-matrix
run: |
# outputting for debugging purposes
python ./scripts/github_actions/generate_build_matrix.py --for-macos
MATRIX=$(python ./scripts/github_actions/generate_build_matrix.py --for-macos)
# python ./scripts/github_actions/generate_build_matrix.py --for-macos
# MATRIX=$(python ./scripts/github_actions/generate_build_matrix.py --for-macos)
#
python ./scripts/github_actions/generate_build_matrix.py --for-macos --test-only-latest-torch
MATRIX=$(python ./scripts/github_actions/generate_build_matrix.py --for-macos --test-only-latest-torch)
echo "::set-output name=matrix::${MATRIX}"
build_wheels_macos_cpu:
needs: generate_build_matrix
name: ${{ matrix.torch }} ${{ matrix.python-version }}
runs-on: macos-11
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
Expand All @@ -44,15 +47,22 @@ jobs:
with:
fetch-depth: 0

# see https://cibuildwheel.readthedocs.io/en/stable/changelog/
# for a list of versions
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BEFORE_BUILD: pip install torch==${{ matrix.torch}} cmake numpy
CIBW_BUILD: ${{ matrix.python-version }}-*
CIBW_REPAIR_WHEEL_COMMAND_MACOS: ""
CIBW_BUILD_VERBOSITY: 3
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
shell: bash
run: |
pip install torch==${{ matrix.torch}} cmake numpy
- name: Build wheel
shell: bash
run: |
python3 setup.py bdist_wheel
mkdir wheelhouse
cp -v dist/* wheelhouse
- name: Display wheels
shell: bash
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/ubuntu-cuda-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ jobs:
id: set-matrix
run: |
# outputting for debugging purposes
python ./scripts/github_actions/generate_build_matrix.py --enable-cuda
MATRIX=$(python ./scripts/github_actions/generate_build_matrix.py --enable-cuda)
# python ./scripts/github_actions/generate_build_matrix.py --enable-cuda
# MATRIX=$(python ./scripts/github_actions/generate_build_matrix.py --enable-cuda)
python ./scripts/github_actions/generate_build_matrix.py --enable-cuda --test-only-latest-torch
MATRIX=$(python ./scripts/github_actions/generate_build_matrix.py --enable-cuda --test-only-latest-torch)
echo "::set-output name=matrix::${MATRIX}"
build-manylinux-wheels:
Expand Down
5 changes: 5 additions & 0 deletions scripts/github_actions/build-ubuntu-cuda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ if [ -z $CUDA_VERSION ]; then
exit 1
fi

if [[ $TORCH_VERSION =~ 2.2.* && $CUDA_VERSION =~ 12.* ]]; then
# see https://github.com/pytorch/pytorch/issues/113948
export TORCH_CUDA_ARCH_LIST="8.0 8.6 8.9 9.0"
fi


yum -y install openssl-devel bzip2-devel libffi-devel xz-devel wget redhat-lsb-core

Expand Down
4 changes: 3 additions & 1 deletion scripts/github_actions/generate_build_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,11 @@ def generate_build_matrix(enable_cuda, for_windows, for_macos, test_only_latest_
if p in excluded_python_versions:
continue

if for_windows or for_macos:
if for_windows:
p = "cp" + "".join(p.split("."))
ans.append({"torch": torch, "python-version": p})
elif for_macos:
ans.append({"torch": torch, "python-version": p})
else:
ans.append(
{
Expand Down

0 comments on commit 09dc0a1

Please sign in to comment.