[clang] [clang] Fixing Clang HIP inconsistent order for template functions (PR #101627)

via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 13 04:48:35 PDT 2024


Ritanya-B-Bharadwaj wrote:

> First CI is failing with error -
> 
> ```
> clang: error: cannot find ROCm device library; provide its path via '--rocm-path' or '--rocm-device-lib-path', or pass '-nogpulib' to build without ROCm device library
> clang: error: cannot find HIP runtime; provide its path via '--rocm-path', or pass '-nogpuinc' to build without HIP runtime
> clang: error: cannot find HIP runtime; provide its path via '--rocm-path', or pass '-nogpuinc' to build without HIP runtime
> ```
> 
> I think the test run line is not following convention. You can not include hip_runtime.h, instead have to use cuda.h so probably you need to add cuda.h in . I have tried replacing #include "hip/hip_runtime.h" with #include "../CodeGenCUDA/Inputs/cuda.h" and using run line like this way -
> 
> `// RUN: x=$( %clang_cc1 -x hip -triple amdgcn -target-cpu gfx908 -emit-llvm -fcuda-is-device %s -o - | md5sum | awk '{ print $1 }') && echo $x > %t.md5` to pass the test case.

Thanks for the review, I have modified accordingly. 

https://github.com/llvm/llvm-project/pull/101627


More information about the cfe-commits mailing list