diff options
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/dla-future/hip_complex_operator_overloads.patch | 23 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/dla-future/package.py | 2 |
2 files changed, 25 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/dla-future/hip_complex_operator_overloads.patch b/var/spack/repos/builtin/packages/dla-future/hip_complex_operator_overloads.patch new file mode 100644 index 0000000000..a42f284f41 --- /dev/null +++ b/var/spack/repos/builtin/packages/dla-future/hip_complex_operator_overloads.patch @@ -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; diff --git a/var/spack/repos/builtin/packages/dla-future/package.py b/var/spack/repos/builtin/packages/dla-future/package.py index 7d1f5b1002..ef931e9927 100644 --- a/var/spack/repos/builtin/packages/dla-future/package.py +++ b/var/spack/repos/builtin/packages/dla-future/package.py @@ -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 |