ROCm 7.2.0 compilation error
I just tried building hypre 3.0.0 with the ROCm 7.2.0 toolchain and the build fails because hypre has a incongruous definition of `__syncwarp`.
```
hypre/src/utilities/_hypre_utilities.hpp:1482:6: error:
static declaration of '__syncwarp' follows non-static declaration
1482 | void __syncwarp()
| ^
/usr/tce/packages/rocmcc/rocmcc-7.2.0-magic/include/hip/amd_detail/amd_warp_sync_functions.h:170:24: note:
previous definition is here
170 | __device__ inline void __syncwarp() {
| ^
```
Here's hypre's overload:
```
static __device__ __forceinline__
void __syncwarp()
{
}
```
Here's AMD's overload:
```
__device__ inline void __syncwarp() {
__builtin_amdgcn_fence(__ATOMIC_RELEASE, "wavefront");
__builtin_amdgcn_wave_barrier();
__builtin_amdgcn_fence(__ATOMIC_ACQUIRE, "wavefront");
}
```
I'm not sure which file triggered the build error, but here's an example command line for building a file in hypre (skipping all the includes) so you can see the command line options being used:
```
/usr/tce/packages/rocmcc/rocmcc-7.2.0-magic/bin/amdclang -DHAVE_SUPERLU -DUSE_PROF_API=1 -D__HIP_PLATFORM_AMD__=1 -ffp-model=strict --gcc-toolchain=/usr/tce/packages/gcc/gcc-13.3.1 -fPIE -g -O2 -gz=zlib -std=gnu99 -fPIC -MD -MT CMakeFiles/HYPRE.dir/sstruct_ls/ssamg_solve.c.o -MF CMakeFiles/HYPRE.dir/sstruct_ls/ssamg_solve.c.o.d -o CMakeFiles/HYPRE.dir/sstruct_ls/ssamg_solve.c.o -c hypre/src/sstruct_ls/ssamg_solve.c
```
1 条评论