Skip to content

GH-118095: Use _DYNAMIC_EXIT to stitch traces ending in unbalanced returns or yields. #118578

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

Closed
wants to merge 1 commit into from

Conversation

markshannon
Copy link
Member

@markshannon markshannon commented May 4, 2024

We stop a lot of traces at yields and returns. This PR adds a _DYNAMIC_EXIT uop at the end of those traces.

Stats and JIT performance

Instructions in billions

Instructions Main This PR
Tier 1 97.1 71.2
Tier 2 196.0 243.8

@brandtbucher
Copy link
Member

What do you attribute the slowdown to? The inefficiency of _DYNAMIC_EXIT?

@markshannon
Copy link
Member Author

What do you attribute the slowdown to? The inefficiency of _DYNAMIC_EXIT?

I don't know. Maybe its _DYNAMIC_EXIT, maybe we are compiling more instructions that don't compile very well, maybe something else entirely.
There is no obvious pattern to the slowdown, so it might be noise or it might be some diffuse effect like cache misses. 🤷‍♂️

@markshannon markshannon closed this Aug 6, 2024
@markshannon markshannon deleted the dynamic-underflow branch August 6, 2024 10:19
@Fidget-Spinner
Copy link
Member

Fidget-Spinner commented Dec 23, 2024

I think I know the cause of the slowdown --- yields never stitch because we never trace their RESUME. So it's always _DYNAMIC_EXIT to tier 1. With RESUME tracing, this could be a speedup, as it would exit to tier 2..

@Fidget-Spinner
Copy link
Member

Fidget-Spinner commented Dec 23, 2024

Nevermind, this PR still caused my resume tracing branch to slow down :( on bm_generators.py.

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