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

Add a Py_JIT_ENABLED variable to pyconfig.h #126204

Open
Eclips4 opened this issue Oct 30, 2024 · 3 comments
Open

Add a Py_JIT_ENABLED variable to pyconfig.h #126204

Eclips4 opened this issue Oct 30, 2024 · 3 comments
Assignees
Labels
build The build process and cross-build topic-JIT type-feature A feature request or enhancement

Comments

@Eclips4
Copy link
Member

Eclips4 commented Oct 30, 2024

Feature or enhancement

Proposal:

On Windows(more exactly on all non-configure builds), currently there is no way to determine if CPython is built with a JIT.
This is a blocker for #126166.
I'm propose adding a variable Py_JIT (maybe this is not a great name..) to pyconfig.h.

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

@Eclips4 Eclips4 added type-feature A feature request or enhancement build The build process and cross-build topic-JIT labels Oct 30, 2024
@Eclips4 Eclips4 self-assigned this Oct 30, 2024
@Eclips4
Copy link
Member Author

Eclips4 commented Oct 30, 2024

Possible values for Py_JIT:

  • 0 - CPython was built without JIT
  • 1- CPython was built with JIT
  • interpreter - CPython was built without JIT but with enabled tier 2 interpreter.

@ZeroIntensity
Copy link
Member

Bikeshedding: Py_HAS_JIT might be more clear. I don't want Py_JIT to get confused with the PYTHON_JIT env var :)

@Eclips4
Copy link
Member Author

Eclips4 commented Oct 30, 2024

Bikeshedding: Py_HAS_JIT might be more clear. I don't want Py_JIT to get confused with the PYTHON_JIT env var :)

After taking a look at pyconfig.h, I think name Py_JIT_ENABLED is more appropriate

@Eclips4 Eclips4 changed the title Add a Py_JIT variable to pyconfig.h Add a Py_JIT_ENABLED variable to pyconfig.h Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build The build process and cross-build topic-JIT type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants