HIPIFY icon indicating copy to clipboard operation
HIPIFY copied to clipboard

[HIPIFY][SWDEV-435473][fix] Sync CMake installation of HIPIFY tools with package installations

Open aakanksha555 opened this issue 1 year ago • 5 comments

Fix installation locations of hipify-clang components. Also, add a cmake option for installing clang headers.

aakanksha555 avatar Mar 12 '24 00:03 aakanksha555

When HIPIFY_INSTALL_CLANG_HEADERS is set to 'OFF' Output of cmake install: -- Installing: /opt/rocm-6.2.0-9999/bin/hipify-clang -- Set runtime path of "/opt/rocm-6.2.0-9999/bin/hipify-clang" to "" -- Up-to-date: /opt/rocm-6.2.0-9999/./bin -- Installing: /opt/rocm-6.2.0-9999/./bin/hipconvertinplace.sh -- Installing: /opt/rocm-6.2.0-9999/./bin/hipexamine-perl.sh -- Installing: /opt/rocm-6.2.0-9999/./bin/hipexamine.sh -- Installing: /opt/rocm-6.2.0-9999/./bin/hipconvertinplace-perl.sh -- Installing: /opt/rocm-6.2.0-9999/./bin/hipify-perl -- Installing: /opt/rocm-6.2.0-9999/libexec/hipify -- Installing: /opt/rocm-6.2.0-9999/libexec/hipify/findcode.sh -- Installing: /opt/rocm-6.2.0-9999/libexec/hipify/finduncodep.sh

Output of package install: drwxr-xr-x root/root 0 2024-03-11 20:40 ./opt/ drwxr-xr-x root/root 0 2024-03-11 20:40 ./opt/rocm-6.2.0-9999/ drwxr-xr-x root/root 0 2024-03-11 20:40 ./opt/rocm-6.2.0-9999/bin/ -rwxr-xr-x root/root 784 2024-02-22 20:25 ./opt/rocm-6.2.0-9999/bin/hipconvertinplace-perl.sh -rwxr-xr-x root/root 674 2024-02-22 20:25 ./opt/rocm-6.2.0-9999/bin/hipconvertinplace.sh -rwxr-xr-x root/root 407 2024-02-22 20:25 ./opt/rocm-6.2.0-9999/bin/hipexamine-perl.sh -rwxr-xr-x root/root 557 2024-02-22 20:25 ./opt/rocm-6.2.0-9999/bin/hipexamine.sh -rwxr-xr-x root/root 81518448 2024-03-11 18:52 ./opt/rocm-6.2.0-9999/bin/hipify-clang -rwxr-xr-x root/root 642557 2024-02-22 20:25 ./opt/rocm-6.2.0-9999/bin/hipify-perl drwxr-xr-x root/root 0 2024-03-11 20:40 ./opt/rocm-6.2.0-9999/libexec/ drwxr-xr-x root/root 0 2024-03-11 20:40 ./opt/rocm-6.2.0-9999/libexec/hipify/ -rwxr-xr-x root/root 515 2024-01-10 14:19 ./opt/rocm-6.2.0-9999/libexec/hipify/findcode.sh -rwxr-xr-x root/root 322 2024-01-10 14:19 ./opt/rocm-6.2.0-9999/libexec/hipify/finduncodep.sh drwxr-xr-x root/root 0 2024-03-11 20:40 ./opt/rocm-6.2.0-9999/share/ drwxr-xr-x root/root 0 2024-03-11 20:40 ./opt/rocm-6.2.0-9999/share/doc/ drwxr-xr-x root/root 0 2024-03-11 20:40 ./opt/rocm-6.2.0-9999/share/doc/hipify-clang/ -rw-r--r-- root/root 1080 2024-03-11 18:52 ./opt/rocm-6.2.0-9999/share/doc/hipify-clang/LICENSE.txt

aakanksha555 avatar Mar 12 '24 00:03 aakanksha555

When HIPIFY_INSTALL_CLANG_HEADERS is 'ON' (also set by default) we have these files additionally- cmake install: -- Installing: /opt/rocm-6.2.0-9999/include/hipify -- Installing: /opt/rocm-6.2.0-9999/include/hipify/avx512ifmaintrin.h -- Installing: /opt/rocm-6.2.0-9999/include/hipify/stdint.h -- Installing: /opt/rocm-6.2.0-9999/include/hipify/f16cintrin.h

package install: drwxr-xr-x root/root 0 2024-03-11 20:42 ./opt/rocm-6.2.0-9999/include/ drwxr-xr-x root/root 0 2024-03-11 20:42 ./opt/rocm-6.2.0-9999/include/hipify/ -rw-r--r-- root/root 4892 2024-01-10 14:19 ./opt/rocm-6.2.0-9999/include/hipify/__clang_cuda_builtin_vars.h -rw-r--r-- root/root 18492 2024-01-10 14:19 ./opt/rocm-6.2.0-9999/include/hipify/__clang_cuda_cmath.h -rw-r--r-- root/root 10814 2024-01-10 14:19 ./opt/rocm-6.2.0-9999/include/hipify/__clang_cuda_complex_builtins.h

Only including a few files to show new paths which are consistent across both.

aakanksha555 avatar Mar 12 '24 00:03 aakanksha555

  • @raramakr

emankov avatar Mar 12 '24 21:03 emankov

Ping!

Any comments about the new patch?

aakanksha555 avatar Mar 20 '24 17:03 aakanksha555

This PR should be tested on both target OS platforms. For Linux, it should be tested on the installed ROCm package and the hipify-calng standalone package. In all scenarios, hipify-clang and hipify-perl should work correctly. For the ROCm package, better to run the existing ROCm tests.

emankov avatar Mar 21 '24 11:03 emankov

@emankov I made the changes common to linux and windows. I'll be running the windows psdb once to see if all goes well.

aakanksha555 avatar May 02 '24 23:05 aakanksha555

The previous psdb was unstable. Does hipify affect hip tests in any way? -

12:39:56 The following tests FAILED: 12:39:56 2089 - Unit_hipClassKernel_Virtual (Exit code 0xc0000409 12:39:56 )

aakanksha555 avatar May 02 '24 23:05 aakanksha555

The previous psdb was unstable. Does hipify affect hip tests in any way?

No, it doesn't, except for those tests which find header files in ${CMAKE_INSTALL_INCLUDEDIR}/hipify/${CMAKE_INSTALL_INCLUDEDIR}.

As I said previously, copying clang "system" header files to the common for the entire ROCm SW stack include folder is a very bad idea. They should be copied to the place where ROCm's LLVM lives, or hipify-clang can just use them from there if they already exist.

@aakanksha555, I'm going to do it as a separate change for 6.2.

emankov avatar May 05 '24 17:05 emankov

@raramakr, could you please have a look once again? Is everything fine from the CMake's point of view now?

emankov avatar May 07 '24 10:05 emankov