-
Notifications
You must be signed in to change notification settings - Fork 44
Explicitly select for CUDA-suffixed dependencies in rapids-make-pip-dependencies
#365
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
Changes from 5 commits
8cd4ba2
c8bffd4
7fa1e1f
072f5e5
5c93127
52f567d
23179ed
c40f39f
9e15d70
0df12df
378b87b
3df408c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -59,6 +59,17 @@ make_pip_dependencies() { | |||||||
| local python_version="${PYTHON_VERSION:-$(python3 --version 2>&1 | cut -d' ' -f2)}"; | ||||||||
| python_version="$(cut -d'.' -f3 --complement <<< "${python_version}")"; | ||||||||
|
|
||||||||
| # Projects that depend on different pip libraries across different CUDA versions | ||||||||
| # (e.g. 'cudf' only depending on 'pynvjitlink' from CUDA 12.0 onwards), split up their | ||||||||
| # dependency lists with 'cuda_suffixed={true,false}'. | ||||||||
| # | ||||||||
| # Here we want the suffixed versions (like 'pynvjitlink-cu12'). | ||||||||
| # | ||||||||
| # It's ok for other RAPIDS libraries to end up in this list (like 'rmm-cu12')... in builds | ||||||||
| # where those are also being built in the devcontainer, they'll be filtered out via | ||||||||
| # inclusion in the 'pip_noinstall' list below. | ||||||||
| local -r matrix_selectors="arch=$(uname -m);cuda=${cuda_version};py=${python_version};cuda_suffixed=true" | ||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should add this as an option to the script instead of relying on the sed at the end to filter out the package names. Something like That last filtering step is really a hack around the fact that we don't have the ability to request DFG doesn't include certain packages in its output. Ideally eventually we could remove it in favor of doing the filtering in DFG.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok yeah, that makes sense to me. I just pushed commits adding a Saw the new argument show up in docs. rapids-make-pip-env --help
rapids-make-pip-dependencies --helpCommented out devcontainers/features/src/rapids-build-utils/opt/rapids-build-utils/bin/make-pip-dependencies.sh Line 170 in 331dd88
# all suffixed stuff has -cu11, list includes cubinlinker but not pynvjitlink
rapids-make-pip-dependencies \
--force \
--matrix-entry 'cuda=11.8' \
--matrix-entry 'arch=x86_64'
# all suffixed stuff has -cu12, list includes pynvjitlink but not cubinlinker
rapids-make-pip-dependencies \
--force \
--matrix-entry 'cuda=12.2' \
--matrix-entry 'arch=x86_64'
# all suffixed stuff has -cu12, list includes pynvjitlink but not cubinlinker
# (using the defaults)
rapids-make-pip-dependencies \
--forceI do think it still makes sense to have That's why I'm proposing not modifying these to use this new argument:
devcontainers/features/src/rapids-build-utils/opt/rapids-build-utils/bin/post-start-command.sh Line 9 in 331dd88
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we want to keep the defaults we had before, and then add the additional values to them. The devcontainer controls the arch, CUDA, and Python versions, and we don't want to allow those to be overridden.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
What would DFG do if it saw a matrix of
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I think that later values in the list override earlier ones, yes: Not sure if that's intentional though, so if we started relying on it I'd want to add a test there (if there isn't one already) making it clear that that behavior needs to be preserved. Here's why I'm thinking
Consider: # test.yaml
files:
all:
output: requirements
includes:
- depends_on_rmm
dependencies:
depends_on_rmm:
specific:
- output_types: [requirements]
matrices:
- matrix:
cuda: "12.*"
cuda_suffixed: "true"
packages:
- rmm-cu12
- matrix:
cuda: "12.*"
cuda_suffixed: "false"
packages:
- rmm
- matrix:
cuda: "11.*"
cuda_suffixed: "true"
packages:
- rmm-cu11
- matrix:
cuda: "11.*"
cuda_suffixed: "false"
packages:
- rmm
- matrix:
packages:
- rmm-FALLBACKrapids-dependency-file-generator \
--file-key all \
--output requirements \
--matrix 'cuda=12.2;arch=x86_64;py=3.11' \
--config ./test.yamlWhich is what's happening in the pip devcontainers CI job on rapidsai/cudf#16183.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just pushed a new commit, which I think achieves the behavior you're looking for... e.g. Tested again as described in #365 (comment).
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah I'm fine with
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep makes sense! Thanks for bringing it up. I'll check But I don't think we have to wait on that to merge this.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Put up rapidsai/dependency-file-generator#102 with those tests. |
||||||||
|
|
||||||||
| local pip_reqs_txts=(); | ||||||||
|
|
||||||||
| eval "$(rapids-list-repos "${OPTS[@]}")"; | ||||||||
|
|
@@ -81,12 +92,12 @@ make_pip_dependencies() { | |||||||
| for ((keyi=0; keyi < ${#repo_keys[@]}; keyi+=1)); do | ||||||||
| local file="/tmp/${!repo_name}.${repo_keys[$keyi]}.requirements.txt"; | ||||||||
| pip_reqs_txts+=("${file}"); | ||||||||
| generate_requirements \ | ||||||||
| "${file}" \ | ||||||||
| --file-key "${repo_keys[$keyi]}" \ | ||||||||
| --output requirements \ | ||||||||
| --config ~/"${!repo_path}/dependencies.yaml" \ | ||||||||
| --matrix "arch=$(uname -m);cuda=${cuda_version};py=${python_version}" \ | ||||||||
| generate_requirements \ | ||||||||
| "${file}" \ | ||||||||
| --file-key "${repo_keys[$keyi]}" \ | ||||||||
| --output requirements \ | ||||||||
| --config ~/"${!repo_path}/dependencies.yaml" \ | ||||||||
| --matrix "${matrix_selectors}" \ | ||||||||
| ; | ||||||||
| done | ||||||||
|
|
||||||||
|
|
@@ -103,12 +114,12 @@ make_pip_dependencies() { | |||||||
| for ((keyi=0; keyi < ${#repo_keys[@]}; keyi+=1)); do | ||||||||
| local file="/tmp/${!repo_name}.lib${!cpp_name}.${repo_keys[$keyi]}.requirements.txt"; | ||||||||
| pip_reqs_txts+=("${file}"); | ||||||||
| generate_requirements \ | ||||||||
| "${file}" \ | ||||||||
| --file-key "${repo_keys[$keyi]}" \ | ||||||||
| --output requirements \ | ||||||||
| --config ~/"${!repo_path}/dependencies.yaml" \ | ||||||||
| --matrix "arch=$(uname -m);cuda=${cuda_version};py=${python_version}" \ | ||||||||
| generate_requirements \ | ||||||||
| "${file}" \ | ||||||||
| --file-key "${repo_keys[$keyi]}" \ | ||||||||
| --output requirements \ | ||||||||
| --config ~/"${!repo_path}/dependencies.yaml" \ | ||||||||
| --matrix "${matrix_selectors}" \ | ||||||||
| ; | ||||||||
| done | ||||||||
| done | ||||||||
|
|
@@ -126,12 +137,12 @@ make_pip_dependencies() { | |||||||
| for ((keyi=0; keyi < ${#repo_keys[@]}; keyi+=1)); do | ||||||||
| local file="/tmp/${!repo_name}.${!py_name}.${repo_keys[$keyi]}.requirements.txt"; | ||||||||
| pip_reqs_txts+=("${file}"); | ||||||||
| generate_requirements \ | ||||||||
| "${file}" \ | ||||||||
| --file-key "${repo_keys[$keyi]}" \ | ||||||||
| --output requirements \ | ||||||||
| --config ~/"${!repo_path}/dependencies.yaml" \ | ||||||||
| --matrix "arch=$(uname -m);cuda=${cuda_version};py=${python_version}" \ | ||||||||
| generate_requirements \ | ||||||||
| "${file}" \ | ||||||||
| --file-key "${repo_keys[$keyi]}" \ | ||||||||
| --output requirements \ | ||||||||
| --config ~/"${!repo_path}/dependencies.yaml" \ | ||||||||
| --matrix "${matrix_selectors}" \ | ||||||||
| ; | ||||||||
| done | ||||||||
| done | ||||||||
|
|
||||||||
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.
Should we also make these changes in
make-conda-dependencies.sh?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.
yeah I think that makes sense. I'd originally not done that when I was just going to hard-code this behavior as defaults inside
make-pip-dependencies(since conda lists should never care about CUDA suffixes), but now that we're exposing--matrix-entryas an argument, I agree it should be supported inmake-conda-dependenciestoo.Just pushed that change.