Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
make pip source installs a bit easier #1048
make pip source installs a bit easier #1048
Changes from 2 commits
ee40cd7
724647f
7b675a4
72bc8b4
0387f3e
1c2d4de
e6cc176
a39811c
068f556
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than always including this, should the default development instructions not enable CUDA, and therefore not specify a matrix entry? This assumes we make the other change I suggest above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a question for @pentschev ?
These docs are under a section that says it's assumed you're building on a system with CUDA.
ucx-py/docs/source/install.rst
Lines 50 to 53 in 7b70211
I'm happy to change this PR either way, but I don't feel qualified to make the call about whether or not the CUDA-enabled build should be the default.
I DO think that we should continue specifying this flag (and therefore depending on the
libucx
package) in docs builds here. Since we've seen that those docs builds end up also carrying some test coverage to catch works-without-CUDA types of issues (rapidsai/ucxx#231).So @pentschev , the specific question for you is, which of these would you prefer?
pip install .
works with 0 other flags, but requires a system installation of UCXpip install .
requires passing-C rapidsai.matrix-entry="cuda12.2"
or similar, but in exchange the locally-built package depends onlibucx
wheels (so no system version required)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just pushed 7b675a4 implementing this, by the way, so you can look at the diff and see what it'd look like.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docs assume a CUDA system because of the
--with-cuda=$CUDA_HOME
build flag, which is our primary use case, if that flag is omitted then it should work on non-CUDA systems as well, but we don't document that at the moment.Can I have both? 🙂
Ideally, I would like both to work, but given your phrasing it seems this is not possible. So let's assume you have UCX installed on the system and
libucx
installed, what would happen then both with and without-C rapidsai.matrix-entry="cuda12.2"
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This question is about whether or not
pip install .
pulls that dependency in for you, not about what happens if it happens to already be installed.If you've already done something like the following:
Then
import ucp
will calllibucx.load_library()
, which should find that system installation oflibucs
,libucm
, etc., but will fall back to thelibucx
-bundled ones if finding them fails for some reason.Ok so what's the point of
-C rapidsai.matrix-entry
?libucx
isn't distributed as the namelibucx
.... you have to picklibucx-cu11
(CUDA 11) orlibucx-cu12
(CUDA 12). That selection of major CUDA version can happen automatically inrapids-build-backend
, but that detection is being turned off here via the use ofdisable-cuda = true
, to support source installation on non-CUDA systems by default.Another option we could pursue, if you want, is to choose a specific CUDA verrsion as the default one for source installations by e.g. recording
libucx-cu12
as a dependency inpyproject.toml
. Thenpip install .
would "just work" with no additional flags on a system with or without CUDA available and with or without a system installation of UCX. But anyone using CUDA 11 would have to pass-C rapidsai.matrix-entry="cuda11.8"
or similar, or they'd get alibucx-cu12
(built against CUDA 12), which might lead to runtime issues.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in a39811c. Would you mind having a look if everything seems correct to you @jameslamb ?
Also, I've accidentally committed this local change that I was going to push to another PR. It's harmless and corrects the environment now, so if you don't mind let's leave it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, no problem, it's ok to leave it.
Looking right now! Thanks for doing that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd written up a long comment about how the docs should indicate that CPU-only is totally supported by
pip install ucx-py-cu{11,12}
.... then re-read what you wrote and saw that you already said exactly that 🤦🏻Anyway, in case it's interesting, here's how I tested that to convince myself:
how I tested that (click me)
Ran the following on my macOS laptop (so no possibility of accidentally finding CUDA):
Saw output like this:
Maybe that'd be a helpful smoke test to add for rapidsai/ucxx#231.
Anyway... everything you wrote looks correct and clear to me! I think this is good to merge. Thanks as always for your patience working through it with me 😊
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Smoke tests are always useful, my concern is how would that work in CI? Not sure if it's worth the trouble if we have to add another job at this time, from existing jobs it's probably relatively complicated to do so in a "safe" manner (i.e., ensuring linkage isn't resolved via the proper PyPI/conda UCX package).
I'm also +1 on merging this, I've approved the PR. Thanks so much James for the work here! 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For sure, this wasn't a proposal to do add a new job or anything right now.
Thanks! I'll merge this once CI passes.