VOOZH about

URL: https://qiita.com/syoyo/items/03348e5c55a93e69714e

⇱ Ubuntu 18.04 + apt clang 8.0.1 で hipify-clang をビルドする #hipify-clang - Qiita


👁 Image
2

Go to list of users who liked

1

Share on X(Twitter)

Share on Facebook

Add to Hatena Bookmark

More than 5 years have passed since last update.

@syoyo(Syoyo Fujita)

Ubuntu 18.04 + apt clang 8.0.1 で hipify-clang をビルドする

2
Last updated at Posted at 2019-05-09

hipify-clang は, CUDA コードを HIP に変換するユーティリティです.

hipify-perl は ROCm の apt パッケージ(or HIP apt パッケージ?)で入りますが, C++ 構文レベルでの変換に対応してより確実に変換できる(はず)の hipify-clang を使ってみたいですが, hipify-clang は prebuilt バイナリがありません.

hipify-clang のビルドには LLVM+Clang が必要になります.

によると, 2019 年 5 月 9 日時点では LLVM+Clang 8.0.0 との組み合わせが最新 stable です.

ソースからビルドするのは面倒なので, llvm+clng を apt で入れます.

にあるように key を入れて, /etc/sources.list あたりに clang8 の deb list を追加します.

$ sudo apt update
$ sudo apt install clang-8 clang-8-dev

2019 年 5 月 9 日時点では 8.0.1 がインストールされました.
clang-8-dev を入れないとヘッダーファイルが入らないので忘れないようにしましょう.

あとは hipify-clang のドキュメントにあるようにしてビルドします.

cd hipify-clang
mkdir build dist
cd build

cmake \
 -DCMAKE_INSTALL_PREFIX=../dist \
 -DCMAKE_BUILD_TYPE=Release \
 ..

make -j install
2

Go to list of users who liked

1
0

Go to list of comments

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2

Go to list of users who liked

1