Closed
Conversation
- Enable #![feature(portable_simd)] and #![feature(specialization)] (Nightly). - Implement DeinterleaveSupported trait to provide specialized SIMD paths. - Add SIMD-accelerated deinterleaving for f32, u8, i8, and i16 using a 8-lane configuration. - Introduce deinterleave_scalar_logic for the base case and tail processing. - Use a macro to reduce duplication across SIMD-supported types. - Add comprehensive unit tests covering odd sample counts and multiple types. - Add a Criterion benchmark to track deinterleaving performance (reaching ~1 Gelem/s). - Update documentation in AGENTS.md and agent_docs/ to reflect the new performance pattern.
| } | ||
| } | ||
|
|
||
| macro_rules! impl_deinterleave_simd { |
Collaborator
There was a problem hiding this comment.
Have you tested, if instead of implementing deinterleave using simd isntruction, this can also be achieved using autovectorization?
AI generated code is usually very good, if reviewd correctly. Still, allowing your agent to check, if the code generated by a non-simd implementation is being autovectorized, might keep the code more readable also for humans.
Collaborator
Author
There was a problem hiding this comment.
Yes I did try autovectorization but was not able to achieve this portably. So after several trials, I went to add this explicitly. But if you have hints, maybe I can try again.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
core::simdto ensure vectorization of Deinterleaving