-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Fix --compile=all
mode after CodeInstance refactor
#53421
Conversation
if (cgparams.lookup != jl_rettype_inferred_addr) { | ||
jl_error("Refusing to automatically run type inference with custom cache lookup."); | ||
} | ||
else { | ||
*ci_out = jl_type_infer(mi, world, 0, SOURCE_MODE_ABI); | ||
codeinst = jl_type_infer(mi, world, 0, SOURCE_MODE_ABI); |
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.
needs SOURCE not ABI if this is for future compilation, though it also must be cached if it is for aotcompilation (e.g. rather than for GPU)
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.
I guess this might be yet another mode, because constabi is fine, just not something that only has JIT pointers but no source. That said though, we don't delete code while we're generating output, so this might actually be ok?
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.
True, we don't usually delete it in that case because we figure it is worthwhile to reuse, but seems awkward to introduce a reliance on that. We might delete it though if this was being called for GPU usage, since I think that reuses this code path too?
This doesn't seem to be sufficient; I still get MissingCodeErrors building with --compile=all. |
Can you post what you're trying, so I can reproduce it? |
e1a2493
to
6e26d20
Compare
All right, try again. |
For those following along at home, there's something broken with the lld-built system image on windows. We get:
vs a regular sysimage:
Currently I'm suspecting that this might be a symptom of #49994, so I'm testing that hypothesis on CI, but something else might be going on. |
Confirmed that this is an ld vs lld issue:
|
I have files this upstream as llvm/llvm-project#84424. For now, I'll mark this as broken on windows and move on, since the system image does work if linked with ld. |
win32 failure is an OOM. I think that's just gonna have to be skipped for now. I don't know why it's taking so much memory, but the system image is very big, so if LLVM keeps a couple of copies around, this'll happen. |
This codepath does not have tests, so it wasn't quite correct. Hopefully this fixes it.
Ordinarily, we refuse to cache CodeInstances that are not compilesig, but the ones we get from --compile=all sometimes are not, so we need to manually poke them into the cache if necessary.
This appears to have introduced a new test failure:
IIRC, the |
Link to the failing worker? |
I seem to see it on many that I clicked on on master, e.g. https://buildkite.com/julialang/julia-master/builds/34696#018e3d72-f7d3-4ace-b06c-6ba675688ed7 |
Another example, but this time on aarch64-darwin: https://buildkite.com/julialang/julia-master/builds/34728#018e4318-2fbb-4607-accd-94411f48b4d5
|
This codepath does not have tests, so it wasn't quite correct. Hopefully this fixes it.