Skip to content

Commit 4fb77e2

Browse files
Bump to use SciMLBase ImmutableNonlinearProblem
1 parent fb17614 commit 4fb77e2

File tree

4 files changed

+4
-62
lines changed

4 files changed

+4
-62
lines changed

docs/src/tutorials/nonlinear_solve_gpus.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ end
142142

143143
p = @SVector [@SVector(rand(Float32, 4)) for _ in 1:1024]
144144
u0 = SA[1f0, 2f0, 3f0, 4f0]
145-
prob = NonlinearSolveBase.ImmutableNonlinearProblem{false}(p2_f, u0, p)
145+
prob = SciMLBase.ImmutableNonlinearProblem{false}(p2_f, u0, p)
146146
```
147147

148148
!!! note
@@ -152,7 +152,7 @@ prob = NonlinearSolveBase.ImmutableNonlinearProblem{false}(p2_f, u0, p)
152152
In general, this means that you need to avoid any runtime operations in kernel code,
153153
such as allocating vectors, dynamic dispatch, type instabilities, etc. Thus to make this
154154
work, your `f` function should be non-allocating, your `u0` function should use
155-
StaticArrays, and you must use `NonlinearSolveBase.ImmutableNonlinearProblem`
155+
StaticArrays, and you must use `SciMLBase.ImmutableNonlinearProblem`
156156
(which is exactly the same as NonlinearProblem except it's immutable to satisfy the
157157
requirements of GPU kernels). Also, it's recommended that for most GPUs you use Float32
158158
precision because many GPUs are much slower on 64-bit floating point operations.

lib/NonlinearSolveBase/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ MaybeInplace = "0.1.4"
6868
Preferences = "1.4"
6969
Printf = "1.10"
7070
RecursiveArrayTools = "3"
71-
SciMLBase = "2.89.1"
71+
SciMLBase = "2.91"
7272
SciMLJacobianOperators = "0.1.1"
7373
SciMLOperators = "0.3.13, 0.4"
7474
SparseArrays = "1.10"

lib/NonlinearSolveBase/src/NonlinearSolveBase.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ using SciMLBase: SciMLBase, ReturnCode, AbstractODEIntegrator, AbstractNonlinear
2020
AbstractNonlinearAlgorithm, AbstractNonlinearFunction,
2121
NonlinearProblem, NonlinearLeastSquaresProblem, StandardNonlinearProblem,
2222
NonlinearFunction, NullParameters, NLStats, LinearProblem,
23-
LinearAliasSpecifier
23+
LinearAliasSpecifier, ImmutableNonlinearProblem
2424
using SciMLJacobianOperators: JacobianOperator, StatefulJacobianOperator
2525
using SciMLOperators: AbstractSciMLOperator, IdentityOperator
2626
using SymbolicIndexingInterface: SymbolicIndexingInterface
@@ -36,8 +36,6 @@ include("public.jl")
3636
include("utils.jl")
3737

3838
include("abstract_types.jl")
39-
40-
include("immutable_problem.jl")
4139
include("common_defaults.jl")
4240
include("termination_conditions.jl")
4341

lib/NonlinearSolveBase/src/immutable_problem.jl

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)