Skip to content

Commit d786348

Browse files
Merge pull request #433 from JuliaArrays/cudss
Add CUDSS extension for LU factorization instances
2 parents 43d311b + 10d99f3 commit d786348

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ SuiteSparse = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9"
1212
BandedMatrices = "aae01518-5342-5314-be14-df237901396f"
1313
BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0"
1414
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
15+
CUDSS = "45b445bb-4962-46a0-9369-b4df9d0f772e"
1516
ChainRules = "082447d4-558c-5d27-93f4-14fc19e9eca2"
1617
GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527"
1718
ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267"
@@ -22,6 +23,7 @@ Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c"
2223
ArrayInterfaceBandedMatricesExt = "BandedMatrices"
2324
ArrayInterfaceBlockBandedMatricesExt = "BlockBandedMatrices"
2425
ArrayInterfaceCUDAExt = "CUDA"
26+
ArrayInterfaceCUDSSExt = "CUDSS"
2527
ArrayInterfaceChainRulesExt = "ChainRules"
2628
ArrayInterfaceGPUArraysCoreExt = "GPUArraysCore"
2729
ArrayInterfaceReverseDiffExt = "ReverseDiff"

ext/ArrayInterfaceCUDSSExt.jl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
module ArrayInterfaceCUDSSExt
2+
3+
using ArrayInterface
4+
using CUDSS
5+
6+
function ArrayInterface.lu_instance(A::CUDSS.CuSparseMatrixCSR)
7+
ArrayInterface.LinearAlgebra.checksquare(A)
8+
fact = CudssSolver(A, "G", 'F')
9+
T = eltype(A)
10+
n = size(A,1)
11+
x = CudssMatrix(T, n)
12+
b = CudssMatrix(T, n)
13+
cudss("analysis", fact, x, b)
14+
fact
15+
end
16+
17+
end

0 commit comments

Comments
 (0)