-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add support for BLAS and LAPACK dependencies (continued) #14773
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
Open
mgorny
wants to merge
1
commit into
mesonbuild:master
Choose a base branch
from
mgorny:dependency-openblas
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
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
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
Oops, something went wrong.
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 understand why you did this, but it's conceptually not really correct. An "interface" is not really a module. Could we have some other way of expressing this information that is more explicit about what it does?
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.
Do you have a specific suggestion? From the discussion on #10921 I got the impression that it's a good enough compromise. Eli was rather opposed to adding new keyword arguments to
dependency()over this, and the only clean alternative I can think of is creating a whole new module for this — and I'm not really convinced it's worth the effort. There's also the option of duplicating dependencies and having a ton ofopenblas-lp64,openblas-ilp64,mkl-lp64-iompand so on — but I'm not convinced this will actually be cleaner.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 was thinking this too. CPS has the concept of "configurations" but I'm not really sure that this is a configuration either. We have a meeting tomorrow, I will bring this up with them and see what they think.
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.
In theory you could do something like:
But we'd need to properly review that to make sure it works in all (or at least most) use cases.
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.
Another big question is whether they provide different pkg-config names. That is, if there is both an
openblasandopenblas-ilp64already, then using those names makes sense.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 reason to use fake
modulearguments to pass additional properties to use for dependency selection is to avoid adding more keyword arguments to thedependency()function. IIUC the main reason for not adding more keyword arguments is that it sucks to have a generic function to allow arguments that apply only to a limited subset of cases.The possible way out is to allow a Python's kwargs-style signature where the
dependency()function forwards additional arguments to the concrete implementation of the dependency finding classes. IIUC kwargs-style arguments are not desired in the Meson language. However, using fakemodulesstrings to pass arbitrary arguments effectively implements kwarg-style arguments circumventing the language limitations. It has all the drawbacks of allowing kwarg-style arguments plus all the drawbacks of having to implement parsing and error reporting in the implementation of the concrete dependency implementation.If adding kwarg-style arguments to the Meson language is really not going to happen, maybe we should add to the
dependency()function apropertiesarguments that takes a dictionary: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, something accepting a dictionary would definitely be preferable for me over a list with custom key-value syntax.
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 the example above is mixing "configurations" and "modules"/"components". I would say the gtest "main" example is a module/component, because it's an extra piece added to the core of gtest. boost with threading is a configuration, since you can have single- or multi- threaded implementations of a given module/component. configurations likely need to be a mapping or an array, because you'll likely want to be able to give a tri-state to the configuration like a
UserFeatureoption does, "must have", "can have", "must not have".I wish I'd gotten around to dealing with CPS stuff sooner, because I think it would help with this particular issue to have all of that work 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.
Agreed.
I used the name
propertiesinstead ofconfiguration(and I likeconfigurationmuch more) but I didn't use amoduleforthreading, thus I'm not sure I understand this objection.Sure. I didn't specify which values can be associated to
configurationkeys. I guess for some of them a tri-state makes sense.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.
Would you mind opening an issue that tracks all the the CPS-related stuff? I've looked around in the repo but couldn't find anything. I could open an issue myself, but it's not likely to be of high quality (though of course you could then edit it as you see fit), because I don't know this effort well. Let me know if for whatever reason you'd still like me to do that.