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

gh-124613: Deactivate perf support in tests if the jit is set #124794

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

pablogsal
Copy link
Member

@pablogsal pablogsal commented Sep 30, 2024

@pablogsal pablogsal changed the title Deactivate perf support if the jit is set gh-124613: Deactivate perf support if the jit is set Sep 30, 2024
@pablogsal
Copy link
Member Author

CC @brandtbucher @diegorusso

@pablogsal
Copy link
Member Author

Hummm if we are going to make the JIT the default maybe we should only deactivate in YES and not in Yes-off @brandtbucher WDYT?

@brandtbucher
Copy link
Member

Hummm if we are going to make the JIT the default maybe we should only deactivate in YES and not in Yes-off @brandtbucher WDYT?

I mean, a yes-off build can still have a JIT if the env var is set (ditto for unsetting it via an env var on yes builds). We really just want to deactivate the JIT, regardless of which mode it was built in or what env vars are set.

Check out test.support.without_optimizer, I think it's probably what you want here.

@brandtbucher
Copy link
Member

brandtbucher commented Sep 30, 2024

Oh, whoops, wrong PR. I thought this was the one that's skipping perf tests.

@brandtbucher
Copy link
Member

brandtbucher commented Sep 30, 2024

Yeah, we could just say that both yes and yes-off disable perf jit support. Your call... but yeah, that means we can't ship perf JIT support in the same build if we do that.

Perhaps we should just disable the JIT if perf support is activated at runtime? It requires a bit more surgery, but I think it's probably the best option.

@pablogsal
Copy link
Member Author

pablogsal commented Sep 30, 2024

Yeah, we could just say that both yes and yes-off disable perf jit support. Your call... but yeah, that means we can't ship perf JIT support in the same build if we do that.

No, we surely want perf in yes-off.

Perhaps we should just disable the JIT if perf support is activated at runtime? It requires a bit more surgery, but I think it's probably the best option.

Yeah we should use both things I think. Currently it's not switched to yes-off no?

@brandtbucher
Copy link
Member

brandtbucher commented Oct 1, 2024

Currently it's not switched to yes-off no?

That's too many negatives for me to follow, haha.

What are you proposing, exactly? Disable the JIT when perf support is turned on at runtime? I believe this needs to cover PYTHON_PERF_JIT_SUPPORT, PYTHONPERFSUPPORT, -X perf, and -X perf_jit at startup, and sys.activate_stack_trampoline() and sys.deactivate_stack_trampoline() at runtime. Seems reasonable (maybe we warn if the JIT was activated with the env var to let the user know it's getting turned off?).

Also, the name PYTHON_PERF_JIT_SUPPORT is now more confusing than ever, haha.

@pablogsal
Copy link
Member Author

What are you proposing, exactly? Disable the JIT when perf support is turned on at runtime?

Yes, but that in a separate PR

For now I have modified this PR to use the test.support.without_optimizer so this always runs without the JIT. Is there a way to do that with an env var instead? That way I can call the subprocess without the JIT always

@brandtbucher
Copy link
Member

For now I have modified this PR to use the test.support.without_optimizer so this always runs without the JIT. Is there a way to do that with an env var instead? That way I can call the subprocess without the JIT always

PYTHON_JIT=0

@pablogsal
Copy link
Member Author

For now I have modified this PR to use the test.support.without_optimizer so this always runs without the JIT. Is there a way to do that with an env var instead? That way I can call the subprocess without the JIT always

PYTHON_JIT=0

Ok, moved this PR to that

@pablogsal pablogsal force-pushed the gh-124613-2 branch 2 times, most recently from 2a22218 to e5fc033 Compare October 1, 2024 00:28
@erlend-aasland erlend-aasland removed their request for review October 1, 2024 06:38
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
@pablogsal pablogsal changed the title gh-124613: Deactivate perf support if the jit is set gh-124613: Deactivate perf support in tests if the jit is set Oct 1, 2024
@pablogsal pablogsal merged commit 5e9e506 into python:main Oct 4, 2024
37 checks passed
@pablogsal pablogsal deleted the gh-124613-2 branch October 4, 2024 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants