-
-
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
Enable JITLink on aarch64 linux. #45859
Conversation
This is great! Thank you. |
Nice work on the LLVM side of things – great to see that the required changes on the Julia side were minimal. (I hope the section name normalisation thing didn't cost you too much time; I was aware that this would likely not be needed for ELF, but unfortunately decided to obey YAGNI and not add the ifdef "clutter".) |
I indeed took a bit of time to identify the section name issue, but it totally makes sense in darwin. I was also surprised such minimal changes in julia make everything work out of shelf; your JITLink work was very solid! |
This also seems to fix / work around #41852! |
Is there a way we could detect at compile time if the backend supports JITlink? While discouraged people do build Julia against LLVM without our patches. |
There is no such function yet, but unsupported platform/architecture can be easily detected by priting out JITLinkError. I can still create a llvm patch if such a function comes handy. |
Yeah the scenario I worry about is someone building against an unpatched version of LLVM 14. We normally don't backport big feature addition because of this. |
It's indeed a bit complicated. I thought about making if JL_LLVM_VERSION < 140000 more specific, but then we have to tweak it every llvm14 version bump. |
Yeah, have all these landed for LLVM 15? We might delay until then, or make it something that can be set in |
Yup, all of the commits should land in LLVM 15. We can delay until then. |
Probably fixes #47399 |
LLVM 15 is happening, #48700, so we should be able to move this forwards :-) Time for a rebase? |
This PR solves for me a segmentation fault during compilation of Julia on ThunderX2: #46431 (comment). Thanks @sunho! |
Thanks all! |
Oh, nice! How do you run Julia on it? |
I installed ubuntu touch: https://devices.ubuntu-touch.io/device/sargo But I think these instructions will also work and are less disruptive: https://discourse.julialang.org/t/using-julia-on-android/8086/33?u=sdanisch (got 1.6.4 running on it as well, before I went for the nuclear option^^) |
Thanks @SimonDanisch , haven't played with Julia under Termux for a while, time to dust it off, then. :-) |
This commit makes Julia run on Rock Pi 4: https://discourse.julialang.org/t/julia-1-8-5-not-working-on-rock-pi-4/95425 |
9323cf2
to
8d33505
Compare
44c077a
to
02057d7
Compare
6ae7bbd
to
fd91a0f
Compare
67fed9c
to
a596f95
Compare
a596f95
to
75a7cdb
Compare
90a959f
to
2ddbb5a
Compare
We lost this PR and it can't be reopened 😢 |
You can always get any PR branch back with github's APIs. It is available as a patch file: |
Enable JITLink in order to turn on small code model on aarch64 linux. Fixes #42295.
JITLink is a new JIT linker in LLVM that solves various issues within RuntimeDyLD, notablely, lacking support of small code model, runtime features (i.e. TLS), and confusing error handling. The lack of small code model has caused random assertions and codegen bugs in aarch64 architecture which is tracked in #42295. Switching to JITLink can solve this issue, but aarch64 linux has not been supported in JITLink until recently. Now, most of the groundworks to support aarch64 linux were done in llvm upstream, and it's able to turn JITLink on.
This PR builds upon the works done in #43664. It simply turns on JITLink on aarch64 linux as well. Few modifications were done to properly register eh frame and debug info in linux.
On my local machine, it passes almost all testcases including challenging backtrace test cases. Few of them (mostly SSL TLS test cases) are failing which I think is unrelated to jit backend, but please tell me if I need to dig into them.
Needs JuliaLang/llvm-project#9.
cc @vchuravy @vtjnash @dnadlinger