dla-future: Add patch for compilation with newer ROCm versions (#42348)
This commit is contained in:
parent
1e47ccb83a
commit
8ecae17c46
2 changed files with 25 additions and 0 deletions
|
@ -0,0 +1,23 @@
|
|||
diff --git a/src/lapack/gpu/add.cu b/src/lapack/gpu/add.cu
|
||||
index a55110c2..5d839540 100644
|
||||
--- a/src/lapack/gpu/add.cu
|
||||
+++ b/src/lapack/gpu/add.cu
|
||||
@@ -32,6 +32,18 @@ __device__ inline void addAlpha(const T& alpha, const T& a, T& b) {
|
||||
b = b + alpha * a;
|
||||
}
|
||||
|
||||
+template <>
|
||||
+__device__ inline void addAlpha<hipFloatComplex>(const hipFloatComplex& alpha, const hipFloatComplex& a,
|
||||
+ hipFloatComplex& b) {
|
||||
+ b = b + hipCmulf(alpha, a);
|
||||
+}
|
||||
+
|
||||
+template <>
|
||||
+__device__ inline void addAlpha<hipDoubleComplex>(const hipDoubleComplex& alpha,
|
||||
+ const hipDoubleComplex& a, hipDoubleComplex& b) {
|
||||
+ b = b + hipCmul(alpha, a);
|
||||
+}
|
||||
+
|
||||
template <class T>
|
||||
__device__ inline void sum(const T& /*alpha*/, const T& a, T& b) {
|
||||
b = b + a;
|
|
@ -129,6 +129,8 @@ class DlaFuture(CMakePackage, CudaPackage, ROCmPackage):
|
|||
sha256="7f382c872d89f22da1ad499e85ffe9881cc7404c8465e42877a210a09382e2ea",
|
||||
when="@:0.3 %gcc@13:",
|
||||
)
|
||||
# https://github.com/spack/spack/issues/41511
|
||||
patch("hip_complex_operator_overloads.patch", when="+rocm")
|
||||
|
||||
def cmake_args(self):
|
||||
spec = self.spec
|
||||
|
|
Loading…
Reference in a new issue