Skip to content

Commit 2aa0fc0

Browse files
Merge pull request #471 from ChrisRackauckas-Claude/cudss-v0.5-v0.6-support
Fix CUDSS extension for v0.5 and v0.6 compatibility
2 parents f67f7d8 + 4581303 commit 2aa0fc0

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

Project.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ArrayInterface"
22
uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
3-
version = "7.20.0"
3+
version = "7.20.1"
44

55
[deps]
66
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
@@ -24,7 +24,7 @@ Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c"
2424
ArrayInterfaceBandedMatricesExt = "BandedMatrices"
2525
ArrayInterfaceBlockBandedMatricesExt = "BlockBandedMatrices"
2626
ArrayInterfaceCUDAExt = "CUDA"
27-
ArrayInterfaceCUDSSExt = "CUDSS"
27+
ArrayInterfaceCUDSSExt = ["CUDSS", "CUDA"]
2828
ArrayInterfaceChainRulesCoreExt = "ChainRulesCore"
2929
ArrayInterfaceChainRulesExt = "ChainRules"
3030
ArrayInterfaceGPUArraysCoreExt = "GPUArraysCore"
@@ -39,7 +39,7 @@ Adapt = "4"
3939
BandedMatrices = "1"
4040
BlockBandedMatrices = "0.13"
4141
CUDA = "5"
42-
CUDSS = "0.2, 0.3, 0.4"
42+
CUDSS = "0.5, 0.6"
4343
ChainRules = "1"
4444
ChainRulesCore = "1"
4545
ChainRulesTestUtils = "1"

ext/ArrayInterfaceCUDSSExt.jl

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,18 @@ module ArrayInterfaceCUDSSExt
22

33
using ArrayInterface
44
using CUDSS
5+
using CUDA
56

67
function ArrayInterface.lu_instance(A::CUDSS.CuSparseMatrixCSR)
78
ArrayInterface.LinearAlgebra.checksquare(A)
8-
fact = CudssSolver(A, "G", 'F')
99
T = eltype(A)
10-
n = size(A,1)
11-
x = CudssMatrix(T, n)
12-
b = CudssMatrix(T, n)
10+
n = size(A, 1)
11+
12+
# Use standard CUDA types (CuVector) instead of deprecated CudssMatrix
13+
x = CUDA.CuVector{T}(undef, n)
14+
b = CUDA.CuVector{T}(undef, n)
15+
16+
fact = CudssSolver(A, "G", 'F')
1317
cudss("analysis", fact, x, b)
1418
fact
1519
end

0 commit comments

Comments
 (0)