diff --git a/lib/LinearSolveAutotune/Project.toml b/lib/LinearSolveAutotune/Project.toml index f01a99bd7..9d06c49cb 100644 --- a/lib/LinearSolveAutotune/Project.toml +++ b/lib/LinearSolveAutotune/Project.toml @@ -10,6 +10,7 @@ CPUSummary = "2a0fbf3d-bb9c-48f3-b0a9-814d99fd7ab9" CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" +FastLapackInterface = "29a986be-02c6-4525-aec4-84b980013641" GitHub = "bc5e4493-9b4d-5f90-b8aa-2b2bcaad7a26" LAPACK_jll = "51474c39-65e3-53ba-86ba-03b1b862ec14" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" @@ -36,6 +37,7 @@ CPUSummary = "0.2" CUDA = "5" DataFrames = "1" Dates = "1" +FastLapackInterface = "2" GitHub = "5" LAPACK_jll = "3" LinearAlgebra = "1" diff --git a/lib/LinearSolveAutotune/src/LinearSolveAutotune.jl b/lib/LinearSolveAutotune/src/LinearSolveAutotune.jl index 0cbfd6d7c..f698de377 100644 --- a/lib/LinearSolveAutotune/src/LinearSolveAutotune.jl +++ b/lib/LinearSolveAutotune/src/LinearSolveAutotune.jl @@ -36,6 +36,7 @@ using blis_jll using LAPACK_jll using CUDA using Metal +using FastLapackInterface # Optional dependencies for telemetry and plotting @@ -156,7 +157,8 @@ end samples::Int = 5, seconds::Float64 = 0.5, eltypes = (Float32, Float64, ComplexF32, ComplexF64), - skip_missing_algs::Bool = false) + skip_missing_algs::Bool = false, + include_fastlapack::Bool = false) Run a comprehensive benchmark of all available LU factorization methods and optionally: @@ -179,6 +181,7 @@ Run a comprehensive benchmark of all available LU factorization methods and opti - `seconds::Float64 = 0.5`: Maximum time per benchmark - `eltypes = (Float32, Float64, ComplexF32, ComplexF64)`: Element types to benchmark - `skip_missing_algs::Bool = false`: If false, error when expected algorithms are missing; if true, warn instead + - `include_fastlapack::Bool = false`: If true, includes FastLUFactorization in benchmarks # Returns @@ -199,6 +202,9 @@ results = autotune_setup(sizes = [:small, :medium, :large, :big]) # Large matrices only results = autotune_setup(sizes = [:large, :big], samples = 10, seconds = 1.0) +# Include FastLapackInterface.jl algorithms +results = autotune_setup(include_fastlapack = true) + # After running autotune, share results (requires gh CLI or GitHub token) share_results(results) ``` @@ -209,7 +215,8 @@ function autotune_setup(; samples::Int = 5, seconds::Float64 = 0.5, eltypes = (Float64,), - skip_missing_algs::Bool = false) + skip_missing_algs::Bool = false, + include_fastlapack::Bool = false) @info "Starting LinearSolve.jl autotune setup..." @info "Configuration: sizes=$sizes, set_preferences=$set_preferences" @info "Element types to benchmark: $(join(eltypes, ", "))" @@ -219,7 +226,7 @@ function autotune_setup(; @info "System detected: $(system_info["os"]) $(system_info["arch"]) with $(system_info["num_cores"]) cores" # Get available algorithms - cpu_algs, cpu_names = get_available_algorithms(; skip_missing_algs = skip_missing_algs) + cpu_algs, cpu_names = get_available_algorithms(; skip_missing_algs = skip_missing_algs, include_fastlapack = include_fastlapack) @info "Found $(length(cpu_algs)) CPU algorithms: $(join(cpu_names, ", "))" # Add GPU algorithms if available diff --git a/lib/LinearSolveAutotune/src/algorithms.jl b/lib/LinearSolveAutotune/src/algorithms.jl index 360f4bd40..d71c2b768 100644 --- a/lib/LinearSolveAutotune/src/algorithms.jl +++ b/lib/LinearSolveAutotune/src/algorithms.jl @@ -1,12 +1,13 @@ # Algorithm detection and creation functions """ - get_available_algorithms(; skip_missing_algs::Bool = false) + get_available_algorithms(; skip_missing_algs::Bool = false, include_fastlapack::Bool = false) Returns a list of available LU factorization algorithms based on the system and loaded packages. If skip_missing_algs=false, errors when expected algorithms are missing; if true, warns instead. +If include_fastlapack=true, includes FastLUFactorization in benchmarks. """ -function get_available_algorithms(; skip_missing_algs::Bool = false) +function get_available_algorithms(; skip_missing_algs::Bool = false, include_fastlapack::Bool = false) algs = [] alg_names = String[] @@ -68,6 +69,12 @@ function get_available_algorithms(; skip_missing_algs::Bool = false) push!(algs, SimpleLUFactorization()) push!(alg_names, "SimpleLUFactorization") + # FastLapackInterface LU if requested (always available as dependency) + if include_fastlapack + push!(algs, FastLUFactorization()) + push!(alg_names, "FastLUFactorization") + end + return algs, alg_names end