Skip to content

Improving avx/avx2 swizzles #1141

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

Merged

Conversation

DiamonDinoia
Copy link
Contributor

Hi,

This PR optimzes swizzles where possible
Fixed a bug in the float avx2 swizzle which did not allow duplicates
Adds more tests

Copy link
Contributor

@serge-sans-paille serge-sans-paille left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you could reduce code duplication by syndicating patterns as suggested, that would be great!

@DiamonDinoia
Copy link
Contributor Author

DiamonDinoia commented Jul 11, 2025

If this passes the tests it can be merged. I hope I did not break any build this time.

Should I add myself to the copyright?

@serge-sans-paille
Copy link
Contributor

You can add yourself, yes. And rebase on master branch ;-)

@DiamonDinoia
Copy link
Contributor Author

I rebased. I did not squash as I have some commits that I would like to keep for reference in the branch. Feel free to squash and merge in master.

@serge-sans-paille
Copy link
Contributor

Hey @DiamonDinoia : I'll have a look at this next week, don't worry if you don't have any feedback since then 🙇

@DiamonDinoia DiamonDinoia force-pushed the improving-swizzle branch 2 times, most recently from ec97ae8 to e99877d Compare July 25, 2025 19:18
@DiamonDinoia
Copy link
Contributor Author

I am not sure what the problem is with PowerPC. It should not touch any code I wrote and from the print the results seems correct.

@serge-sans-paille
Copy link
Contributor

How strange: the failure shows batches that... look the same /o\

@DiamonDinoia
Copy link
Contributor Author

I could not find an explanation for it.

@serge-sans-paille
Copy link
Contributor

If you don't mind, I'll split your commit history in pieces and validate them step-by-step in order to understand what's happening - keeping your authorship information, of course.

@DiamonDinoia
Copy link
Contributor Author

Sure, no problem, go ahead!

@serge-sans-paille
Copy link
Contributor

perfect, can you just squash your commits into a nice history? Thanks o/

Fixes: some swizzled did not allow duplicates in the output
@serge-sans-paille serge-sans-paille merged commit 825d298 into xtensor-stack:master Aug 8, 2025
65 checks passed
@serge-sans-paille
Copy link
Contributor

Thanks for being patient and for the great patch set \o/

@serge-sans-paille
Copy link
Contributor

See ##1155 for the sse2 part

@DiamonDinoia
Copy link
Contributor Author

Thanks for being patient and for the great patch set \o/

My pleasure!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants