Skip to content

Commit 259f425

Browse files
committed
docs: add describe(:cpu) and describe(:gpu) functionality
- Add examples showing describe(:cpu) and describe(:gpu) in main solve manual - Enhance GPU manual with describe(:gpu) to show GPU-compatible strategies - Remove unnecessary Draft meta blocks - Update documentation assets for new CTSolvers version
1 parent e7d2b01 commit 259f425

3 files changed

Lines changed: 29 additions & 8 deletions

File tree

docs/src/assets/Manifest.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -266,9 +266,9 @@ version = "0.8.9-beta"
266266

267267
[[deps.CTSolvers]]
268268
deps = ["ADNLPModels", "CTBase", "CTModels", "CommonSolve", "DocStringExtensions", "ExaModels", "KernelAbstractions", "NLPModels", "SolverCore"]
269-
git-tree-sha1 = "a815a0e8128bd2d967a0200a08e31decf47fdc71"
269+
git-tree-sha1 = "384ecf74a31d4401e22d422d49270c10fb81bc00"
270270
uuid = "d3e8d392-8e4b-4d9b-8e92-d7d4e3650ef6"
271-
version = "0.4.7-beta"
271+
version = "0.4.8-beta"
272272

273273
[deps.CTSolvers.extensions]
274274
CTSolversCUDA = "CUDA"
@@ -1218,9 +1218,9 @@ version = "1.12.0"
12181218

12191219
[[deps.KNITRO]]
12201220
deps = ["KNITRO_jll", "Libdl"]
1221-
git-tree-sha1 = "ac4beadd940eddb4de585f53eb97a7bd528f1c41"
1221+
git-tree-sha1 = "5e38b3c29bb35b04aac3eef0b7357a47a566346a"
12221222
uuid = "67920dd8-b58e-52a8-8622-53c4cffbe346"
1223-
version = "1.2.0"
1223+
version = "1.2.1"
12241224

12251225
[deps.KNITRO.extensions]
12261226
KNITROMathOptInterfaceExt = ["MathOptInterface"]
@@ -1458,9 +1458,9 @@ version = "2.13.0"
14581458

14591459
[[deps.LinearSolve]]
14601460
deps = ["ArrayInterface", "ChainRulesCore", "ConcreteStructs", "DocStringExtensions", "EnumX", "GPUArraysCore", "InteractiveUtils", "Krylov", "Libdl", "LinearAlgebra", "MKL_jll", "Markdown", "OpenBLAS_jll", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLLogging", "SciMLOperators", "Setfield", "StaticArraysCore"]
1461-
git-tree-sha1 = "86b5b25ca3b97d248133d055463c31ebc4de2bbb"
1461+
git-tree-sha1 = "57a7bea58da7de6906f2621294ea35656cb40c5f"
14621462
uuid = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae"
1463-
version = "3.65.0"
1463+
version = "3.66.0"
14641464

14651465
[deps.LinearSolve.extensions]
14661466
LinearSolveAMDGPUExt = "AMDGPU"
@@ -1923,9 +1923,9 @@ version = "1.22.0"
19231923

19241924
[[deps.OrdinaryDiffEqCore]]
19251925
deps = ["ADTypes", "Accessors", "Adapt", "ArrayInterface", "ConcreteStructs", "DataStructures", "DiffEqBase", "DocStringExtensions", "EnumX", "EnzymeCore", "FastBroadcast", "FastClosures", "FastPower", "FillArrays", "FunctionWrappersWrappers", "InteractiveUtils", "LinearAlgebra", "Logging", "MacroTools", "MuladdMacro", "Polyester", "PrecompileTools", "Preferences", "Random", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLLogging", "SciMLOperators", "SciMLStructures", "Static", "StaticArrayInterface", "StaticArraysCore", "SymbolicIndexingInterface", "TruncatedStacktraces"]
1926-
git-tree-sha1 = "9b8819db9b1ce0633a990fb2384a0fdcbb27fa14"
1926+
git-tree-sha1 = "b0b386226690c23ebc771cd68a37d08c55b60924"
19271927
uuid = "bbf590c4-e513-4bbe-9b18-05decba2e5d8"
1928-
version = "3.20.0"
1928+
version = "3.21.0"
19291929

19301930
[deps.OrdinaryDiffEqCore.extensions]
19311931
OrdinaryDiffEqCoreMooncakeExt = "Mooncake"

docs/src/manual-solve-gpu.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,16 @@ The `:gpu` parameter automatically selects GPU-optimized defaults:
7272
- **Exa modeler**: CUDA backend + GPU-optimized automatic differentiation
7373
- **MadNLP solver**: `CUDSSSolver` linear solver (instead of `MumpsSolver`)
7474

75+
You can inspect which strategies support the GPU parameter:
76+
77+
```@example gpu
78+
describe(:gpu)
79+
```
80+
81+
This shows that only `:exa`, `:madnlp`, and `:madncl` strategies have GPU-parameterized versions.
82+
83+
The GPU parameter changes default options:
84+
7585
```@example gpu
7686
# GPU defaults
7787
modeler = OptimalControl.Exa{GPU}()

docs/src/manual-solve.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,17 @@ Each method is a **quadruplet** `(discretizer, modeler, solver, parameter)`:
109109
- `:cpu`: CPU execution (default)
110110
- `:gpu`: GPU execution (only for `:exa` modeler with `:madnlp` or `:madncl` solvers)
111111

112+
You can inspect which strategies use a given parameter:
113+
114+
```@example main
115+
describe(:cpu)
116+
```
117+
118+
```@example main
119+
using CUDA, MadNLPGPU
120+
describe(:gpu)
121+
```
122+
112123
!!! note "Priority order"
113124

114125
The order of methods in the list above determines the **priority** for auto-completion. When you provide a partial description, the first matching method from top to bottom is selected. This is why the first method `(:collocation, :adnlp, :ipopt, :cpu)` is the default.

0 commit comments

Comments
 (0)