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
I want to get Numba IR detail of the function in other libraries #8516
Comments
The output you're seeing in the image is not NUMBA or LLVM IR, but the python bytecode. To use Numba, you must annotate the function with the Once you have installed Numba, you can get the LLVM IR by defining the NUMBA_DUMP_OPTIMIZED=1` flag. Or programatically: from numba import njit
@njit
def test1(a, b):
return a + b
# first call test1
test1(2, 3)
# get the llvm ir:
print(test1.inspect_llvm(test1.signatures[0])) To better answer your question, are you looking for something specific in Numba? |
Oh, thank you, that is really helpful. |
I come back again...... |
Hi @Lost-little-dinosaur, not all Python code is supported in Numba. See this section in the docs. For the code you're displaying in this image, Numba will not be able to produce an LLVM IR. |
OK, thank you for your reply |
Hi!
I want to translate my python3 code into LLVM IR, I find out from the official document that I should translate it into Numba IR, then translate it into LLVM IR by llvmlite.
Like the code in the red box below, I succeeded to translate it into Numba IR,but when I try to Call functions in other libraries like np.array, Numba can't give me the detail of this function.
I have already ask about this function in the Numba room and nobody anwser me, and I can't find it in the official document, so I have to ask this question here. If Numba has already finish this function, please accept my apology and tell me where can I find it, if you can't do that for a while, pleace tell me where I can find this kind of function, I will be very greatful too
The text was updated successfully, but these errors were encountered: