Skip to content

Commit 545f465

Browse files
author
Charles Vielzeuf
committed
Route CUDA crossover effective bounds through GPUSparseMatrixCSR.
Buildkite runs cuSPARSE CuSparseMatrixCSR solves; dispatch crossover row kernels via a thin wrapper in CoolPDLPCUDAExt.
1 parent ead0983 commit 545f465

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

ext/CoolPDLPCUDAExt.jl

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,26 @@
11
module CoolPDLPCUDAExt
22

33
using CUDA: CUDA # not used for now
4-
using cuSPARSE: CuSparseMatrixCOO
5-
using CoolPDLP: CoolPDLP
4+
using cuSPARSE: CuSparseMatrixCOO, CuSparseMatrixCSR
5+
using CoolPDLP: CoolPDLP, GPUSparseMatrixCSR, _crossover_effective_bounds!
66

77
function CoolPDLP.sametype_transpose(A::CuSparseMatrixCOO)
88
return CuSparseMatrixCOO(A.colInd, A.rowInd, A.nzVal, (A.dims[2], A.dims[1]), A.nnz)
99
end
1010

11+
function CoolPDLP._crossover_effective_bounds!(
12+
lv_eff,
13+
uv_eff,
14+
A::CuSparseMatrixCSR,
15+
lc,
16+
uc,
17+
x,
18+
at_box;
19+
eq_atol::Real = 1.0e-12,
20+
)
21+
m, n = A.dims
22+
A_csr = GPUSparseMatrixCSR(m, n, A.rowPtr, A.colVal, A.nzVal)
23+
return _crossover_effective_bounds!(lv_eff, uv_eff, A_csr, lc, uc, x, at_box; eq_atol)
24+
end
25+
1126
end

0 commit comments

Comments
 (0)