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

Shivam Gupta via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 12 04:02:26 PDT 2024


xgupta 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. 


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


More information about the cfe-commits mailing list