-
-
Notifications
You must be signed in to change notification settings - Fork 168
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 SSE2, AVX2 & NEON support to pygame.print_debug_info()
#2897
Conversation
These are the most common instruction sets we support paths for and could assist us in detecting bugs.
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.
Great idea, will help detect bugs like the recent segfaults more easily
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.
LGTM!
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.
Thanks!
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.
Ankith wanted to review this so slapping down a request changes to hold it until he can take a look.
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 don't have a problem with this PR per se, but my opinion is that we should probably have a centralized way to get and set the SIMD level at runtime.
Everytime someone has to test a lower SIMD level they have to mess with either the buildconfig or the source code itself, and this is not ideal. Especially if we want a user to test out something.
One approach is to have env variables PG_ENABLE_[AVX2|SSE2|NEON]
that can be configured before pygame init. On init, these variables are read, and along with runtime detection, we set the corresponding runtime check values.
Another approach is to have some API, probably in pygame.system
, to pythonically get/set this
You should open an issue about that. It shouldn't block this PR. We will get this for free when SDL3 comes out, btw. SDL_HINT_CPU_FEATURE_MASK. |
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.
True, I'm opening a separate issue for it, as it is independent of this PR.
Thanks for the PR 🎉
Starbuck approved, but requested changes so Ankith could review, Ankith approved, so I'm dismissing this so I can merge it
These are the most common instruction sets we support paths for and could assist us in detecting bugs. There are more instruction sets listed in
system.get_cpu_instuction_sets()
but currently we don't make much use of them in pygame-ce.Suggested by @Starbuck5