-
Notifications
You must be signed in to change notification settings - Fork 319
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
Wrap LLD into python #898
base: main
Are you sure you want to change the base?
Wrap LLD into python #898
Conversation
This fixes the following link errors: .../miniconda3/envs/build/conda-bld/lld_1542237425154/_build_env/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: ../../lib/liblldCOFF.a(MapFile.cpp.o):(.data.rel.ro._ZTIN4llvm13format_objectIJmmmEEE[_ZTIN4llvm13format_objectIJmmmEEE]+0x10): undefined reference to `typeinfo for llvm::format_object_base'
For now we just call lld::elf::link.
This is a temporary workaround to get it working. We have to figure out how to obtain these automatically.
Many thanks for opening this PR! |
@esc damn, can you rerun the tests? One of them had an http error while doing a conda install. |
done |
sick, thank you! |
Thank you for preparing those changes. It is a great addition. What is the state of this PR? Do you think it can be merged soon? |
@PrimozGodec the state is: pending on review and scheduled for inclusion in the 0.43 release of llvmlite. If you want, feel free to test this and add a review in case you discover any snags or comment with: "works for me" if no snags are to be found. |
If you decide to try it out, remember to run |
btw, changed my GH name so my old @ isn't formatted anymore. |
Unfortunately we couldn't find a reviewer for this, so it has been punted to the 0.44 release. |
damn, that's a bummer :( Just tell me if there is anything I can do to make it easier when you do find a reviewer. Good luck with the next release! |
[Not a reviewer] Thanks for this PR! In Numba side, I often have an issue: when using typed.dict or typed.list, currently numba compiles a C-version of them as the underlying implementation. Then when users call a method of these types in jit-ed code, the actual call chain is: So the issue is when calling into the c impl, runtime has to create a call frame for c func, but sometimes the c func is so small, then the creation of call frame becomes the performance bottleneck. A more concrete example can be found: numba/numba#9520 (comment). I wonder if this PR can help solve the issue fundamentally? ex: compiling and linking the C code as a LLVM IR module, then enable further optimizations, e.g., inlining, vectorization. I am not sure if what I want is another feature, not this PR. |
This PR wont work with the conda-forge version of the llvm-dev. It only works with the one on the numba channel because the one on the numba channel includes lld. Using another lld package on conda (for the llvm16 tests only) caused another problem it seems. I can try to work to fix this, but it might be easier to just put out a llvm-dev release for llvm16 on the conda channel. I'll work towards getting to work with a separately installed lld package for the llvm16 tests. Could take me a minute because my linux install is acting really goofy since updating it. At some point I'll reinstall linux but I'll just deal with the annoyances for now. |
I believe this may have worked for me in the past, altho I'm not sure if its still necessary.
Based on: Add dependency on LLD, wrap it into python
todo:
.binding.lld
module with functions for each platform lld supportsitems remaining in the original PR
(all non-required items are going to be checked off)
I will update you as I complete items.