-
Notifications
You must be signed in to change notification settings - Fork 226
Build cuopt as an abi3 wheel using the CPython Limited API #1731
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
Merged
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
d772dfe
Build cuopt as an abi3 wheel using the CPython Limited API
ramakrishnap-nv 3c6ed5d
cuopt-skill-evolution: mirror rmm/cudf for shared RAPIDS build conven…
ramakrishnap-nv ea266e5
docs: note the Limited API constraint on Cython code
ramakrishnap-nv a409e23
Address review feedback
ramakrishnap-nv 63de0b2
Assert cuopt produces an abi3 wheel during validation
ramakrishnap-nv b9165cc
Revert the cuopt wheel matrix filter to the standard RAPIDS form
ramakrishnap-nv 187f06a
Revert the abi3audit step to the standard RAPIDS form
ramakrishnap-nv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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 see this came from CodeRabbit's suggestion you posted:
This is fine but it's unnecessary complexity. The matrix we use for wheel builds very intentionally only chooses a single minor version from within each CUDA major family.
I cannot foresee a situation where that matrix would have multiple minor versions from the same major version in it.
I have a weak preference for reverting this back to the form used in
cudfand all other RAPIDS repos:https://github.com/NVIDIA/cudf/blob/a98ad619fea197d1d0bfa0c2ed04ba50bd084ec4/.github/workflows/pr.yaml#L765
Consistency makes automation easier.
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.
Makes sense — reverted in b9165cc. Both
pr.yamlandbuild.yamlnow use the exact form you linked, comment included:Good to know the wheel matrix guarantees one minor per CUDA major — that was the assumption I couldn't confirm from outside, so I'd hedged against it.
While you're here: there's one more deliberate divergence I'd like your call on, in
ci/validate_wheel.sh. CodeRabbit flagged that theabi3auditstep silently no-ops whenfindmatches nothing, so I tightened the glob to*-abi3-*.whland added a failure whenpython/cuoptproduces no abi3 wheel — the idea being that droppingwheel.py-apiwould otherwise skip the audit and leave CI green. It's scoped topython/cuoptbecause libcuopt/server/sh-client share the script and are allpy3-none.By the same consistency argument you just made, I'm happy to drop it and match cudf/rmm exactly. Your call — it's a one-line revert either way.
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 intentionally left out cases like
if [[ "${package_dir}" == "python/cuopt" ]], because I didn't want anyone to have to remember to update that code as the set of packages changes (which could happen, similar to #1622).This would already be caught by other things in CI. If you omitted that, the wheel would be a
cp311-cp311-manylinuxwheel (because it was built on Python 3.11 thanks to thematrix_filter), and Python 3.12+ wheel-testing CI jobs should fail with a loud error about not being able to find artifacts / install packages.IMO it should be reverted back to the form I used in the other PRs. But I don't feel strongly enough to block the PR over 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.
Reverted in 187f06a —
ci/validate_wheel.shnow matches cudf's version byte for byte (diffed to confirm).You're right that the case is already covered, and I checked it rather than take my own word for it:
wheel-tests-cuoptruns on 3.11, 3.12, 3.13 and 3.14, so acp311-cp311wheel would fail to install in 6 of the 8 test jobs. Loud enough, and it doesn't depend on anyone maintaining a package list.The point about #1622 is the one that actually changes how I'd approach this next time — I was optimizing for catching a regression and hadn't weighed the cost of a conditional that silently goes stale when the package set moves. Thanks for spelling it out.