Uh oh!
There was an error while loading. Please reload this page.
feat(pypi): implement a new whl selection algorithm - #3111
Conversation
0ed5c7d to
9792058Comparerickeylev
commented
Aug 11, 2025
didn't have time to review, but qq: does it still handle if multiple wheels are compatible? The type of case I have in mind are things that aren't represented by env markers. e.g. cuda version, free threading, etc. |
aignas
commented
Aug 11, 2025
The main idea is that the user can specify the preference for the abi tags and the platform tags. If cuda version or the abi can be expressed by them, then it will work as expected. On top of this I could implement freethreaded support using this algorithm in #3063, so I am pretty confident that we have the right abstractions in place now, because the configuration of which wheel we should prefer is injected into the extension through the |
DO NOT MERGE: stacked on bazel-contrib#3110 This PR only implements the selection algorithm where instead of selecting all wheels that are compatible with the set of target platforms, we select a single wheel that is most specialized for a particular *single* target platform. What is more, compared to the existing algorithm it does not assume a particular list of supported platforms and just fully implements the spec. Work towards bazel-contrib#2747 Work towards bazel-contrib#2759 Work towards bazel-contrib#2849
rickeylev
commented
Aug 12, 2025
Yeah, I get they can use bzlmod-phase stuff to control which implementations of a library are considered. Big +1 to that. The case I want to work is multiple implementations in a single build invocation. e.g. I'm guessing this PR does do that (since (1) that's what've talked of doing previous and (2) your mention of free-threading and the 3063 description makes it sound in that same vein) (but still haven't had a chance to review the code). But this PR description implies that, after bzlmod phase, only one wheel will be chosen? |
aignas
commented
Aug 13, 2025
One wheel per target platform. So whatever your set of config settings you want to target are, there should be either 1 or 0 wheels matching that. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This PR only implements the selection algorithm where instead of
selecting all wheels that are compatible with the set of target
platforms, we select a single wheel that is most specialized for a
particular single target platform.
What is more, compared to the existing algorithm it does not assume
a particular list of supported platforms and just fully implements the
spec.
Work towards #2747
Work towards #2759
Work towards #2849