Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove extra arch + refactor unit tests workflow #2

Merged
merged 9 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 7 additions & 13 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ on:
pull_request:
push:
branches:
- master
- "master"

jobs:
unittests:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change was not listed as a goal of this PR. Why don't we need macos and windows anymore?

Copy link
Collaborator Author

@bugra-yilmaz bugra-yilmaz Sep 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't run anything on macOS or Windows so I didn't want us to waste time / resources with those.

python-version: [3.7, 3.8]
torch-version: [1.10.0, 1.11.0, 1.12.0]
os: ["ubuntu-latest"]
python-version: ["3.10"]
torch-version: ["2.0.1", "2.1.1", "2.2.1", "2.3.1", "2.4.1"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
Expand All @@ -23,15 +23,9 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install "numpy<=1.21" scikit-learn flake8 setuptools numba

- name: Install torch ${{ matrix.torch-version }} windows + linux
if: ${{matrix.os != 'macos-latest'}}
run: pip install torch==${{ matrix.torch-version }}+cpu -f https://download.pytorch.org/whl/torch_stable.html
- name: Install torch ${{ matrix.torch-version }} macos
if: ${{matrix.os == 'macos-latest'}}
run: pip install torch==${{ matrix.torch-version }}

pip install "numpy==1.26.4" scikit-learn flake8 setuptools numba

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curious, why are the other dependencies not pinned to a specific version?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've received an error from Torch - Numpy interaction and this is the version we have in OSS dependencies currently.

The public repository doesn't have any changes to the unit tests workflow for 2 years - they don't support Python 3.8 yet so I thought this is already much better than what there was 😛

- name: Install Torch ${{ matrix.torch-version }}
run: pip install torch==${{ matrix.torch-version }}+cpu -f https://download.pytorch.org/whl/torch
- name: Build package
run: |
python setup.py build_ext --inplace
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ build
.vscode/
dist/
torch_points_kernels.egg-info/
.idea/
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def get_ext_modules():
if WITH_CUDA:
nvcc_flags = os.getenv("NVCC_FLAGS", "")
nvcc_flags = [] if nvcc_flags == "" else nvcc_flags.split(" ")
nvcc_flags += ["-arch=sm_35", "--expt-relaxed-constexpr", "-O2"]
nvcc_flags += ["--expt-relaxed-constexpr", "-O2"]
extra_compile_args["nvcc"] = nvcc_flags

ext_modules.append(
Expand Down
Loading