Use this tag for questions about llvmlite, a lightweight LLVM python binding for writing JIT compilers
Questions tagged [llvmlite]
59 questions
0
votes
0 answers
How to resolve: "ContextualVersionConflict" on Python?
I was trying to run scanpy's neighbors function with my genes expression dataset:
import scanpy as sc
sc.pp.pca(adata)
sc.pp.neighbors(adata)
and got this error:
C:\Users\User\anaconda3\lib\site-packages\numba\core\cpu.py:77: UserWarning: Numba…

Ofir Shorer
- 446
- 1
- 6
- 16
0
votes
2 answers
Can't install resampy
Ubuntu 20.04.2
I am using python2.7 in a virtualenv (because the program I'm trying to build doesn't work with my 3.8)
pip 20.3.4
The program I'm trying to run (involves tensorflow) comes with a file with all the things needed to install (I think…

filifunk
- 543
- 1
- 6
- 18
0
votes
1 answer
Linking to external functions in dynamic libraries with LLVM
In my project, I am emitting LLVM IR which makes calls to external functions in dynamic libraries.
I declare my external functions like:
declare %"my_type"* @"my_function"()
In the external library, functions are declared like:
extern "C" {
…

trbabb
- 1,894
- 18
- 35
0
votes
0 answers
From LLVM, how can I determine the architecture's maximum alignment?
I have cases where I need to alloca space for an object with size, layout, and alignment that is unknown at compile time. These values are accessible at runtime, but as far as I can tell, the align attribute on an alloca instruction must be…

trbabb
- 1,894
- 18
- 35
0
votes
0 answers
llvmlite landingpad throw RuntimeError:LandingPadInst needs to be in a function with a personality?
I use llvmlite to translate try ... except ..., when I use function landingpad, it can generate IR, but throw an error when verifying it, I already search docs about this, I find it was moved(https://github.com/numba/llvmlite/pull/156), I can't…

qinyao
- 11
- 3
0
votes
0 answers
ModuleNotFoundError: No module named 'pandas_profiling' after pip install
I have tried to install pandas profiling using pip in a Jupyter notebook with python 3.6.
I get the following output for all install attempts I have tried:
install output:
I have tried:
!pip install pandas-profiling
!pip install…

Kevin
- 1
- 1
0
votes
0 answers
Error in installing Turi Create on Windows
I am using Windows 10 and run Jupyter Notebook on Anaconda. At first I wanted to install Turi Create on Anaconda but failed to do so. Then I started installing Turi Create through WSL using Ubuntu. But after running the command $pip install…

Rishad Islam
- 1
- 1
0
votes
1 answer
llvmlite-0.31.0 - OSError: Could not load shared object file: libllvmlite.so
I am using the wheel files of numba-0.48.0 and llvmlite-0.31.0 downloaded from PyPi for Python 3.6. as I am trying to execute it via AWS Glue Python Shell Job. When I execute the job, I get the following error:
"Could not load shared object file:…

seou1
- 446
- 1
- 5
- 21
0
votes
1 answer
AssertionError while declaring function which returns void in llvmlite
I am trying to create a function which returns void in llvm-ir but a creation of such function gives AssertionError
import llvmlite.ir as ir
int32 = ir.IntType(32)
m = ir.Module('demo')
main_ty = ir.FunctionType(int32, [])
main_fn = ir.Function(m,…

Jayendra Parmar
- 702
- 12
- 30
0
votes
2 answers
Using CPU instruction directly from Numba
I would like to use my CPU's builtin instructions from within Numba compiled functions, but am having trouble figuring out how to reference them. For example, the popcnt instruction from the SSE4 instruction set, I can confirm I have it using…

Sam Ragusa
- 422
- 3
- 13
0
votes
1 answer
Why there is no difference when i change the level of optimizaition in llvmlite?
I am trying to use optimization passes of llvmlite for my own program. I have defined the following function for my code as pass function:
def create_pass_manager_builder(opt=3, loop_vectorize=False, slp_vectorize=False):
pmb =…

sarah123
- 175
- 1
- 7
0
votes
2 answers
Why I encounter error: AttributeError: 'int' object has no attribute 'type'
I am using llvmlite for my project in combination with Pyvex. I have defined some functions in llvmlite like the following:
def int32(val):
return ir.Constant(ir.IntType(32), val)
def put64(putoffset, val):
llvmtmp = builder.gep(regtag,…

user3126804
- 119
- 3
- 10
0
votes
1 answer
Ctypes: DataTypes from C-definition
I have the address of a function and also its "c-like" representation (from llvmlite, but this is not that important).
For a function, which adds up two double values and returns them the code would look like this: cfunc = CFUNCTYPE(c_double,…

hr0m
- 2,643
- 5
- 28
- 39
-1
votes
2 answers
How to convert my hex address?
I have the following hex number 0x00000000004087b8 and I have to convert this to 0x4087b8 so I would be able to append it to my list. Does anyone have any Idea how can I do this conversion in python?

sarah123
- 175
- 1
- 7