-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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 polars #18906
Add polars #18906
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/polars:
|
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/polars:
|
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( |
Super excited to see this! It seems like it's a very awkward one to compile for conda-forge though 😬. If Windows is being particularly difficult perhaps this can be merged without Windows support and then debug it on the feedstock? |
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/polars:
|
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( |
@dhirschfeld, just updated to skip windows builds for now, I think it will be quite simple to fix in a future PR. Thanks for the comment. |
Seems like it can't find the python executable, which is odd since you explicitly specify
Maybe the selector means - python # [build_platform != target_platform] Anyway, easy enough to test that theory out in the feedstock.... |
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.
Awesome initiative! I've left a few comments regarding how we build the binary.
recipes/polars/build.sh
Outdated
|
||
export PATH=${SRC_DIR}/rust-nightly-install/bin:$PATH | ||
|
||
maturin build --no-sdist --release --strip --manylinux off --interpreter="${PYTHON}" --rustc-extra-args="-C codegen-units=16 -C lto=thin -C target-cpu=native" |
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.
We should not be compiling for native
target CPU. That would mean the binary is unusable for CPU's that don't share the same features.
For pypi we set:
export RUSTFLAGS='-C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+fma'
This is a reasonable default.
Next, we also should not set the codegen-units
nor thin
lto. This creates a binary that would be slower than what we produce for pypi.
So I would propose skipping the whole --rustc-extra-args="-C codegen-units=16 -C lto=thin -C target-cpu=native"
and setting:
export RUSTFLAGS='-C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+fma'
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.
we may have to modify this once the feedstock is created for mac arm builds since both the x86 and arm builds will use build.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.
We don't enable avx
by default on conda-forge binaries. So, please remove RUSTFLAGS
.
windows looks ok over here:Maxyme#1 |
@BastianZim @beckermr @bollwyvl Requesting your feedback on the recipe. The sources for |
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.
Can we instead please update the rust_dev build of the rust conpiler feedstock instead of bundling it here?
@xhochy is there an existing pattern for using the rust_dev build like this? Just keeping in mind that this is the 5th attempt at getting a polars feedstock in and there's a dearth of rust-nightly examples to work from |
Add the following to
You might need to update the rust_dev build in the rust-feedstock to get the latest version there.
The number of failed PRs should not be a wildcard to dismiss reviews. We want sustainable solutions here. |
recipes/polars/build.sh
Outdated
# todo: Check +avx when supported in conda-forge | ||
export RUSTFLAGS='-C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+fma' |
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.
Remove this so that the default options are used and when conda-forge moves forward, it'll be done automatically.
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.
Note that we use these feature flags in polars. Or are they moved somewhere else? I am not really familiar with conda feedstocks.
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.
@ritchie46 In theory - if I'm correct... and if it compiles, it will use library calls instead of cpu instructions.
I think that we can either compile with these flags and force cpu instruction optimizations for some features and potentially lock out some users, or use default flags, (I don't think conda sets RUSTFLAGS but I could be wrong) and lose some performance at the benefit of allowing more users to use the library (see: https://internals.rust-lang.org/t/policies-around-default-cpu-architecture/9142/5).
Also according to this (https://store.steampowered.com/hwsurvey -> other settings) avx would be supported by 95% of users.
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.
Yes thats correct but these are reasonable defaults that practically all machines have. The rust defaults are super conservative because they also ship to embedded.
Note that we don't activate avx. That one is not yet broadly supported.
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 be okay going ahead with the defaults and looking at the flags in a separate pr? I can open a new one after this for that purpose. @isuruf ?
ive been duplicating our work in this PR on #18987 so whenever we merge this one if we could do |
Small update: this PR is currently blocked by: #19036 |
Now that PR ( #19036 ) is in would it be possible to drop those changes from here? |
@Maxyme Can you rebase and remove all changes that aren't inside Also I'm happy to be added as a maintainer to help with future build troubles if you would like to. |
Thanks @xhochy for getting this over the line, and making it easier to add new rust recipes! 🎉 |
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/polars:
|
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( |
- ritchie46 | ||
- sugatoray | ||
- xhochy | ||
- dhirschfeld |
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'm happy to be added as a maintainer
@isuruf, ready to merge this! |
(applying the same changes to #18987) |
moving to #19136 |
🎉 🎉 🎉 |
Checklist
url
) rather than a repo (e.g.git_url
) is used in your recipe (see here for more details).