-
Notifications
You must be signed in to change notification settings - Fork 849
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
Remove multiversion dependency #3452
Conversation
6677820
to
35fb697
Compare
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.
https://github.com/calebzulawski/target-features appears to be a one hit wonder crate (basically one version, no obvious plan for maintenance)
https://github.com/calebzulawski/target-features/commits/master
I am all for removing this dependency 👍
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.
It would be nice to ping whoever initially added the multiversion dependency as a courtesy -- I didn't do enough code archeology to really figure it out
Benchmark runs are scheduled for baseline = 61a77a5 and contender = ec2fd47. ec2fd47 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
Related upstream ticket: calebzulawski/target-features#1 |
I believe I did. The goal was to be able to use more SIMD for some kernels. |
That's precisely the use-case for
|
Thank you for the response @calebzulawski |
I don't disagree that it is definitely not ideal, but it also is not really feasible for us to generate multiple versions of all our kernels, as we already have severe issues with the amount of codegen and the corresponding build times. Correct me if I am mistaken, but if a user enabled AVX using |
I personally think it is more beneficial to choose the appropriate target architecture higher up at the application level rather than in a lower level library. For example, I would rather compile several versions of our top level I would prefer the top level approach because more of my application could take advantage of the target cpu's instructions (via llvm's support for auto vectorization, for example), rather than just arrow. |
In this case, yes, AVX is commonly available. When AVX512 stabilizes in Rust, however, you would likely not want to build an entire application that requires it. If the amount of codegen is a concern then removing multiversioning can definitely help--you could also consider using a cargo feature to control whether or not multiversioning is present, and leave it up to the users. Another thing to consider is that particular software distributions (e.g. Linux) probably have particular CPUs they target, and won't be able to take advantage of
That is another possibility, one that's used by Intel's MKL for example. I'm not sure it's the best approach, however:
With all of this in mind, I don't have any opinion on what is the best option for |
I guess what I had in mind was literally create builds of the influxdb_iox binary for each architecture (well really probably "AVX512" and "SSE2", and maybe a third one in the middle). As you note Rust doesn't have a stable ABI (and therefore will recompile almost everything from source each time anyways) |
Which issue does this PR close?
Closes #.
Rationale for this change
We only use this in a single location, and in general recommend people compile with the appropriate
target-cpu
, as such I think we can remove this without any major issue.Eliminating a dependency is always a good thing, especially as this results in additional codegen, and reduces our vulnerability to upstream shenanigans.
What changes are included in this PR?
Are there any user-facing changes?