Closed devreal closed 3 months ago
Have your issues been resolved?
Looks like this issue is fixed, thank you.
The code makes more sense in the original CUDA file, src/cuda/device_util.cuh
:
#ifdef __NVCC__
// CUDA doesn't provide real, imag, conj.
__host__ __device__ inline double real( cuDoubleComplex x ) { return x.x; }
__host__ __device__ inline float real( cuFloatComplex x ) { return x.x; }
__host__ __device__ inline double imag( cuDoubleComplex x ) { return x.y; }
__host__ __device__ inline float imag( cuFloatComplex x ) { return x.y; }
__host__ __device__ inline cuDoubleComplex conj( cuDoubleComplex x ) { return cuConj(x); }
__host__ __device__ inline cuFloatComplex conj( cuFloatComplex x ) { return cuConjf(x); }
#else
__host__ __device__ inline double real( rocblas_double_complex x ) { return x.real(); }
__host__ __device__ inline float real( rocblas_float_complex x ) { return x.real(); }
__host__ __device__ inline double imag( rocblas_double_complex x ) { return x.imag(); }
__host__ __device__ inline float imag( rocblas_float_complex x ) { return x.imag(); }
__host__ __device__ inline rocblas_double_complex conj( rocblas_double_complex x ) { return { x.real(), -x.imag() }; }
__host__ __device__ inline rocblas_float_complex conj( rocblas_float_complex x ) { return { x.real(), -x.imag() }; }
#endif
The first set of routines is what we use for CUDA. It gets translated by hipify to hipDoubleComplex
, but we don't use that code. The second set of routines is what we use for HIP / ROCm.
Did you update your repo? There haven't been any recent changes in SLATE that would affect this, though it could depend on the ROCm version. Knowing the git commit ID would help to reproduce issues.
Description
This code seems to be hipified CUDA code:
I don't understand why
hipDoubleComplex
is excluded here but it leads to a compiler error on Frontier:Steps To Reproduce
Build on Frontier with the environment below.
Environment
On Frontier: