Halide(release_2017_05_03) install @ubuntu16.04
åèurl
https://github.com/halide/Halide/tree/release_2017_05_03
Halideã®ãã©ã«ãã®ç´ä¸ã§llvmã¨clangããã«ããã¦ããhalideããã«ããããããã (Halideã®githubã¨ãã«ããæ¸ãã¦ãããå¥ã«ç´ä¸ã«ãããªãã¦ãããã®ã§ã¯ï¼ï¼ /opt/Halideã«ããããã¤ã³ã¹ãã¼ã«ãã¦ããã
git clone https://github.com/halide/Halide.git cd Halide git checkout release_2017_05_03 #ãã®ãã©ã«ãä¸ã§llvmã¨ãclangãã«ã
build llvm and clang
ç§ã®ç°å¢ã§ã¯ä¸è¨ã®ãã®ã追å ã§å¿ è¦ã§ããã
sudo apt install opam libxml2-dev
svn co https://llvm.org/svn/llvm-project/llvm/branches/release_37 llvm3.7 svn co https://llvm.org/svn/llvm-project/cfe/branches/release_37 llvm3.7/tools/clang cd llvm3.7 mkdir build cd build cmake -DLLVM_ENABLE_TERMINFO=OFF -DLLVM_TARGETS_TO_BUILD="X86;ARM;NVPTX;AArch64;Mips;PowerPC" -DLLVM_ENABLE_ASSERTIONS=ON -DCMAKE_BUILD_TYPE=Release .. make -j8
ç°å¢å¤æ°ã.bashrcã¨ãã«è¿½å ãã¦ããã
export LLVM_CONFIG=/opt/Halide/llvm3.7/build/bin/llvm-config export CLANG=/opt/Halide/llvm3.7/build/bin/clang
Halide build
cd .. #halide root directoryã«ç§»å make -j8
ç°å¢å¤æ°ã諸ã 追å
export HALIDE_ROOT=/opt/Halide export LD_LIBRARY_PATH="/opt/Halide/include:/opt/Halide/bin:$LD_LIBRARY_PATH"
ã¤ã³ã¹ãã¼ã«æå確èª
# ç°å¢å¤æ°èªã¿è¾¼ãã§ldconfigã¨ããã¦ãã(tutorialå®è¡ã ããªããããªãï¼ cd tutorial g++ lesson_01*.cpp -g -I ../include -L ../bin -lHalide -lpthread -ldl -o lesson_01 -std=c++11 LD_LIBRATY_PATH=../bin ./lesson_01
ä¸è¨ãå®è¡ãã¦Success!ã¨ã§ãã°OK