-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Add microarch-level packages #24306
Add microarch-level packages #24306
Conversation
Hi! This is the friendly automated conda-forge-linting service. I wanted to let you know that I linted all conda-recipes in your PR ( Here's what I've got... For recipes/x86_64_level:
|
This recipe intentionally does not have tests so that we could build these packages on one microarchitecture. |
Should there be a matching conda virtual package for this package in order for built packages against a specific microarchitecture to be able to be solved for in environments? |
recipes/x86_64_level/meta.yaml
Outdated
|
||
requirements: | ||
run: | ||
- __archspec 1={{ microarchitecture }} |
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.
@kkraus14, we need __archspec
package.
conda/mamba supports |
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 we want run exports so people can include this in say build and then get the proper constraint in run?
^ ignore this
Ack no. We want packages that adjust the compiler flags that export the constraints on these packages. |
Yeah I think for the run exports here to work the build machine would have to have same micro arch as the run env. Thus we cannot use these exports to cross compile. That's not necessarily a bug just a limitation. |
Added a new |
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.
Code looks good. Are we happy with the names? They are not obvious to me for sure.
EDIT2: Shown by Isuru below, need |
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 made some suggestions to try and make the names clearer to me. Also I think we need a strong run export since the flags package should go in build.
Co-authored-by: Matthew R. Becker <[email protected]>
Still needs the strong run export I think. |
Thanks a bunch for the work here @isuruf! I think we're good to go. |
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.
Thanks @isuruf, LGTM
I'm looking at conda/conda#13213 and conda-forge/conda-feedstock#222, does anyone have a primer what the plan is for the levels? |
i can't believe I am so excited about a "package"...... |
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.
Thanks Isuru! 🙏
We could template the build/number
to make it easier to work with
Co-authored-by: jakirkham <[email protected]>
Co-authored-by: Marcel Bargull <[email protected]>
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.
LGTM, apart from minor nits
Co-authored-by: Marcel Bargull <[email protected]>
Co-authored-by: Marcel Bargull <[email protected]>
If there aren't any further concerns, feel free to merge! |
merge merge merge! |
@jezdez, AFAICT you question hasn't been addressed yet: package:
name: pkg
version: 1.0
build:
script: |
# export CFLAGS="${CFLAGS} -march=x86-64-v3" # done via x86_64-microarch-level=3 activation script
./build-package.sh
requirements:
build:
- x86_64-microarch-level 3 # need at least this level for AVX2
- {{ compiler("c") }} with the depends:
- _x86_64-microarch-level >=3 For my PC I have conda info|grep archspec
virtual packages : __archspec=1=skylake and the package depends:
- __archspec 1=skylake which is satisfied by the virtual package. As such - pkg=1.0
- _x86_64-microarch-level=3=0_skylake for me. If we'd instead built a package targeting some AVX512 and thus required
|
@mbargull The code here already injects the proper flags in the build env. That is what the activate scripts do. |
🙀 Can't be -- I just reviewed this PR today even including a code change suggestion regarding the flags... |
Thanks for that comment! It painted a very clear picture. This would be awesome to have in the docs, if it's not there yet! |
Yeah, thanks @beckermr and @isuruf for the corrections :).
I didn't check if we have docs for that yet. # conda_build_config.yaml
microarch_level: # [unix and x86_64]
- 1 # [unix and x86_64]
- 3 # [unix and x86_64]
- 4 # [unix and x86_64]
---
# meta.yaml
[...]
requirements:
build:
- x86_64-microarch-level {{ microarch_level }} # [unix and x86_64] example in there and also a comment telling people
|
Checklist
url
) rather than a repo (e.g.git_url
) is used in your recipe (see here for more details).cc @conda-forge/core