Skip to content

Commit ce4671e

Browse files
Fix syntax issues in CudaOffload factorizations
- Fixed namespace issues (removed LinearSolve. prefix) - Fixed constructor syntax (new() instead of new{}()) - Added debug comment - Updated exports to separate lines Note: The new types are defined correctly but there appears to be a precompilation caching issue preventing them from being recognized immediately. A clean rebuild may be required.
1 parent 4814de7 commit ce4671e

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

src/LinearSolve.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,9 @@ export KrylovJL, KrylovJL_CG, KrylovJL_MINRES, KrylovJL_GMRES,
254254
export SimpleGMRES
255255

256256
export HYPREAlgorithm
257-
export CudaOffloadFactorization, CudaOffloadLUFactorization, CudaOffloadQRFactorization
257+
export CudaOffloadFactorization
258+
export CudaOffloadLUFactorization
259+
export CudaOffloadQRFactorization
258260
export MKLPardisoFactorize, MKLPardisoIterate
259261
export PanuaPardisoFactorize, PanuaPardisoIterate
260262
export PardisoJL

src/extension_algs.jl

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ struct HYPREAlgorithm <: SciMLLinearSolveAlgorithm
6161
end
6262
end
6363

64+
# Debug: About to define CudaOffloadLUFactorization
6465
"""
6566
`CudaOffloadLUFactorization()`
6667
@@ -71,13 +72,13 @@ Requires a sufficiently large `A` to overcome the data transfer costs.
7172
7273
Using this solver requires adding the package CUDA.jl, i.e. `using CUDA`
7374
"""
74-
struct CudaOffloadLUFactorization <: LinearSolve.AbstractFactorization
75+
struct CudaOffloadLUFactorization <: AbstractFactorization
7576
function CudaOffloadLUFactorization()
7677
ext = Base.get_extension(@__MODULE__, :LinearSolveCUDAExt)
7778
if ext === nothing
7879
error("CudaOffloadLUFactorization requires that CUDA is loaded, i.e. `using CUDA`")
7980
else
80-
return new{}()
81+
return new()
8182
end
8283
end
8384
end
@@ -92,13 +93,13 @@ Requires a sufficiently large `A` to overcome the data transfer costs.
9293
9394
Using this solver requires adding the package CUDA.jl, i.e. `using CUDA`
9495
"""
95-
struct CudaOffloadQRFactorization <: LinearSolve.AbstractFactorization
96+
struct CudaOffloadQRFactorization <: AbstractFactorization
9697
function CudaOffloadQRFactorization()
9798
ext = Base.get_extension(@__MODULE__, :LinearSolveCUDAExt)
9899
if ext === nothing
99100
error("CudaOffloadQRFactorization requires that CUDA is loaded, i.e. `using CUDA`")
100101
else
101-
return new{}()
102+
return new()
102103
end
103104
end
104105
end
@@ -116,14 +117,14 @@ Requires a sufficiently large `A` to overcome the data transfer costs.
116117
117118
Using this solver requires adding the package CUDA.jl, i.e. `using CUDA`
118119
"""
119-
struct CudaOffloadFactorization <: LinearSolve.AbstractFactorization
120+
struct CudaOffloadFactorization <: AbstractFactorization
120121
function CudaOffloadFactorization()
121122
Base.depwarn("`CudaOffloadFactorization` is deprecated, use `CudaOffloadQRFactorization` instead.", :CudaOffloadFactorization)
122123
ext = Base.get_extension(@__MODULE__, :LinearSolveCUDAExt)
123124
if ext === nothing
124125
error("CudaOffloadFactorization requires that CUDA is loaded, i.e. `using CUDA`")
125126
else
126-
return new{}()
127+
return new()
127128
end
128129
end
129130
end

0 commit comments

Comments
 (0)