-
Notifications
You must be signed in to change notification settings - Fork 53
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 optimization callbacks that fire on a marker function #633
base: vc/rework_deferred_codegen
Are you sure you want to change the base?
Conversation
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
fb3088c
to
dfd5c35
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## vc/rework_deferred_codegen #633 +/- ##
==============================================================
+ Coverage 67.79% 73.68% +5.89%
==============================================================
Files 24 24
Lines 3574 3310 -264
==============================================================
+ Hits 2423 2439 +16
+ Misses 1151 871 -280 ☔ View full report in Codecov by Sentry. |
dfd5c35
to
e9d1372
Compare
@maleadt I assume my shenangians with the Julia run into some sort of GC issue?
|
Looks like it; although it can be a bug in LLVM.jl. There's a bunch of state that's being fed into |
Not immediatly :/ |
e9d1372
to
828ee63
Compare
It seems likely that this was an error in the callback itself, that then corrupted some state. |
5281e86
to
ced39bb
Compare
for (name, plugin) in PLUGINS | ||
if plugin.finalize_module !== nothing | ||
plugin.finalize_module(job, compiled, ir) | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wsmoses what other information would you need, purely to annotate the functions for a later optimization pass?
@@ -260,6 +260,12 @@ const __llvm_initialized = Ref(false) | |||
end | |||
end | |||
|
|||
for (name, plugin) in PLUGINS | |||
if plugin.finalize_module !== nothing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: Make this conditional on marker function.
We could potentially use this to implement a macro free version of KernelAbstractions,
by writing a context propagation pass. But for now I think I can use this with Enzyme to fix nested AD.