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

Ensure cupy-core can be installed in CPU-only envs #264

Merged
merged 3 commits into from
Apr 26, 2024

Conversation

leofang
Copy link
Member

@leofang leofang commented Apr 22, 2024

xref:

This was the intended design (both in the upstream implementation and the new cupy-core packaging scheme). For some reason we overlooked it. Correction is made in this PR.

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

@conda-forge-webservices
Copy link
Contributor

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.

@leofang
Copy link
Member Author

leofang commented Apr 22, 2024

Setting this to draft as the alternative is to patch the repodata (and don't update the recipe until the next release or bug fix).

@hmaarrfk
Copy link
Contributor

Thank you for taking an other stab at this.

I think it would help downstream projects if cupy-core could be a dependency, even if the package is empty, for systems where CUDA simply isn't supported:

  • OSX amd64
  • OSX arm64

@leofang
Copy link
Member Author

leofang commented Apr 22, 2024

I am still not sure why macOS is a problem. Here the relaxation makes sense, because the underlying assumption is "on the same system, if NVIDIA hardware and software are plugged in, the code will run." It's not the case for macOS, and if you are saying it is ok for "import cupy" to fail on Mac, why not just skip cupy-core when packaging for macOS?

run:
  - cupy-core  # [not osx]

We should not do anything that the upstream does not support, because it'd only be causing confusion for those who think "a package that's offered must be functional." It doesn't matter that we document it. Users don't read docs.

Also, have you tried MLX? (#260 (comment))

@leofang
Copy link
Member Author

leofang commented Apr 22, 2024

Setting this to draft as the alternative is to patch the repodata (and don't update the recipe until the next release or bug fix).

See conda-forge/conda-forge-repodata-patches-feedstock#715

@hmaarrfk
Copy link
Contributor

why not just skip cupy-core when packaging for macOS?

Because from a packaging standpoint, anything other than a noarch: python script "is more complicated". There are other usecases beyond recipes. environment.yml files don't have support for selectors. It becomes REALLY annoying to have environment-osx.yml, environment-linux.yml, environment-win.yml. Providing a single environment.yml file that "works to the best of your team's development platform" is really useful for sharing knowledge.

Again, I understand you aren't considering this usecase, but I expect it is quite common to have the following setup in many organizations:

  • MAC local machine
  • Linux + Nvidia GPU server

@leofang
Copy link
Member Author

leofang commented Apr 22, 2024

I see you're referring to known issues like (conda/conda#8089, mamba-org/mamba#1788). Unfortunately yes this is one of the few things that requirements.txt serves better.

However, it doesn't seem to be something that the cupy package needs to address? For example, you can

@leofang
Copy link
Member Author

leofang commented Apr 22, 2024

@jakirkham PTAL at this PR and also (conda-forge/conda-forge-repodata-patches-feedstock#715), see the above discussion.

@hmaarrfk
Copy link
Contributor

build a custom meta package (as you originally planned to explore #260 (comment)), or

I understand. The maintenance burden of such packages cannot be ignored.

I'll keep these 3 options as others use and comment on their usecases more and more for cupy.

@leofang
Copy link
Member Author

leofang commented Apr 26, 2024

@conda-forge-admin, please rerender

Copy link
Contributor

Hi! This is the friendly automated conda-forge-webservice.

I tried to rerender for you, but it looks like there was nothing to do.

This message was generated by GitHub actions workflow run https://github.com/conda-forge/cupy-feedstock/actions/runs/8850913003.

@leofang leofang marked this pull request as ready for review April 26, 2024 15:56
@leofang leofang added the automerge Merge the PR when CI passes label Apr 26, 2024
@github-actions github-actions bot merged commit 93627ff into conda-forge:main Apr 26, 2024
34 checks passed
Copy link
Contributor

Hi! This is the friendly conda-forge automerge bot!

I considered the following status checks when analyzing this PR:

  • linter: passed
  • azure: passed

Thus the PR was passing and merged! Have a great day!

@leofang leofang deleted the cpu_support branch April 26, 2024 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Merge the PR when CI passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants