Skip to content

Commit 2cffb6f

Browse files
Correct the usage section to emphasize automatic algorithm selection
- Remove manual algorithm specification examples - Emphasize that users just call solve(prob) - Explain that autotuning improves the default heuristics - Clarify that sharing results benefits everyone's automatic selection - Focus on the simplicity of just using solve() with better defaults
1 parent 80d52d0 commit 2cffb6f

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

news/2025/08/16/linearsolve_autotuning.md

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -103,32 +103,28 @@ For complex arithmetic, we found that specialized algorithms matter even more:
103103
- `LUFactorization` outperforms vendor libraries by **2x** for ComplexF32
104104
- Apple Accelerate struggles with complex numbers, making pure Julia implementations preferable
105105

106-
## Applying Your Results: Using the Optimal Algorithms
106+
## Using the Results: Automatic Algorithm Selection
107107

108-
Once you've identified the best algorithms for your system through autotuning, you can directly use them in your code:
108+
The beauty of LinearSolve.jl's autotuning system is that you don't need to manually specify algorithms. The benchmark results from the community directly improve the default heuristics, so you simply use:
109109

110110
```julia
111111
using LinearSolve
112112

113-
# Based on your autotuning results, choose the appropriate algorithm
113+
# Create your linear problem
114114
A = rand(100, 100)
115115
b = rand(100)
116-
117-
# For small matrices on Apple Silicon (from autotuning)
118116
prob = LinearProblem(A, b)
119-
sol = solve(prob, RFLUFactorization())
120-
121-
# For larger matrices
122-
A_large = rand(1000, 1000)
123-
b_large = rand(1000)
124-
prob_large = LinearProblem(A_large, b_large)
125-
sol_large = solve(prob_large, AppleAccelerateLUFactorization())
126117

127-
# Or let LinearSolve choose based on its heuristics
128-
sol_auto = solve(prob) # Uses default algorithm selection
118+
# Just solve - LinearSolve automatically picks the best algorithm!
119+
sol = solve(prob) # Uses optimized heuristics based on community benchmarks
129120
```
130121

131-
The autotuning results help inform LinearSolve.jl's internal heuristics, which are continuously improved based on community benchmark submissions. Future versions may support automatic preference setting based on your hardware configuration.
122+
The autotuning results you and others share help LinearSolve.jl make intelligent decisions about:
123+
- When to use pure Julia implementations vs vendor libraries
124+
- Matrix size thresholds for GPU acceleration
125+
- Special handling for complex numbers and sparse matrices
126+
127+
By contributing your benchmark results with `share_results()`, you're directly improving the default algorithm selection for everyone. The more diverse hardware configurations we collect, the smarter the automatic selection becomes.
132128

133129
## Performance Visualization: A Picture Worth 1000 Benchmarks
134130

0 commit comments

Comments
 (0)