Skip to content

Commit 9fc769d

Browse files
committed
Backport fix for CUDA 11.5 to hipsparse
1 parent d2fcda2 commit 9fc769d

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
From 0a90ddc4c33ed409a938513b9dbdca8bfad65e06 Mon Sep 17 00:00:00 2001
2+
From: James Sandham <[email protected]>
3+
Date: Tue, 29 Nov 2022 12:19:06 -0700
4+
Subject: [PATCH] Fix cuda compilation (#287)
5+
6+
Co-authored-by: jsandham <[email protected]>
7+
---
8+
library/src/nvcc_detail/hipsparse.cpp | 2 ++
9+
1 file changed, 2 insertions(+)
10+
11+
diff --git a/library/src/nvcc_detail/hipsparse.cpp b/library/src/nvcc_detail/hipsparse.cpp
12+
index 4d692855..25d257a8 100644
13+
--- a/library/src/nvcc_detail/hipsparse.cpp
14+
+++ b/library/src/nvcc_detail/hipsparse.cpp
15+
@@ -360,6 +360,7 @@ cusparseSolvePolicy_t hipPolicyToCudaPolicy(hipsparseSolvePolicy_t policy)
16+
}
17+
}
18+
19+
+#if CUDART_VERSION < 11050
20+
cusparseSideMode_t hipSideToCudaSide(hipsparseSideMode_t side)
21+
{
22+
switch(side)
23+
@@ -385,6 +386,7 @@ hipsparseSideMode_t CudaSideToHIPSide(cusparseSideMode_t side)
24+
throw "Non existent cusparseSideMode_t";
25+
}
26+
}
27+
+#endif
28+
29+
#if CUDART_VERSION > 10000
30+
cudaDataType hipDataTypeToCudaDataType(hipDataType datatype)

var/spack/repos/builtin/packages/hipsparse/package.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ class Hipsparse(CMakePackage, CudaPackage, ROCmPackage):
163163

164164
patch("e79985dccde22d826aceb3badfc643a3227979d2.patch", when="@3.5.0")
165165
patch("530047af4a0f437dafc02f76b3a17e3b1536c7ec.patch", when="@3.5.0")
166+
patch("0a90ddc4c33ed409a938513b9dbdca8bfad65e06.patch")
166167

167168
@classmethod
168169
def determine_version(cls, lib):

0 commit comments

Comments
 (0)