Skip to content

SIMD level must be easily controllable at runtime #2914

Open
@ankith26

Description

@ankith26

moving my comment from #2897 to an issue:

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

A point by @Starbuck5

We will get this for free when SDL3 comes out, btw. SDL_HINT_CPU_FEATURE_MASK.

Metadata

Metadata

Assignees

No one assigned

    Labels

    New APIThis pull request may need extra debate as it adds a new class or function to pygameSIMD

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions