Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workaround for ambiguous complex multiplication overloads in HIP in larft.cu #1241

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions src/lapack/gpu/larft.cu
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
// SPDX-License-Identifier: BSD-3-Clause
//

#include <complex>
msimberg marked this conversation as resolved.
Show resolved Hide resolved
#include <type_traits>

#include <whip.hpp>

#include <dlaf/common/assert.h>
Expand Down Expand Up @@ -46,8 +49,20 @@ __global__ void fix_tau(const unsigned k, const T* tau, unsigned inctau, T* t, u
t_ij = {};
else if (i == j)
t_ij = tau_j;
else
t_ij = -tau_j * t_ij;
else {
#if defined(DLAF_WITH_HIP)
if constexpr (std::is_same_v<T, hipFloatComplex>) {
t_ij = hipCmulf(-tau_j, t_ij);
}
else if constexpr (std::is_same_v<T, hipDoubleComplex>) {
t_ij = hipCmul(-tau_j, t_ij);
}
else
#endif
{
t_ij = -tau_j * t_ij;
}
}
}
}

Expand Down
Loading