ROCm / hipamd

35 stars 37 forks source link

HIP_CLANG_ROOT: Not Overwritable via ENV{HIP_PATH} Yet #13

Open ax3l opened 2 years ago

ax3l commented 2 years ago

While debugging another issue with a HPE/Cray environment on OLCF Crusher the other week, I realized that the logic for HIP_CLANG_ROOT in https://github.com/ROCm-Developer-Tools/hipamd/blob/d2d2cacfe210307ec10c77400e1dafdeafefbc0f/hip-config.cmake.in#L122-L153

cannot be overwritten properly with HIP_PATH env hints.

It looks that down the line, although HIP_CLANG_ROOT is already set, the variable is again overwritten. This caused a dead-end for me with one of the programming environments that HPE/OLCF provided for us on OLCF, where I tried to instead use the amdclang++ compiler instead of CC.

Can this be fixed, e.g., by not overwriting the HIP_CLANG_ROOT variable in the end of the snippet in case it is already set properly?