Skip to content

Commit 5ac718c

Browse files
authored
Merge pull request #37 from AMD-Lightning-Internal/HIPIFY_rel_merge_20250721
[HIPIFY] Promote `amd-mainline` into `release/rocm-rel-7.0`
2 parents 207f943 + f993c93 commit 5ac718c

File tree

56 files changed

+3441
-5196
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+3441
-5196
lines changed

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,23 @@
33
Documentation for HIPIFY is available at
44
[https://rocmdocs.amd.com/projects/HIPIFY/en/latest/](https://rocmdocs.amd.com/projects/HIPIFY/en/latest/).
55

6+
## HIPIFY for ROCm 7.0.0
7+
8+
### Added
9+
10+
* CUDA 12.9.1 support
11+
* cuDNN 9.11.0 support
12+
* cuTENSOR 2.2.0.0 support
13+
* LLVM 20.1.8 support
14+
15+
### Resolved issues
16+
17+
* `hipDNN` support is removed by default
18+
* [#1859](https://github.com/ROCm/HIPIFY/issues/1859)[hipify-perl] Fix warnings on unsupported Driver or Runtime APIs which were erroneously not reported
19+
* [#1930](https://github.com/ROCm/HIPIFY/issues/1930) Revise `JIT API`
20+
* [#1962](https://github.com/ROCm/HIPIFY/issues/1962) Support for cuda-samples helper headers
21+
* [#2035](https://github.com/ROCm/HIPIFY/issues/2035) Remove `const_cast<const char**>` in `hiprtcCreateProgram` and `hiprtcCompileProgram`
22+
623
## HIPIFY for ROCm 6.4.0
724

825
### Added

CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -267,12 +267,6 @@ install(
267267
# Set RPATH for the binary.
268268
set_target_properties(hipify-clang PROPERTIES LINK_FLAGS "-Wl,--enable-new-dtags -Wl,--rpath,\\$ORIGIN/../lib" )
269269

270-
option(FILE_REORG_BACKWARD_COMPATIBILITY "Enable File Reorg with backward compatibility" OFF)
271-
272-
if(FILE_REORG_BACKWARD_COMPATIBILITY)
273-
include(hipify-backward-compat.cmake)
274-
endif()
275-
276270
set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/rocm" CACHE PATH "HIP Package Installation Path")
277271
set(BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/packages/hipify-clang)
278272

bin/hipify-perl

Lines changed: 540 additions & 481 deletions
Large diffs are not rendered by default.

docs/building/building-hipify.rst

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ To ensure LLVM is found, or in case of multiple LLVM instances, specify the path
2727

2828
.. code-block:: bash
2929
30-
-DCMAKE_PREFIX_PATH=/usr/llvm/20.1.6/dist
30+
-DCMAKE_PREFIX_PATH=/usr/llvm/20.1.8/dist
3131
3232
On Windows, specify the following option for CMake:
3333
``-G "Visual Studio 17 2022"``
@@ -58,7 +58,7 @@ belongs to an appropriate version.
5858
LLVM >= 10.0.0
5959
-----------------
6060

61-
1. Download `LLVM project <https://github.com/llvm/llvm-project/releases/tag/llvmorg-20.1.6>`_ sources.
61+
1. Download `LLVM project <https://github.com/llvm/llvm-project/releases/tag/llvmorg-20.1.8>`_ sources.
6262

6363
2. Build `LLVM project <http://llvm.org/docs/CMake.html>`_:
6464

@@ -148,7 +148,7 @@ LLVM >= 10.0.0
148148

149149
.. code-block:: shell
150150
151-
-DCUDA_DNN_ROOT_DIR=D:/CUDA/cuDNN/9.10.2
151+
-DCUDA_DNN_ROOT_DIR=D:/CUDA/cuDNN/9.11.0
152152
153153
6. [Optional] Install `CUB 1.9.8 <https://github.com/NVIDIA/cub/releases/tag/1.9.8>`_ for ``CUDA < 11.0`` only;
154154
for ``CUDA >= 11.0``, the CUB shipped with CUDA will be used for testing.
@@ -177,13 +177,13 @@ LLVM >= 10.0.0
177177

178178
.. code-block:: bash
179179
180-
python /usr/llvm/20.1.6/llvm-project/llvm/utils/lit/setup.py install
180+
python /usr/llvm/20.1.8/llvm-project/llvm/utils/lit/setup.py install
181181
182182
**Windows**:
183183

184184
.. code-block:: shell
185185
186-
python D:/LLVM/20.1.6/llvm-project/llvm/utils/lit/setup.py install
186+
python D:/LLVM/20.1.8/llvm-project/llvm/utils/lit/setup.py install
187187
188188
In case of errors similar to ``ModuleNotFoundError: No module named 'setuptools'``, upgrade the ``setuptools`` package:
189189

@@ -197,23 +197,23 @@ LLVM >= 10.0.0
197197

198198
.. code-block:: bash
199199
200-
-DLLVM_EXTERNAL_LIT=/usr/llvm/20.1.6/build/bin/llvm-lit
200+
-DLLVM_EXTERNAL_LIT=/usr/llvm/20.1.8/build/bin/llvm-lit
201201
202202
**Windows**:
203203

204204
.. code-block:: shell
205205
206-
-DLLVM_EXTERNAL_LIT=D:/LLVM/20.1.6/build/Release/bin/llvm-lit.py
206+
-DLLVM_EXTERNAL_LIT=D:/LLVM/20.1.8/build/Release/bin/llvm-lit.py
207207
208208
* ``FileCheck``:
209209

210210
**Linux**:
211211

212-
Copy from ``/usr/llvm/20.1.6/build/bin/`` to ``CMAKE_INSTALL_PREFIX/dist/bin``.
212+
Copy from ``/usr/llvm/20.1.8/build/bin/`` to ``CMAKE_INSTALL_PREFIX/dist/bin``.
213213

214214
**Windows**:
215215

216-
Copy from ``D:/LLVM/20.1.6/build/Release/bin`` to ``CMAKE_INSTALL_PREFIX/dist/bin``.
216+
Copy from ``D:/LLVM/20.1.8/build/Release/bin`` to ``CMAKE_INSTALL_PREFIX/dist/bin``.
217217

218218
Alternatively, specify the path to ``FileCheck`` in the ``CMAKE_INSTALL_PREFIX`` option.
219219

@@ -281,8 +281,8 @@ Linux testing
281281

282282
On Linux, the following configurations are tested:
283283

284-
* Ubuntu 22-23: LLVM 13.0.0 - 20.1.6, CUDA 7.0 - 12.8.1, cuDNN 8.0.5 - 9.10.2, cuTensor 1.0.1.0 - 2.2.0.0
285-
* Ubuntu 20-21: LLVM 9.0.0 - 20.1.6, CUDA 7.0 - 12.8.1, cuDNN 5.1.10 - 9.10.2, cuTensor 1.0.1.0 - 2.2.0.0
284+
* Ubuntu 22-23: LLVM 13.0.0 - 20.1.8, CUDA 7.0 - 12.8.1, cuDNN 8.0.5 - 9.11.0, cuTensor 1.0.1.0 - 2.2.0.0
285+
* Ubuntu 20-21: LLVM 9.0.0 - 20.1.8, CUDA 7.0 - 12.8.1, cuDNN 5.1.10 - 9.11.0, cuTensor 1.0.1.0 - 2.2.0.0
286286
* Ubuntu 16-19: LLVM 8.0.0 - 14.0.6, CUDA 7.0 - 10.2, cuDNN 5.1.10 - 8.0.5
287287
* Ubuntu 14: LLVM 4.0.0 - 7.1.0, CUDA 7.0 - 9.0, cuDNN 5.0.5 - 7.6.5
288288

@@ -292,7 +292,7 @@ Minimum build system requirements for the above configurations:
292292

293293
Recommended build system requirements:
294294

295-
* CMake 4.0.2, GNU C/C++ 13.2, Python 3.13.3.
295+
* CMake 4.0.3, GNU C/C++ 13.2, Python 3.13.5.
296296

297297
Here's how to build ``hipify-clang`` with testing support on ``Ubuntu 23.10.01``:
298298

@@ -302,11 +302,11 @@ Here's how to build ``hipify-clang`` with testing support on ``Ubuntu 23.10.01``
302302
-DHIPIFY_CLANG_TESTS=ON \
303303
-DCMAKE_BUILD_TYPE=Release \
304304
-DCMAKE_INSTALL_PREFIX=../dist \
305-
-DCMAKE_PREFIX_PATH=/usr/llvm/20.1.6/dist \
305+
-DCMAKE_PREFIX_PATH=/usr/llvm/20.1.8/dist \
306306
-DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-12.8.1 \
307-
-DCUDA_DNN_ROOT_DIR=/usr/local/cudnn-9.10.2 \
307+
-DCUDA_DNN_ROOT_DIR=/usr/local/cudnn-9.11.0 \
308308
-DCUDA_TENSOR_ROOT_DIR=/usr/local/cutensor-2.2.0.0 \
309-
-DLLVM_EXTERNAL_LIT=/usr/llvm/20.1.6/build/bin/llvm-lit \
309+
-DLLVM_EXTERNAL_LIT=/usr/llvm/20.1.8/build/bin/llvm-lit \
310310
../hipify
311311
312312
The corresponding successful output is:
@@ -331,20 +331,20 @@ The corresponding successful output is:
331331
-- - Is part of HIP SDK : OFF
332332
-- - Install clang headers : ON
333333
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.13")
334-
-- Found LLVM 20.1.6:
335-
-- - CMake module path : /usr/llvm/20.1.6/dist/lib/cmake/llvm
336-
-- - Clang include path : /usr/llvm/20.1.6/dist/include
337-
-- - LLVM Include path : /usr/llvm/20.1.6/dist/include
338-
-- - Binary path : /usr/llvm/20.1.6/dist/bin
334+
-- Found LLVM 20.1.8:
335+
-- - CMake module path : /usr/llvm/20.1.8/dist/lib/cmake/llvm
336+
-- - Clang include path : /usr/llvm/20.1.8/dist/include
337+
-- - LLVM Include path : /usr/llvm/20.1.8/dist/include
338+
-- - Binary path : /usr/llvm/20.1.8/dist/bin
339339
-- Linker detection: GNU ld
340340
-- ---- The below configuring for hipify-clang testing only ----
341-
-- Found Python: /usr/bin/python3.13 (found suitable version "3.13.3", required range is "3.0...3.14") found components: Interpreter
341+
-- Found Python: /usr/bin/python3.13 (found suitable version "3.13.5", required range is "3.0...3.14") found components: Interpreter
342342
-- Found lit: /usr/local/bin/lit
343343
-- Found FileCheck: /GIT/LLVM/trunk/dist/FileCheck
344344
-- Initial CUDA to configure:
345345
-- - CUDA Toolkit path : /usr/local/cuda-12.8.1
346346
-- - CUDA Samples path :
347-
-- - cuDNN path : /usr/local/cudnn-9.10.2
347+
-- - cuDNN path : /usr/local/cudnn-9.11.0
348348
-- - cuTENSOR path : /usr/local/cuTensor/2.2.0.0
349349
-- - CUB path :
350350
-- Found CUDAToolkit: /usr/local/cuda-12.8.1/targets/x86_64-linux/include (found version "12.8.93")
@@ -354,7 +354,7 @@ The corresponding successful output is:
354354
-- Found CUDA config:
355355
-- - CUDA Toolkit path : /usr/local/cuda-12.8.1
356356
-- - CUDA Samples path : OFF
357-
-- - cuDNN path : /usr/local/cudnn-9.10.2
357+
-- - cuDNN path : /usr/local/cudnn-9.11.0
358358
-- - CUB path : /usr/local/cuda-12.8.1/include/cub
359359
-- - cuTENSOR path : /usr/local/cuTensor/2.2.0.0
360360
-- Configuring done (0.6s)
@@ -372,11 +372,11 @@ The corresponding successful output is:
372372
Running HIPify regression tests
373373
===============================================================
374374
CUDA 12.8.93 - will be used for testing
375-
LLVM 20.1.6 - will be used for testing
375+
LLVM 20.1.8 - will be used for testing
376376
x86_64 - Platform architecture
377377
Linux 6.5.0-15-generic - Platform OS
378378
64 - hipify-clang binary bitness
379-
64 - python 3.13.3 binary bitness
379+
64 - python 3.13.5 binary bitness
380380
===============================================================
381381
-- Testing: 106 tests, 12 threads --
382382
Testing Time: 6.91s
@@ -468,16 +468,16 @@ Tested configurations:
468468
- ``3.11.4``
469469
* - ``17.0.1`` :sup:`6` - ``18.1.8`` :sup:`7`
470470
- ``7.0 - 12.3.2``
471-
- ``8.0.5 - 9.10.2``
472-
- ``2019.16.11.46, 2022.17.13.6``
473-
- ``4.0.2``
474-
- ``3.13.3``
475-
* - ``19.1.0 - 20.1.6``
471+
- ``8.0.5 - 9.11.0``
472+
- ``2019.16.11.48, 2022.17.14.5``
473+
- ``4.0.3``
474+
- ``3.13.5``
475+
* - ``19.1.0 - 20.1.8``
476476
- ``7.0 - 12.8.1``
477-
- ``8.0.5 - 9.10.2``
478-
- ``2019.16.11.46, 2022.17.13.6``
479-
- ``4.0.2``
480-
- ``3.13.3``
477+
- ``8.0.5 - 9.11.0``
478+
- ``2019.16.11.48, 2022.17.14.5``
479+
- ``4.0.3``
480+
- ``3.13.5``
481481

482482
:sup:`5` LLVM 14.x.x is the latest major release supporting Visual Studio 2017.
483483

@@ -502,12 +502,12 @@ Building with testing support using ``Visual Studio 17 2022`` on ``Windows 11``:
502502
-DHIPIFY_CLANG_TESTS=ON \
503503
-DCMAKE_BUILD_TYPE=Release \
504504
-DCMAKE_INSTALL_PREFIX=../dist \
505-
-DCMAKE_PREFIX_PATH=D:/LLVM/20.1.6/dist \
505+
-DCMAKE_PREFIX_PATH=D:/LLVM/20.1.8/dist \
506506
-DCUDA_TOOLKIT_ROOT_DIR="C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.8" \
507507
-DCUDA_SDK_ROOT_DIR="C:/ProgramData/NVIDIA Corporation/CUDA Samples/v12.8" \
508-
-DCUDA_DNN_ROOT_DIR=D:/CUDA/cuDNN/9.10.2 \
508+
-DCUDA_DNN_ROOT_DIR=D:/CUDA/cuDNN/9.11.0 \
509509
-DCUDA_TENSOR_ROOT_DIR=D:/CUDA/cuTensor/2.2.0.0 \
510-
-DLLVM_EXTERNAL_LIT=D:/LLVM/20.1.6/build/Release/bin/llvm-lit.py \
510+
-DLLVM_EXTERNAL_LIT=D:/LLVM/20.1.8/build/Release/bin/llvm-lit.py \
511511
../hipify
512512
513513
The corresponding successful output is:
@@ -519,39 +519,39 @@ The corresponding successful output is:
519519
-- The CXX compiler identification is MSVC 19.42.34435.0
520520
-- Detecting C compiler ABI info
521521
-- Detecting C compiler ABI info - done
522-
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.42.34433/bin/Hostx64/x64/cl.exe - skipped
522+
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe - skipped
523523
-- Detecting C compile features
524524
-- Detecting C compile features - done
525525
-- Detecting CXX compiler ABI info
526526
-- Detecting CXX compiler ABI info - done
527-
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.42.34433/bin/Hostx64/x64/cl.exe - skipped
527+
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe - skipped
528528
-- Detecting CXX compile features
529529
-- Detecting CXX compile features - done
530530
-- HIPIFY config:
531531
-- - Build hipify-clang : ON
532532
-- - Test hipify-clang : ON
533533
-- - Is part of HIP SDK : OFF
534534
-- - Install clang headers : ON
535-
-- Found LLVM 20.1.6:
536-
-- - CMake module path : D:/LLVM/20.1.6/dist/lib/cmake/llvm
537-
-- - Clang include path : D:/LLVM/20.1.6/dist/include
538-
-- - LLVM Include path : D:/LLVM/20.1.6/dist/include
539-
-- - Binary path : D:/LLVM/20.1.6/dist/bin
535+
-- Found LLVM 20.1.8:
536+
-- - CMake module path : D:/LLVM/20.1.8/dist/lib/cmake/llvm
537+
-- - Clang include path : D:/LLVM/20.1.8/dist/include
538+
-- - LLVM Include path : D:/LLVM/20.1.8/dist/include
539+
-- - Binary path : D:/LLVM/20.1.8/dist/bin
540540
-- ---- The below configuring for hipify-clang testing only ----
541-
-- Found Python: C:/Users/TT/AppData/Local/Programs/Python/Python313/python.exe (found suitable version "3.13.3", required range is "3.0...3.14") found components: Interpreter
541+
-- Found Python: C:/Users/TT/AppData/Local/Programs/Python/Python313/python.exe (found suitable version "3.13.5", required range is "3.0...3.14") found components: Interpreter
542542
-- Found lit: C:/Users/TT/AppData/Local/Programs/Python/Python313/Scripts/lit.exe
543-
-- Found FileCheck: D:/LLVM/20.1.6/dist/bin/FileCheck.exe
543+
-- Found FileCheck: D:/LLVM/20.1.8/dist/bin/FileCheck.exe
544544
-- Initial CUDA to configure:
545545
-- - CUDA Toolkit path : C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.8
546546
-- - CUDA Samples path : C:/ProgramData/NVIDIA Corporation/CUDA Samples/v12.8
547-
-- - cuDNN path : D:/CUDA/cuDNN/9.10.2
547+
-- - cuDNN path : D:/CUDA/cuDNN/9.11.0
548548
-- - cuTENSOR path : D:/CUDA/cuTensor/2.2.0.0
549549
-- - CUB path :
550550
-- Found CUDAToolkit: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.8/include (found version "12.8.93")
551551
-- Found CUDA config:
552552
-- - CUDA Toolkit path : C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.8
553553
-- - CUDA Samples path : C:/ProgramData/NVIDIA Corporation/CUDA Samples/v12.8
554-
-- - cuDNN path : D:/CUDA/cuDNN/9.10.2
554+
-- - cuDNN path : D:/CUDA/cuDNN/9.11.0
555555
-- - cuTENSOR path : D:/CUDA/cuTensor/2.2.0.0
556556
-- - CUB path : C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.8/include/cub
557557
-- Configuring done (4.4s)

docs/how-to/hipify-clang.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Release Dependencies
4141

4242
* `LLVM+Clang <http://releases.llvm.org>`_ version is determined at least partially by
4343
the CUDA version you are using, as shown in the table below. The recommended Clang release
44-
is the latest stable release `20.1.6 <https://github.com/llvm/llvm-project/releases/tag/llvmorg-20.1.6>`_,
44+
is the latest stable release `20.1.8 <https://github.com/llvm/llvm-project/releases/tag/llvmorg-20.1.8>`_,
4545
or at least version `4.0.0 <http://releases.llvm.org/download.html#4.0.0>`_.
4646

4747
.. list-table::
@@ -61,7 +61,9 @@ Release Dependencies
6161
`20.1.3 <https://github.com/llvm/llvm-project/releases/tag/llvmorg-20.1.3>`_,
6262
`20.1.4 <https://github.com/llvm/llvm-project/releases/tag/llvmorg-20.1.4>`_,
6363
`20.1.5 <https://github.com/llvm/llvm-project/releases/tag/llvmorg-20.1.5>`_,
64-
`20.1.6 <https://github.com/llvm/llvm-project/releases/tag/llvmorg-20.1.6>`_:sup:`1`
64+
`20.1.6 <https://github.com/llvm/llvm-project/releases/tag/llvmorg-20.1.6>`_,
65+
`20.1.7 <https://github.com/llvm/llvm-project/releases/tag/llvmorg-20.1.7>`_,
66+
`20.1.8 <https://github.com/llvm/llvm-project/releases/tag/llvmorg-20.1.8>`_:sup:`1`
6567
- ✅
6668
- ✅
6769
* - `12.6.3 <https://developer.nvidia.com/cuda-12-6-3-download-archive>`_
@@ -249,7 +251,7 @@ Release Dependencies
249251
In most cases, you can get a suitable version of ``LLVM+Clang`` with your package manager. However, you can also
250252
`download a release archive <http://releases.llvm.org/>`_ and build or install it. In case of multiple versions of ``LLVM`` installed, set
251253
`CMAKE_PREFIX_PATH <https://cmake.org/cmake/help/latest/variable/CMAKE_PREFIX_PATH.html>`_ so that
252-
``CMake`` can find the desired version of ``LLVM``. For example, ``-DCMAKE_PREFIX_PATH=D:\LLVM\20.1.6\dist``.
254+
``CMake`` can find the desired version of ``LLVM``. For example, ``-DCMAKE_PREFIX_PATH=D:\LLVM\20.1.8\dist``.
253255

254256
Usage
255257
=====
@@ -285,7 +287,7 @@ header files used during the hipification process:
285287

286288
.. code:: shell
287289
288-
./hipify-clang square.cu --cuda-path=/usr/local/cuda-12.8 --clang-resource-directory=/usr/llvm/20.1.6/dist/lib/clang/20
290+
./hipify-clang square.cu --cuda-path=/usr/local/cuda-12.8 --clang-resource-directory=/usr/llvm/20.1.8/dist/lib/clang/20
289291
290292
For more information, refer to the `Clang manual for compiling CUDA <https://llvm.org/docs/CompileCudaWithLLVM.html#compiling-cuda-code>`_.
291293

docs/reference/supported_apis.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
| CUSOLVER API | [HIP SOLVER API](tables/CUSOLVER_API_supported_by_HIP.md) | | |
2020
| CURAND API | [HIP RAND API](tables/CURAND_API_supported_by_HIP.md) | [ROC RAND API](tables/CURAND_API_supported_by_ROC.md) | [HIP + ROC RAND API](tables/CURAND_API_supported_by_HIP_and_ROC.md) |
2121
| CUFFT API | [HIP FFT API](tables/CUFFT_API_supported_by_HIP.md) | | |
22-
| CUDNN API | [HIP DNN API](tables/CUDNN_API_supported_by_HIP.md) | [MIOPEN API](tables/CUDNN_API_supported_by_MIOPEN.md) | [HIP + MIOPEN API](tables/CUDNN_API_supported_by_HIP_and_MIOPEN.md) |
22+
| CUDNN API | | [MIOPEN API](tables/CUDNN_API_supported_by_MIOPEN.md) | |
2323
| CUTENSOR API | [HIP TENSOR API](tables/CUTENSOR_API_supported_by_HIP.md) | | |
2424
| CUB API | [HIP CUB API](tables/CUB_API_supported_by_HIP.md) | | |
2525

0 commit comments

Comments
 (0)