Skip to content
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

Fix SIMD fallback code when AVX2 is not available #228

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

j-schultz
Copy link
Contributor

Currently the code first typedefs a fallback type based on __m256i and only on the following line it actually defines __m256i as the emulated type. This needs to be the other way around!

This PR also adds a basic .gitignore for the recently-added downloaded model files.

#define __m256i mm256i_emu
typedef __m256i real_m256i;
Copy link

Choose a reason for hiding this comment

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

Doesn't this simply become typedef mm256i_emu real_m256i after preprocessing?

Copy link
Contributor Author

@j-schultz j-schultz Jun 24, 2024

Choose a reason for hiding this comment

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

Yes, but mm256i_emu is also used in other places. I just wanted to fix the code with the least changes possible to make it easy to review.

Copy link

@johncf johncf Jun 24, 2024

Choose a reason for hiding this comment

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

But if both are always the same type, there wouldn't be any need to define this union (which is only relevant when __AVX2__ is not defined but __AVX__ is).

Note: I'm not familiar with the codebase, just started exploring for a project. Just pointing out a logical inconsistency.

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.

None yet

2 participants