-
Notifications
You must be signed in to change notification settings - Fork 12k
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
[RISCV] The LLVM JIT appears to be broken on RISC-V #59125
Comments
Hi. I am not an expert here, but did you happen to take a look at the orcjit port at https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17801 ? IIRC mesa currently uses mcjit which is deprecated and doesn't support new architectures. |
@llvm/issue-subscribers-backend-risc-v |
@llvm/issue-subscribers-orcjit |
CC @alexfanqi |
I would also suggest trying out the mesa orcjit patch felix mentioned, but using my wip branch https://gitlab.freedesktop.org/alexfanqi/mesa/-/commits/wip, which fixes some mistakes in the original MR. It runs successfully with opengl games currently I tested, although it is missing disk cache capability and my cpp skills aren't really great. I am still working to polish it up and get merged. I also would really appreciate if people interested and familiar with cpp can offer me some help. |
I cannot get it to compile.
|
Can you try out https://gitlab.freedesktop.org/alexfanqi/mesa/-/tree/wip ? please make sure you use llvm 14 patched with https://reviews.llvm.org/D120001 or llvm 15+. I also feel this is not a llvm orcjit issue, but an issue of mesa llvmpipe that it should transition into orcjit from mcjit. Maybe should move discussion somewhere else? but I am not sure a better place. |
../src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp: In function ‘LLVMOpaqueError* {anonymous}::module_transform(void*, LLVMModuleRef)’:
../src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp:130:30: error: ‘LPJit’ was not declared in this scope
130 | LLVMTargetMachineRef tm = LPJit->get_instance()->tm;
| ^~~~~
|
@andreas-schwab Can you try again with the wip branch? I have pushed fix and updated with latest upstream. |
Please take this discussion thread elsewhere, it's about Mesa development not LLVM development |
Running the testsuite of perl-OpenGL, the test is hanging in an infinite loop inside JIT code. In the JIT code, all subroutine calls are turned into a
auipc ra,0; jalr ra
sequence, so the actual subroutine addresses are not properly resolved.This is the start of the JIT code generated by llvmpipe of Mesa (called by llvm_pipeline_generic):
The text was updated successfully, but these errors were encountered: