From ff8e28434376f8819f66589dd1c9c8172eabb6cb Mon Sep 17 00:00:00 2001 From: Evgeny Mankov Date: Tue, 3 Oct 2023 16:32:19 +0200 Subject: [PATCH] [HIPIFY][doc] LLVM 17.0.2 is the latest supported LLVM release + No patches are needed + Updated README.md accordingly + Tested on Windows 10 and Ubuntu 21.10 --- docs/hipify-clang.md | 59 ++++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/docs/hipify-clang.md b/docs/hipify-clang.md index 36be69c0..2c1a124f 100644 --- a/docs/hipify-clang.md +++ b/docs/hipify-clang.md @@ -21,7 +21,7 @@ After applying all the matchers, the output HIP source is produced. `hipify-clang` requires: -1. [**LLVM+CLANG**](http://releases.llvm.org) of at least version [4.0.0](http://releases.llvm.org/download.html#4.0.0); the latest stable and recommended release: [**17.0.1**](https://github.com/llvm/llvm-project/releases/tag/llvmorg-17.0.1). +1. [**LLVM+CLANG**](http://releases.llvm.org) of at least version [4.0.0](http://releases.llvm.org/download.html#4.0.0); the latest stable and recommended release: [**17.0.2**](https://github.com/llvm/llvm-project/releases/tag/llvmorg-17.0.2). 2. [**CUDA**](https://developer.nvidia.com/cuda-downloads) of at least version [8.0](https://developer.nvidia.com/cuda-80-ga2-download-archive), the latest supported version is [**12.2.2**](https://developer.nvidia.com/cuda-downloads). @@ -174,7 +174,8 @@ After applying all the matchers, the output HIP source is produced. + - 17.0.1 + 17.0.1, + 17.0.2 12.2.2 LATEST STABLE CONFIG @@ -196,7 +197,7 @@ After applying all the matchers, the output HIP source is produced. In most cases, you can get a suitable version of `LLVM+CLANG` with your package manager. Failing that or having multiple versions of `LLVM`, you can [download a release archive](http://releases.llvm.org/), build or install it, and set -[CMAKE_PREFIX_PATH](https://cmake.org/cmake/help/v3.5/variable/CMAKE_PREFIX_PATH.html) so `cmake` can find it; for instance: `-DCMAKE_PREFIX_PATH=d:\LLVM\17.0.1\dist` +[CMAKE_PREFIX_PATH](https://cmake.org/cmake/help/v3.5/variable/CMAKE_PREFIX_PATH.html) so `cmake` can find it; for instance: `-DCMAKE_PREFIX_PATH=d:\LLVM\17.0.2\dist` ### hipify-clang: usage @@ -296,7 +297,7 @@ Run `Visual Studio 16 2019`, open the generated `LLVM.sln`, build all, and build **LLVM >= 10.0.0:** -1. download [`LLVM project`](https://github.com/llvm/llvm-project/releases/tag/llvmorg-17.0.1) sources; +1. download [`LLVM project`](https://github.com/llvm/llvm-project/releases/tag/llvmorg-17.0.2) sources; 2. build [`LLVM project`](http://llvm.org/docs/CMake.html): ```bash @@ -363,21 +364,21 @@ Run `Visual Studio 17 2022`, open the generated `LLVM.sln`, build all, build pro * Install `lit` into `python`: - - ***Linux***: `python /usr/llvm/17.0.1/llvm-project/llvm/utils/lit/setup.py install` + - ***Linux***: `python /usr/llvm/17.0.2/llvm-project/llvm/utils/lit/setup.py install` - - ***Windows***: `python d:/LLVM/17.0.1/llvm-project/llvm/utils/lit/setup.py install` + - ***Windows***: `python d:/LLVM/17.0.2/llvm-project/llvm/utils/lit/setup.py install` * Starting with LLVM 6.0.1 path to `llvm-lit` python script should be specified by the `LLVM_EXTERNAL_LIT` option: - - ***Linux***: `-DLLVM_EXTERNAL_LIT=/usr/llvm/17.0.1/build/bin/llvm-lit` + - ***Linux***: `-DLLVM_EXTERNAL_LIT=/usr/llvm/17.0.2/build/bin/llvm-lit` - - ***Windows***: `-DLLVM_EXTERNAL_LIT=d:/LLVM/17.0.1/build/Release/bin/llvm-lit.py` + - ***Windows***: `-DLLVM_EXTERNAL_LIT=d:/LLVM/17.0.2/build/Release/bin/llvm-lit.py` * `FileCheck`: - - ***Linux***: copy from `/usr/llvm/17.0.1/build/bin/` to `CMAKE_INSTALL_PREFIX/dist/bin` + - ***Linux***: copy from `/usr/llvm/17.0.2/build/bin/` to `CMAKE_INSTALL_PREFIX/dist/bin` - - ***Windows***: copy from `d:/LLVM/17.0.1/build/Release/bin` to `CMAKE_INSTALL_PREFIX/dist/bin` + - ***Windows***: copy from `d:/LLVM/17.0.2/build/Release/bin` to `CMAKE_INSTALL_PREFIX/dist/bin` - Or specify the path to `FileCheck` in `CMAKE_INSTALL_PREFIX` option @@ -399,9 +400,9 @@ Ubuntu 14: LLVM 4.0.0 - 7.1.0, CUDA 7.0 - 9.0, cuDNN 5.0.5 - 7.6.5 Ubuntu 16-18: LLVM 8.0.0 - 14.0.6, CUDA 8.0 - 10.2, cuDNN 5.1.10 - 8.0.5 -Ubuntu 20-21: LLVM 9.0.0 - 17.0.1, CUDA 8.0 - 12.2.2, cuDNN 5.1.10 - 8.9.5 +Ubuntu 20-21: LLVM 9.0.0 - 17.0.2, CUDA 8.0 - 12.2.2, cuDNN 5.1.10 - 8.9.5 -Ubuntu 22: LLVM 13.0.0 - 17.0.1, CUDA 10.0 - 12.2.2, cuDNN 8.0.5 - 8.9.5 +Ubuntu 22: LLVM 13.0.0 - 17.0.2, CUDA 10.0 - 12.2.2, cuDNN 8.0.5 - 8.9.5 Minimum build system requirements for the above configurations: @@ -418,11 +419,11 @@ cmake -DHIPIFY_CLANG_TESTS=ON \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=../dist \ - -DCMAKE_PREFIX_PATH=/usr/llvm/17.0.1/dist \ + -DCMAKE_PREFIX_PATH=/usr/llvm/17.0.2/dist \ -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda \ -DCUDA_DNN_ROOT_DIR=/usr/local/cuda \ -DCUDA_CUB_ROOT_DIR=/usr/CUB \ - -DLLVM_EXTERNAL_LIT=/usr/llvm/17.0.1/build/bin/llvm-lit \ + -DLLVM_EXTERNAL_LIT=/usr/llvm/17.0.2/build/bin/llvm-lit \ ../hipify ``` @@ -442,14 +443,14 @@ cmake -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11") --- Found LLVM 17.0.1: --- - CMake module path: /usr/llvm/17.0.1/dist/lib/cmake/llvm --- - Include path : /usr/llvm/17.0.1/dist/include --- - Binary path : /usr/llvm/17.0.1/dist/bin +-- Found LLVM 17.0.2: +-- - CMake module path: /usr/llvm/17.0.2/dist/lib/cmake/llvm +-- - Include path : /usr/llvm/17.0.2/dist/include +-- - Binary path : /usr/llvm/17.0.2/dist/bin -- Linker detection: GNU ld -- Found PythonInterp: /usr/bin/python (found suitable version "3.9.7", minimum required is "2.7") -- Found lit: /usr/local/bin/lit --- Found FileCheck: /usr/llvm/17.0.1/dist/bin/FileCheck +-- Found FileCheck: /usr/llvm/17.0.2/dist/bin/FileCheck -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD @@ -470,7 +471,7 @@ make test-hipify Running HIPify regression tests ======================================== CUDA 12.2 - will be used for testing -LLVM 17.0.1 - will be used for testing +LLVM 17.0.2 - will be used for testing x86_64 - Platform architecture Linux 5.13.0-21-generic - Platform OS 64 - hipify-clang binary bitness @@ -589,14 +590,14 @@ Testing Time: 7.90s | 14.0.0 - 14.0.6 | 7.0 - 11.7.1 | 8.0.5 - 8.4.1 | 2017.15.9.57*, 2019.16.11.17, 2022.17.2.6 | 3.24.0 | 3.10.6 | | 15.0.0 - 15.0.7 | 7.0 - 11.8.0 | 8.0.5 - 8.8.1 | 2019.16.11.25, 2022.17.5.2 | 3.26.0 | 3.11.2 | | 16.0.0 - 16.0.6 | 7.0 - 12.2.2 | 8.0.5 - 8.9.5 | 2019.16.11.29, 2022.17.7.1 | 3.27.3 | 3.11.4 | -| 17.0.1** | 7.0 - 12.2.2 | 8.0.5 - 8.9.5 | 2019.16.11.30, 2022.17.7.4 | 3.27.6 | 3.11.5 | +| 17.0.1** 17.0.2 | 7.0 - 12.2.2 | 8.0.5 - 8.9.5 | 2019.16.11.30, 2022.17.7.4 | 3.27.6 | 3.11.5 | | 18.0.0git | 7.0 - 12.2.2 | 8.0.5 - 8.9.5 | 2019.16.11.30, 2022.17.7.4 | 3.27.6 | 3.11.5 | `*` LLVM 14.x.x is the latest major release supporting Visual Studio 2017. To build LLVM 14.x.x correctly by Visual Studio 2017, `-DLLVM_FORCE_USE_OLD_TOOLCHAIN=ON` should be added to a corresponding cmake command line. LLVM < 14.x.x can be built correctly by Visual Studio 2017 without the `LLVM_FORCE_USE_OLD_TOOLCHAIN` option. -`**` Note that LLVM 17.0.0 was withdrawn due to an issue, please use 17.0.1 instead. +`**` Note that LLVM 17.0.0 was withdrawn due to an issue, please use 17.0.1 or newer instead. *Building with testing support by `Visual Studio 17 2022` on `Windows 10`:* @@ -608,23 +609,23 @@ cmake -DHIPIFY_CLANG_TESTS=ON \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=../dist \ - -DCMAKE_PREFIX_PATH=d:/LLVM/17.0.1/dist \ + -DCMAKE_PREFIX_PATH=d:/LLVM/17.0.2/dist \ -DCUDA_TOOLKIT_ROOT_DIR="c:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.2" \ -DCUDA_SDK_ROOT_DIR="c:/ProgramData/NVIDIA Corporation/CUDA Samples/v12.2" \ -DCUDA_DNN_ROOT_DIR=d:/CUDNN/cudnn-12.2-windows-x64-v8.9.5 \ -DCUDA_CUB_ROOT_DIR=d:/GIT/cub \ - -DLLVM_EXTERNAL_LIT=d:/LLVM/17.0.1/build/Release/bin/llvm-lit.py \ + -DLLVM_EXTERNAL_LIT=d:/LLVM/17.0.2/build/Release/bin/llvm-lit.py \ ../hipify ``` *A corresponding successful output:* ```shell --- Found LLVM 17.0.1: --- - CMake module path: d:/LLVM/17.0.1/dist/lib/cmake/llvm --- - Include path : d:/LLVM/17.0.1/dist/include --- - Binary path : d:/LLVM/17.0.1/dist/bin +-- Found LLVM 17.0.2: +-- - CMake module path: d:/LLVM/17.0.2/dist/lib/cmake/llvm +-- - Include path : d:/LLVM/17.0.2/dist/include +-- - Binary path : d:/LLVM/17.0.2/dist/bin -- Found PythonInterp: c:/Program Files/Python311/python.exe (found suitable version "3.11.5", minimum required is "3.6") -- Found lit: c:/Program Files/Python311/Scripts/lit.exe --- Found FileCheck: d:/LLVM/17.0.1/dist/bin/FileCheck.exe +-- Found FileCheck: d:/LLVM/17.0.2/dist/bin/FileCheck.exe -- Found CUDA: c:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.2 (found version "12.2") -- Configuring done -- Generating done