Sunday, March 2, 2014

Installation Halide on Fedora

Before installing Halide, we need to install llvm and clang first. On fedora, it seems easy for us to install those two packages. Actually, you might find llvm-config is missing although the command “sudo yum install llvm” worked. So we'd better use the following commands from Halide's documents:

1. svn co https://llvm.org/svn/llvm-project/llvm/branches/release_32 llvm3.2
2. svn co https://llvm.org/svn/llvm-project/cfe/branches/release_32 llvm3.2/tools/clang
3. cd llvm3.2
4. ./configure --enable-optimized --enable-assertions --with-clang --enable-targets=x86,arm,nvptx
5. make -j8
6. edit the Makefile in Halide 
  • export LLVM_CONFIG=<path to llvm>/Release+Asserts/bin/llvm-config
  • export CLANG=<path to llvm>/Release+Asserts/bin/clang
7. cd Halide
8. make
9. make distrib

distrib
|-- halide.tgz
|-- include
|   |-- Halide.h
|   `-- HalideRuntime.h
`-- lib
    |-- libHalide.a
    `-- libHalide.so

You can find all you need from "distrib" directory!

No comments:

Post a Comment