Skip to content

Commit a3c4184

Browse files
fix two functions of hip
1 parent c3f6356 commit a3c4184

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

source/module_hsolver/kernels/rocm/math_kernel_op.hip.cu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,14 +365,14 @@ __global__ void upate_psi_by_precondition_kernel(const int m, const int n, T *ps
365365
psi[j * lda + i] = psi[j * lda + i] / pre;
366366
}
367367

368-
__device__ double complexAbsSquared(cuDoubleComplex z) {
368+
__device__ double complexAbsSquared(hipDoubleComplex z) {
369369
return z.x * z.x + z.y * z.y;
370370
}
371371

372372
template <typename Real>
373373
__device__ Real warpReduceSum(Real val) {
374374
for (int offset = 32; offset > 0; offset /= 2)
375-
val += __shfl_down_sync(0xffffffffffffffff, val, offset);
375+
val += __shfl_down(0xffffffffffffffff, val, offset);
376376
return val;
377377
}
378378

0 commit comments

Comments
 (0)