Skip to content

Commit b7cdf15

Browse files
Add FastLapackInterface as dependency to LinearSolveAutotune
- FastLapackInterface is now a direct dependency of LinearSolveAutotune - Simplified the algorithm detection logic since it's always available - Updated documentation to reflect that users don't need to load it separately - The include_fastlapack parameter still defaults to false for backward compatibility
1 parent b86d2f8 commit b7cdf15

File tree

3 files changed

+9
-18
lines changed

3 files changed

+9
-18
lines changed

lib/LinearSolveAutotune/Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ CPUSummary = "2a0fbf3d-bb9c-48f3-b0a9-814d99fd7ab9"
1010
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
1111
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
1212
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
13+
FastLapackInterface = "29a986be-02c6-4525-aec4-84b980013641"
1314
GitHub = "bc5e4493-9b4d-5f90-b8aa-2b2bcaad7a26"
1415
LAPACK_jll = "51474c39-65e3-53ba-86ba-03b1b862ec14"
1516
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
@@ -36,6 +37,7 @@ CPUSummary = "0.2"
3637
CUDA = "5"
3738
DataFrames = "1"
3839
Dates = "1"
40+
FastLapackInterface = "2"
3941
GitHub = "5"
4042
LAPACK_jll = "3"
4143
LinearAlgebra = "1"

lib/LinearSolveAutotune/src/LinearSolveAutotune.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ using blis_jll
3636
using LAPACK_jll
3737
using CUDA
3838
using Metal
39+
using FastLapackInterface
3940

4041

4142
# Optional dependencies for telemetry and plotting
@@ -180,7 +181,7 @@ Run a comprehensive benchmark of all available LU factorization methods and opti
180181
- `seconds::Float64 = 0.5`: Maximum time per benchmark
181182
- `eltypes = (Float32, Float64, ComplexF32, ComplexF64)`: Element types to benchmark
182183
- `skip_missing_algs::Bool = false`: If false, error when expected algorithms are missing; if true, warn instead
183-
- `include_fastlapack::Bool = false`: If true and FastLapackInterface.jl is loaded, includes FastLUFactorization in benchmarks
184+
- `include_fastlapack::Bool = false`: If true, includes FastLUFactorization in benchmarks
184185
185186
# Returns
186187
@@ -201,8 +202,7 @@ results = autotune_setup(sizes = [:small, :medium, :large, :big])
201202
# Large matrices only
202203
results = autotune_setup(sizes = [:large, :big], samples = 10, seconds = 1.0)
203204
204-
# Include FastLapackInterface.jl algorithms if available
205-
using FastLapackInterface
205+
# Include FastLapackInterface.jl algorithms
206206
results = autotune_setup(include_fastlapack = true)
207207
208208
# After running autotune, share results (requires gh CLI or GitHub token)

lib/LinearSolveAutotune/src/algorithms.jl

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
Returns a list of available LU factorization algorithms based on the system and loaded packages.
77
If skip_missing_algs=false, errors when expected algorithms are missing; if true, warns instead.
8-
If include_fastlapack=true and FastLapackInterface is loaded, includes FastLUFactorization in benchmarks.
8+
If include_fastlapack=true, includes FastLUFactorization in benchmarks.
99
"""
1010
function get_available_algorithms(; skip_missing_algs::Bool = false, include_fastlapack::Bool = false)
1111
algs = []
@@ -69,21 +69,10 @@ function get_available_algorithms(; skip_missing_algs::Bool = false, include_fas
6969
push!(algs, SimpleLUFactorization())
7070
push!(alg_names, "SimpleLUFactorization")
7171

72-
# FastLapackInterface LU if requested and available
72+
# FastLapackInterface LU if requested (always available as dependency)
7373
if include_fastlapack
74-
try
75-
# Try to create a FastLUFactorization to see if the extension is loaded
76-
test_alg = FastLUFactorization()
77-
push!(algs, test_alg)
78-
push!(alg_names, "FastLUFactorization")
79-
@info "FastLUFactorization included in benchmarks"
80-
catch e
81-
if occursin("UndefVarError", string(e))
82-
@warn "FastLUFactorization requested but FastLapackInterface.jl not loaded. Load it with: using FastLapackInterface"
83-
else
84-
@warn "FastLUFactorization requested but not available: $e"
85-
end
86-
end
74+
push!(algs, FastLUFactorization())
75+
push!(alg_names, "FastLUFactorization")
8776
end
8877

8978
return algs, alg_names

0 commit comments

Comments
 (0)