-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
allow CodeInfo to be returned directly from generated function generator #22440
Conversation
What work items are left for this PR (besides tests)? I know there needs to be some sort of validation pass over the emitted CodeInfo, but I'm not sure what the pass should be checking for exactly. The only guarantees we normally ascribe to |
3472494
to
07d70b8
Compare
@JeffBezanson, any thoughts on this? Even if just uncertainty, would be good to know... |
07d70b8
to
86ef4b0
Compare
This is legal for inference to do, so that basically makes it certain that generated functions are allowed to do it. We haven't done it before mostly because creating a valid CodeInfo object is fairly difficult (it's easy to trick yourself into thinking some transform is valid which is not). |
Agreed, the concept is legit. |
Does that mean we should merge this? |
Added a fairly simple test for this. If anybody has other test ideas, let me know and I can take a crack at implementing them. I'm planning on implementing a (naive) IR validator in a separate PR, which would make this feature somewhat more robust/error-prone. I'm fine with the IR validator being either a prerequisite or follow-up PR to this PR; otherwise, this PR is ready to merge if CI comes up green. |
255bd66
to
fee82d3
Compare
2159281
to
5d8929e
Compare
Given that the only issue here seems to be a lack of CodeInfo validation, my plan is to merge this as soon as #22938 is merged (assuming nobody expresses dissent). |
5d8929e
to
633aaba
Compare
I'm ok with merging in either order. |
I'll merge this now, then, since we've decided in #22938 the code validator won't be enabled by default anyway. |
My pitiable attempt at resolving #21146. I'm not a C programmer by any means, so I've probably done something stupid/silly.
I would appreciate any direction here, since if I can get it working, this would be quite useful for tracing generic Julia calls via dispatch-interceptable function wrappers.