-
Notifications
You must be signed in to change notification settings - Fork 119
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
Fused types in Cython cause line_profiler to not measure any timing #213
Comments
Is the claim that this worked before line profiler 4.0? Or is the issue that this never worked? I don't think we directly support cythonized code at the line level. @Theelx, do you have any insight here? |
You do support Cython code at the line level: https://github.com/cython/cython/blob/master/tests/run/line_trace.pyx It requires Maybe the bug is in Cython, do you want me to post an issue there? |
No, its likely the bug is here. The issue with the 3.x branch is it doesn't support 3.11+. I'm not sure what is needed to re-add this capability. I'm not the original author of the code, I'm just the guy who maintains it. Fixing this issue will requires someone to dig into this and understand what's going on. |
Hey, sorry for the late response, I've been super busy with my midterms and finals schedule lately (finishing up my first year of college!). I'll take a look at this and the other issues in a few days, once my last final has been taken. |
So, fused types in cython generate multiple specialized versions of the code, one for each possible type. I'd be surprised if profiling had ever worked for fused types, since one set of source code maps to multiple different compiled versions. If profiling fused types had worked on line_profiler<4, then I would put effort into fixing it, but since that wasn't the case I think it would take a lot of development time for a fairly niche case. |
I tested using the same code as the collatz example and line_profiler<4.
I get the following output:
The text was updated successfully, but these errors were encountered: