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

WIP: Add GPU builds #21

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Draft

WIP: Add GPU builds #21

wants to merge 10 commits into from

Conversation

h-vetinari
Copy link
Member

@h-vetinari h-vetinari commented Apr 10, 2021

Found out that upstream supports GPUs, let's try building for it.

There are a bunch of relevant changes that haven't seen a release yet (I've asked when that might be), but for the moment, I'm building from master.

Edit: new version release 🥳

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@h-vetinari h-vetinari marked this pull request as draft April 10, 2021 13:10
@mcg1969
Copy link
Contributor

mcg1969 commented Apr 10, 2021

I'm not sufficiently connected to the core devs anymore to weigh in intelligently on this. Perhaps @bodono can weigh in?

@h-vetinari
Copy link
Member Author

Interestingly, this only fails for cuda 10.2 on windows, but works otherwise. I'd be completely fine in skipping that failing combination.

@conda-forge/nvcc it's a bit hard to tell for me if building for all CUDA versions is really required here, but the dependence on cudart makes me guess so?

In any case, feedback is welcome! :)

@h-vetinari
Copy link
Member Author

h-vetinari commented Apr 10, 2021

Seems my enthusiasm might have been premature - the test suite is too old to be run with pytest, and everything just gets skipped... 🤦

EDIT: wasn't an issue after all. :)

recipe/meta.yaml Outdated Show resolved Hide resolved
recipe/build-pkg.bat Outdated Show resolved Hide resolved
@kkraus14
Copy link

@conda-forge/nvcc it's a bit hard to tell for me if building for all CUDA versions is really required here, but the dependence on cudart makes me guess so?

In CUDA 11.0+ the soname on libcudart is the same, so if no newer features are used then in theory you can build with the latest CUDA 11.x version and run on all 11.x versions of libcudart (at least on the linux side, not sure about the windows side).

@h-vetinari
Copy link
Member Author

@xhochy @isuruf
I'd be glad if you could have a quick look at this PR. There are some build errors on win + cuda 10.2 (which remain also with vs2019), but I'd be fine to skip that and just build win+cuda>=11.

Obviously those changes are still outstanding (revert vs2019, skip win+cuda10.2), but wanted to leave it as is right now for ease of reviewing.

@xhochy
Copy link
Member

xhochy commented Apr 15, 2021

@h-vetinari Should I look at this PR in general or with regards to win/GPU? For the latter, I have no experience/expertise.

@h-vetinari
Copy link
Member Author

Should I look at this PR in general or with regards to win/GPU?

General review would already be very nice, there's no win-specific GPU parts here anyway. :)

recipe/meta.yaml Outdated
- export BLAS_LAPACK_LIBS="lapack:cblas:blas" # [unix]
- {{ PYTHON }} -m pip install . -vv
skip: true # [py==27 and (win or (not x86_64))]
number: {{ number }}
Copy link
Member

Choose a reason for hiding this comment

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

Keep this as a plain number, otherwise the bot will not update it anymore.

recipe/meta.yaml Outdated
script: build-pkg.bat # [win]
build:
string: "py{{ CONDA_PY }}h{{ PKG_HASH }}_{{ number }}_{{ scs_proc_type }}" # [cuda_compiler_version == "None"]
string: "py{{ CONDA_PY }}cuda{{ cuda_compiler_version|replace(".", "") }}h{{ PKG_HASH }}_{{ number }}_{{ scs_proc_type }}" # [cuda_compiler_version != "None"]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
string: "py{{ CONDA_PY }}cuda{{ cuda_compiler_version|replace(".", "") }}h{{ PKG_HASH }}_{{ number }}_{{ scs_proc_type }}" # [cuda_compiler_version != "None"]
string: "py{{ CONDA_PY }}cuda{{ cuda_compiler_version|replace(".", "") }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}_{{ scs_proc_type }}" # [cuda_compiler_version != "None"]

recipe/meta.yaml Outdated
script: build-pkg.sh # [not win]
script: build-pkg.bat # [win]
build:
string: "py{{ CONDA_PY }}h{{ PKG_HASH }}_{{ number }}_{{ scs_proc_type }}" # [cuda_compiler_version == "None"]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
string: "py{{ CONDA_PY }}h{{ PKG_HASH }}_{{ number }}_{{ scs_proc_type }}" # [cuda_compiler_version == "None"]
string: "py{{ CONDA_PY }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}_{{ scs_proc_type }}" # [cuda_compiler_version == "None"]

recipe/meta.yaml Show resolved Hide resolved
@h-vetinari
Copy link
Member Author

Thanks for the review @xhochy; I'm sorry this slipped under the radar in a very busy week. Will try to get back to it soon.

Copy link
Member Author

@h-vetinari h-vetinari left a comment

Choose a reason for hiding this comment

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

Thanks again for the review @xhochy, didn't know the PKG_BUILDNUM trick.

recipe/meta.yaml Show resolved Hide resolved
@h-vetinari
Copy link
Member Author

@conda-forge/help-pypy @conda-forge/nvcc
Quick question, are there any CUDA-enabled pypy packages in CF already? Is the expectation that this just works? CI runs through, but is obviously not testing the GPU paths.

@jaimergp
Copy link
Member

jaimergp commented May 7, 2021

OpenMM has some!

@h-vetinari h-vetinari force-pushed the gpu branch 3 times, most recently from d3f53b8 to 992a6b7 Compare June 6, 2021 22:00
@h-vetinari
Copy link
Member Author

@conda-forge-admin, please rerender

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I was trying to look for recipes to lint for you, but it appears we have a merge conflict.
Please try to merge or rebase with the base branch to resolve this conflict.

Please ping the 'conda-forge/core' team (using the @ notation in a comment) if you believe this is a bug.

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@h-vetinari
Copy link
Member Author

@conda-forge-admin, please rerender

@h-vetinari
Copy link
Member Author

@conda-forge-admin, please rerender

@h-vetinari h-vetinari closed this Feb 4, 2022
@h-vetinari h-vetinari reopened this Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants