Questions tagged [llvmlite]

Use this tag for questions about llvmlite, a lightweight LLVM python binding for writing JIT compilers

59 questions
2
votes
0 answers

if i want to create a language with llvmlite, how to implement a socket?

I already know how to write Lexer and Parser。 If I want this programming language to communicate, how can I implement socket?
Deng Chord
  • 21
  • 2
2
votes
1 answer

LLVMLITE Hello World Example Produces Wrong Output

The problem I am faced with regards to llvmlite is producing a simple hello world example. I am unable to display the string global variable value in the function I created. It appears to always print out the number one. I have already tried to…
seansanders
  • 95
  • 10
2
votes
0 answers

LLVM IR: expose variables to GDB?

I am writing a custom programming language. I am generating LLVM IR as an intermediate (via LLVMlite), and I want to expose variables to GDB. This is an example of the generated IR: ; ModuleID = "tests/debuginfo.xan" source_filename =…
NoOneIsHere
  • 1,054
  • 16
  • 28
2
votes
2 answers

python llvmlite installtion iisue - SVML not detected

Trying to make a python script having numba 0.33.0 as dependency work on ubuntu 14.0.4. Have installed llvm 6.0 for the same and set the llvm_config variable to llvm_config location. Facing issues while building llvmlite Following is the stack…
2
votes
3 answers

How to generate code for initializing global variables with non-const values in LLVM?

In LLVM (specifically llvmlite), how does one declare a global variable and initialize its contents with the result of an arbitrary (runtime) expression? I see that I can create a GlobalVariable object, but it looks like its initializer argument is…
trbabb
  • 1,894
  • 18
  • 35
2
votes
0 answers

Aborting llvmlite code generation

I am generating llvm IR code using llvmlite and Python. I generate code for many functions inside just one given module. The problem is that when an Exception occurs, while the code is generated for one of those functions, the whole module code…
Frederic
  • 1,580
  • 15
  • 15
1
vote
1 answer

How to create dynamic char array in llvmlite?

Based on llvmlite docs I can create static array like in a code snippet bellow. ir.Constant(ir.ArrayType(ir.ArrayType(i8, STR_SIZE), ARR_SIZE), elements) But can I create dynamic array in llvmlite or convert variable above to…
1
vote
0 answers

jukebox installation: llvmlite wheel build failed

I am currently trying to install OpenAI's Jukebox codebase (https://github.com/openai/jukebox) for my bachelor FYP. Specifically, I am trying to %pip install it on a Colab notebook, following a tutorial for an alternative use of jukebox that can be…
CarloPatti
  • 31
  • 4
1
vote
0 answers

Why code gives error even though llvmlite.dl is in specified directory

from PIL import Image from rembg import remove import glob import os input = Image.open(file) output = remove(input) output.save(f"{file}.png") Why code gives error even though llvmlite.dl is in specified directory "OSError: Could not…
Bru
  • 11
  • 1
1
vote
0 answers

Why LLVM IR generated by numba for vector addition is too complex

I wanted to check the LLVM IR for a vector addition from numba and noticed it generates a lot of IR just for a simple add. I was hoping a simple "add" IR but it generates 2000 lines of LLVM IR. Is there a way to get a minimal code? from numba import…
Roy
  • 65
  • 2
  • 15
  • 40
1
vote
1 answer

Adding a new LLVM target to llvmlite

Is it possible to add a new target to llvmlite (python library)? For a new hardware (e.g. ASIC), I need to have a new and custom LLVM target. This is not very clear from the documentation. If it is not possible to add a new target in llvmlite, can I…
Roy
  • 65
  • 2
  • 15
  • 40
1
vote
0 answers

Cannot uninstall 'llvmlite'

I tried to install the modules from a requirements.txt file of a github project and it showed the following error. ERROR: Cannot uninstall 'llvmlite'. It is a distutils installed project and thus we cannot accurately determine which files belong to…
1
vote
1 answer

Installing numba on Amazon ec2 ubuntu

I would like to install the numba module onto an AWS ec2 ubuntu instance (the free tier one). Although other models seem to work, numba is having problems installing. I have pasted the error message below. I am pretty out of my league here so any…
1
vote
1 answer

error while use '' pip install torch-geometric '' ,ERROR: Failed building wheel for llvmlite

error while use '' pip install torch-geometric '' ,ERROR: Failed building wheel for llvmlite Dependence: windows VS studio 2017 python 3.5.2 tensorboard 1.8.0 absl-py 0.9.0 astor 0.8.1 bleach …
Golden_flash
  • 11
  • 1
  • 4
1
vote
1 answer

how to transpiling c to llvm in llvmlite

I want to do a runtime with llvmlite, and I would like to transpiler c to llvm. I want to know if in a way in llvmlite itself or in some python lib, I can't find it on the internet, so I came to ask you. Thank you very much in advance