pytorch / glow

Compiler for Neural Network hardware accelerators

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Where Glow invokes llvm ?

Theoo1997 opened this issue · comments

Hi,
I am working with Glow and I would like to know :

  1. Where the compiler invokes llvm to compile the llvm IR into the target platform.
  2. I also wont to see the llvm passes of the above step like "optimization_level = -O2", etc.
  3. And print the llvm IR.

Hi Theo,
You can use these options in the model-compiler.

  • use the option "--dump-ir" to get the LLVM IR
  • use the option "--target=ARCHITECTURE" - to set the target.

To get the target ARCHITECTURE list from your LLVM,

  • use "llvm-objdump -version"

Hi Theo, You can use these options in the model-compiler.

  • use the option "--dump-ir" to get the LLVM IR
  • use the option "--target=ARCHITECTURE" - to set the target.

To get the target ARCHITECTURE list from your LLVM,

  • use "llvm-objdump -version"

Thank you for your response. About the "llvm passes" that I wont to find and it was mentioned above is the exact options that glow gives to the llvm to create the ".o" file . For example :

  1. Optimization_level=02
  2. loop_unrolling=true
  3. e.t.c

I can see that this part (in https://github.com/pytorch/glow/blob/master/lib/LLVMIRCodeGen/BundleSaver.cpp) saves the .o file but I can't find the llvm passes to create this object file.
image