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

Point to the conda-forge jaxlib wheels in the JAX readme. #11888

Merged
merged 1 commit into from
Aug 15, 2022

Conversation

hawkinsp
Copy link
Collaborator

@hawkinsp hawkinsp commented Aug 12, 2022

Fixes #189

@hawkinsp hawkinsp requested a review from jakevdp August 12, 2022 19:54
@hawkinsp
Copy link
Collaborator Author

hawkinsp commented Aug 12, 2022

@ngam @ericmjl @xhochy

Any comments?

@google-ml-butler google-ml-butler bot added kokoro:force-run pull ready Ready for copybara import and testing labels Aug 12, 2022
@ngam
Copy link
Contributor

ngam commented Aug 12, 2022

Any comments?

Yes. Two comments:

  1. I am more than happy to help but I ran into a super challenging issue that I've been struggling to resolve (we are yet to release jaxlib 0.3.15 on our end; I am waiting for conda-specific global updates to filter through and I will give it another go soon). This is all to say, I would add a stronger disclaimer so people don't spam this repo with issues...
  2. I believe we have really solid cuda builds on conda-forge now (and we work quite hard to make sure that our jax builds can easily coexist with tensorflow). I would preemptively add instructions for cuda installation (that's not covered by the readme; I can potentially fix it, but the bots will delete that in no time :D). Something like this, which is also slowly getting out of date: https://conda-forge.org/docs/user/tipsandtricks.html#installing-cuda-enabled-packages-like-tensorflow-and-pytorch

I will suggest some edits to address both points in a bit (or can do so in a later PR)

README.md Outdated
Comment on lines 515 to 539
### Conda installation

There is a community-supported Conda build of `jaxlib`. See the
[jaxlib conda-forge](https://github.com/conda-forge/jaxlib-feedstock#installing-jaxlib)
project for installation instructions.

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
### Conda installation
There is a community-supported Conda build of `jaxlib`. See the
[jaxlib conda-forge](https://github.com/conda-forge/jaxlib-feedstock#installing-jaxlib)
project for installation instructions.
### Conda installation
There is a community-supported Conda builds of `jaxlib` and `jax`, which are driven independently of the JAX team. See the
[jaxlib](https://github.com/conda-forge/jaxlib-feedstock#installing-jaxlib) and [jax](https://github.com/conda-forge/jax-feedstock#installing-jax)
repositories for installation instructions. Note that, the conda-forge project redistributes CUDA and CuDNN; as such, there is no need to install them beforehand. If you would like to install the CUDA-enabled builds of `jaxlib`, follow the instructions in the [Tips & tricks](https://conda-forge.org/docs/user/tipsandtricks.html#installing-cuda-enabled-packages-like-tensorflow-and-pytorch) section of the conda-forge website.

Copy link
Contributor

Choose a reason for hiding this comment

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

(I don't know if this is the correct formatting... it looks weird; feel free to discard now and I can submit a PR later if needed)

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 incorporated a number of your suggestions. By the way, I found out that it is actually not sufficient to let conda install CUDA for you. JAX needs ptxas, which isn't distributed. So you must install at least the ptxas binary yourself. Everything else necessary is in the conda builds.

Copy link
Contributor

Choose a reason for hiding this comment

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

I thought we get ptxas under conda-forge too. Could you give me a quick test to investigate this? There was a discussion about this previously in conda-forge. I will try to locate it and see the updates on that.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for catching the ptxas bit! Crucial!

Copy link
Contributor

Choose a reason for hiding this comment

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

No need for a test as we likely won't even catch it as we do have ptxas in the containers we use for building but not in the distributed cudatoolkit --- in the future, we could discuss building an "optimized" container on top of the conda-forge binaries if you'd like, which will be on top of the nvidia containers

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The ptxas issue is fixable with a little bit of engineering work on our side (there's a library version of the same thing: libnvptxcompiler_static.a) or with the agreement of NVidia to allow redistribution of ptxas. I'll raise it with them.

Choose a reason for hiding this comment

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

Could this PTX Compiler Python binding be useful as an alternative to calling ptxas: https://github.com/rapidsai/ptxcompiler ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@copybara-service copybara-service bot merged commit 2f6e9fd into jax-ml:main Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kokoro:force-run pull ready Ready for copybara import and testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

conda-based installation
4 participants