[llvm-dev] Fwd: How to execute LLVM IR code generated from Python source code using numba

Mehdi AMINI via llvm-dev llvm-dev at lists.llvm.org
Mon Feb 22 15:20:47 PST 2021


Hi,

This looks like a question for the numba folks: some of the symbols here as
provided by the numba runtime.

-- 
Mehdi


On Mon, Feb 22, 2021 at 3:06 PM sangeeta chowdhary via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Any suggestions or pointers?
>
> ---------- Forwarded message ---------
> From: sangeeta chowdhary <sangitachowdhary at gmail.com>
> Date: Fri, Dec 18, 2020 at 8:34 AM
> Subject: How to execute LLVM IR code generated from Python source code
> using numba
> To: LLVM Developers Mailing List <llvm-dev at lists.llvm.org>
>
>
> Hello Everyone,
>
> I am trying to generate llvm IR from python and then execute it. I used
> numba to generate llvm IR. While linking I am getting some undefined
> references. I am not sure which python packages I need to load to resolve
> this issue. If someone can help me I would appreciate it. If there is any
> other way to get llvm IR from python, please let me know.
>
> #   numba test.py --dump-llvm > test.ll
> # llvm-as test.ll –o test.bc
>
> # llc test.bc -filetype=obj -o test.c.o
>
> # clang -pg test.c.o -o test.o
>
> test.ll:(.text+0x631): undefined reference to `numba_gil_ensure'
>
> test.ll:(.text+0x643): undefined reference to `numba_unpickle'
>
> test.ll:(.text+0x64e): undefined reference to `PyObject_Str'
>
> test.ll:(.text+0x659): undefined reference to `PyUnicode_AsUTF8'
>
> test.ll:(.text+0x668): undefined reference to `PySys_WriteStdout'
>
> test.ll:(.text+0x670): undefined reference to `Py_DecRef'
>
> test.ll:(.text+0x678): undefined reference to `Py_DecRef'
>
> test.ll:(.text+0x684): undefined reference to `PySys_WriteStdout'
>
>
> Regards,
>
> Sangeeta
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210222/a5244ad8/attachment.html>


More information about the llvm-dev mailing list