8
8
hipify-clang
9
9
**************************************************************************
10
10
11
- ``hipify-clang `` is a Clang-based tool for translating CUDA sources into HIP sources.
11
+ ``hipify-clang `` is a Clang-based tool for translating NVIDIA CUDA sources into HIP sources.
12
12
13
13
It translates CUDA source into an Abstract Syntax Tree (AST), which is traversed by transformation
14
14
matchers. After applying all the matchers, the output HIP source is produced.
@@ -37,7 +37,7 @@ Dependencies
37
37
38
38
* `LLVM+Clang <http://releases.llvm.org >`_ of at least version
39
39
`4.0.0 <http://releases.llvm.org/download.html#4.0.0 >`_; the latest stable and recommended release:
40
- `18.1.5 <https://github.com/llvm/llvm-project/releases/tag/llvmorg-18.1.5 >`_.
40
+ `18.1.6 <https://github.com/llvm/llvm-project/releases/tag/llvmorg-18.1.6 >`_.
41
41
42
42
* `CUDA <https://developer.nvidia.com/cuda-downloads >`_ of at least version
43
43
`7.0 <https://developer.nvidia.com/cuda-toolkit-70 >`_, the latest supported version is
@@ -177,7 +177,8 @@ Dependencies
177
177
`18.1.2 <https://github.com/llvm/llvm-project/releases/tag/llvmorg-18.1.2 >`_,
178
178
`18.1.3 <https://github.com/llvm/llvm-project/releases/tag/llvmorg-18.1.3 >`_,
179
179
`18.1.4 <https://github.com/llvm/llvm-project/releases/tag/llvmorg-18.1.4 >`_,
180
- `18.1.5 <https://github.com/llvm/llvm-project/releases/tag/llvmorg-18.1.5 >`_ :sup: `4`
180
+ `18.1.5 <https://github.com/llvm/llvm-project/releases/tag/llvmorg-18.1.5 >`_,
181
+ `18.1.6 <https://github.com/llvm/llvm-project/releases/tag/llvmorg-18.1.6 >`_ :sup: `4`
181
182
- `12.3.2 <https://developer.nvidia.com/cuda-downloads >`_ :sup: `4`
182
183
- **Latest stable config **
183
184
- **Latest stable config **
@@ -224,7 +225,7 @@ Dependencies
224
225
In most cases, you can get a suitable version of ``LLVM+Clang `` with your package manager. However, you can also
225
226
`download a release archive <http://releases.llvm.org/ >`_ and build or install it. In case of multiple versions of ``LLVM `` installed, set
226
227
`CMAKE_PREFIX_PATH <https://cmake.org/cmake/help/latest/variable/CMAKE_PREFIX_PATH.html >`_ so that
227
- ``CMake `` can find the desired version of ``LLVM ``. For example, ``-DCMAKE_PREFIX_PATH=D:\LLVM\18.1.5 \dist ``.
228
+ ``CMake `` can find the desired version of ``LLVM ``. For example, ``-DCMAKE_PREFIX_PATH=D:\LLVM\18.1.6 \dist ``.
228
229
229
230
Usage
230
231
============================================================
@@ -257,7 +258,7 @@ header files used during the hipification process:
257
258
258
259
.. code :: shell
259
260
260
- ./hipify-clang square.cu --cuda-path=/usr/local/cuda-12.3 --clang-resource-directory=/usr/llvm/18.1.5 /dist/lib/clang/18
261
+ ./hipify-clang square.cu --cuda-path=/usr/local/cuda-12.3 --clang-resource-directory=/usr/llvm/18.1.6 /dist/lib/clang/18
261
262
262
263
For more information, refer to the `Clang manual for compiling CUDA <https://llvm.org/docs/CompileCudaWithLLVM.html#compiling-cuda-code >`_.
263
264
@@ -394,7 +395,7 @@ To ensure LLVM being found or in case of multiple LLVM instances, specify the pa
394
395
395
396
.. code-block :: bash
396
397
397
- -DCMAKE_PREFIX_PATH=/usr/llvm/18.1.5 /dist
398
+ -DCMAKE_PREFIX_PATH=/usr/llvm/18.1.6 /dist
398
399
399
400
On Windows, specify the following option for CMake in the first place:
400
401
``-G "Visual Studio 17 2022" ``.
@@ -468,7 +469,7 @@ LLVM <= 9.0.1
468
469
LLVM >= 10.0.0
469
470
-----------------
470
471
471
- 1. Download `LLVM project <https://github.com/llvm/llvm-project/releases/tag/llvmorg-18.1.5 >`_ sources.
472
+ 1. Download `LLVM project <https://github.com/llvm/llvm-project/releases/tag/llvmorg-18.1.6 >`_ sources.
472
473
473
474
2. Build `LLVM project <http://llvm.org/docs/CMake.html >`_:
474
475
@@ -570,13 +571,13 @@ LLVM >= 10.0.0
570
571
571
572
.. code-block :: bash
572
573
573
- python /usr/llvm/18.1.5 /llvm-project/llvm/utils/lit/setup.py install
574
+ python /usr/llvm/18.1.6 /llvm-project/llvm/utils/lit/setup.py install
574
575
575
576
**Windows **:
576
577
577
578
.. code-block :: shell
578
579
579
- python D:/LLVM/18.1.5 /llvm-project/llvm/utils/lit/setup.py install
580
+ python D:/LLVM/18.1.6 /llvm-project/llvm/utils/lit/setup.py install
580
581
581
582
In case of errors similar to ``ModuleNotFoundError: No module named 'setuptools' ``, upgrade the ``setuptools `` package:
582
583
@@ -590,23 +591,23 @@ LLVM >= 10.0.0
590
591
591
592
.. code-block :: bash
592
593
593
- -DLLVM_EXTERNAL_LIT=/usr/llvm/18.1.5 /build/bin/llvm-lit
594
+ -DLLVM_EXTERNAL_LIT=/usr/llvm/18.1.6 /build/bin/llvm-lit
594
595
595
596
**Windows **:
596
597
597
598
.. code-block :: shell
598
599
599
- -DLLVM_EXTERNAL_LIT=D:/LLVM/18.1.5 /build/Release/bin/llvm-lit.py
600
+ -DLLVM_EXTERNAL_LIT=D:/LLVM/18.1.6 /build/Release/bin/llvm-lit.py
600
601
601
602
* ``FileCheck ``:
602
603
603
604
**Linux **:
604
605
605
- Copy from ``/usr/llvm/18.1.5 /build/bin/ `` to ``CMAKE_INSTALL_PREFIX/dist/bin ``.
606
+ Copy from ``/usr/llvm/18.1.6 /build/bin/ `` to ``CMAKE_INSTALL_PREFIX/dist/bin ``.
606
607
607
608
**Windows **:
608
609
609
- Copy from ``D:/LLVM/18.1.5 /build/Release/bin `` to ``CMAKE_INSTALL_PREFIX/dist/bin ``.
610
+ Copy from ``D:/LLVM/18.1.6 /build/Release/bin `` to ``CMAKE_INSTALL_PREFIX/dist/bin ``.
610
611
611
612
Alternatively, specify the path to ``FileCheck `` in the ``CMAKE_INSTALL_PREFIX `` option.
612
613
@@ -633,8 +634,8 @@ On Linux, the following configurations are tested:
633
634
634
635
* Ubuntu 14: LLVM 4.0.0 - 7.1.0, CUDA 7.0 - 9.0, cuDNN 5.0.5 - 7.6.5
635
636
* Ubuntu 16-19: LLVM 8.0.0 - 14.0.6, CUDA 7.0 - 10.2, cuDNN 5.1.10 - 8.0.5
636
- * Ubuntu 20-21: LLVM 9.0.0 - 18.1.5 , CUDA 7.0 - 12.3.2, cuDNN 5.1.10 - 9.1.1
637
- * Ubuntu 22-23: LLVM 13.0.0 - 18.1.5 , CUDA 7.0 - 12.3.2, cuDNN 8.0.5 - 9.1.1
637
+ * Ubuntu 20-21: LLVM 9.0.0 - 18.1.6 , CUDA 7.0 - 12.3.2, cuDNN 5.1.10 - 9.1.1
638
+ * Ubuntu 22-23: LLVM 13.0.0 - 18.1.6 , CUDA 7.0 - 12.3.2, cuDNN 8.0.5 - 9.1.1
638
639
639
640
Minimum build system requirements for the above configurations:
640
641
@@ -652,11 +653,11 @@ Here's how to build ``hipify-clang`` with testing support on ``Ubuntu 23.10.01``
652
653
-DHIPIFY_CLANG_TESTS=ON \
653
654
-DCMAKE_BUILD_TYPE=Release \
654
655
-DCMAKE_INSTALL_PREFIX=../dist \
655
- -DCMAKE_PREFIX_PATH=/usr/llvm/18.1.5 /dist \
656
+ -DCMAKE_PREFIX_PATH=/usr/llvm/18.1.6 /dist \
656
657
-DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-12.3.2 \
657
658
-DCUDA_DNN_ROOT_DIR=/usr/local/cudnn-9.1.1 \
658
659
-DCUDA_CUB_ROOT_DIR=/usr/local/cub-2.1.0 \
659
- -DLLVM_EXTERNAL_LIT=/usr/llvm/18.1.5 /build/bin/llvm-lit \
660
+ -DLLVM_EXTERNAL_LIT=/usr/llvm/18.1.6 /build/bin/llvm-lit \
660
661
../hipify
661
662
662
663
The corresponding successful output is:
@@ -680,11 +681,11 @@ The corresponding successful output is:
680
681
-- - Test hipify-clang : ON
681
682
-- - Is part of HIP SDK : OFF
682
683
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version " 1.2.13" )
683
- -- Found LLVM 18.1.5 :
684
- -- - CMake module path : /usr/llvm/18.1.5 /dist/lib/cmake/llvm
685
- -- - Clang include path : /usr/llvm/18.1.5 /dist/include
686
- -- - LLVM Include path : /usr/llvm/18.1.5 /dist/include
687
- -- - Binary path : /usr/llvm/18.1.5 /dist/bin
684
+ -- Found LLVM 18.1.6 :
685
+ -- - CMake module path : /usr/llvm/18.1.6 /dist/lib/cmake/llvm
686
+ -- - Clang include path : /usr/llvm/18.1.6 /dist/include
687
+ -- - LLVM Include path : /usr/llvm/18.1.6 /dist/include
688
+ -- - Binary path : /usr/llvm/18.1.6 /dist/bin
688
689
-- Linker detection: GNU ld
689
690
-- ---- The below configuring for hipify-clang testing only ----
690
691
-- Found Python: /usr/bin/python3.12 (found version " 3.12.3" ) found components: Interpreter
@@ -719,7 +720,7 @@ The corresponding successful output is:
719
720
Running HIPify regression tests
720
721
===============================================================
721
722
CUDA 12.3.107 - will be used for testing
722
- LLVM 18.1.5 - will be used for testing
723
+ LLVM 18.1.6 - will be used for testing
723
724
x86_64 - Platform architecture
724
725
Linux 6.5.0-15-generic - Platform OS
725
726
64 - hipify-clang binary bitness
@@ -813,7 +814,7 @@ Tested configurations:
813
814
- ``2019.16.11.29, 2022.17.7.1 ``
814
815
- ``3.27.3 ``
815
816
- ``3.11.4 ``
816
- * - ``17.0.1 `` :sup: `6` - ``18.1.5 `` :sup: `7`
817
+ * - ``17.0.1 `` :sup: `6` - ``18.1.6 `` :sup: `7`
817
818
- ``7.0 - 12.3.2 ``
818
819
- ``8.0.5 - 9.1.1 ``
819
820
- ``2019.16.11.35, 2022.17.9.6 ``
@@ -849,12 +850,12 @@ Building with testing support using ``Visual Studio 17 2022`` on ``Windows 11``:
849
850
-DHIPIFY_CLANG_TESTS=ON \
850
851
-DCMAKE_BUILD_TYPE=Release \
851
852
-DCMAKE_INSTALL_PREFIX=../dist \
852
- -DCMAKE_PREFIX_PATH=D:/LLVM/18.1.5 /dist \
853
+ -DCMAKE_PREFIX_PATH=D:/LLVM/18.1.6 /dist \
853
854
-DCUDA_TOOLKIT_ROOT_DIR=" C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.3" \
854
855
-DCUDA_SDK_ROOT_DIR=" C:/ProgramData/NVIDIA Corporation/CUDA Samples/v12.3" \
855
856
-DCUDA_DNN_ROOT_DIR=D:/CUDA/cuDNN/9.1.1 \
856
857
-DCUDA_CUB_ROOT_DIR=D:/CUDA/CUB/cub-2.1.0 \
857
- -DLLVM_EXTERNAL_LIT=D:/LLVM/18.1.5 /build/Release/bin/llvm-lit.py \
858
+ -DLLVM_EXTERNAL_LIT=D:/LLVM/18.1.6 /build/Release/bin/llvm-lit.py \
858
859
../hipify
859
860
860
861
The corresponding successful output is:
@@ -878,15 +879,15 @@ The corresponding successful output is:
878
879
-- - Build hipify-clang : ON
879
880
-- - Test hipify-clang : ON
880
881
-- - Is part of HIP SDK : OFF
881
- -- Found LLVM 18.1.5 :
882
- -- - CMake module path : D:/LLVM/18.1.5 /dist/lib/cmake/llvm
883
- -- - Clang include path : D:/LLVM/18.1.5 /dist/include
884
- -- - LLVM Include path : D:/LLVM/18.1.5 /dist/include
885
- -- - Binary path : D:/LLVM/18.1.5 /dist/bin
882
+ -- Found LLVM 18.1.6 :
883
+ -- - CMake module path : D:/LLVM/18.1.6 /dist/lib/cmake/llvm
884
+ -- - Clang include path : D:/LLVM/18.1.6 /dist/include
885
+ -- - LLVM Include path : D:/LLVM/18.1.6 /dist/include
886
+ -- - Binary path : D:/LLVM/18.1.6 /dist/bin
886
887
-- ---- The below configuring for hipify-clang testing only ----
887
888
-- Found Python: C:/Users/TT/AppData/Local/Programs/Python/Python312/python.exe (found version " 3.12.3" ) found components: Interpreter
888
889
-- Found lit: C:/Users/TT/AppData/Local/Programs/Python/Python312/Scripts/lit.exe
889
- -- Found FileCheck: D:/LLVM/18.1.5 /dist/bin/FileCheck.exe
890
+ -- Found FileCheck: D:/LLVM/18.1.6 /dist/bin/FileCheck.exe
890
891
-- Initial CUDA to configure:
891
892
-- - CUDA Toolkit path : C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.3
892
893
-- - CUDA Samples path : C:/ProgramData/NVIDIA Corporation/CUDA Samples/v12.3
0 commit comments