Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,22 @@ OpenCLExt = ["OpenCL"]
oneAPIExt = ["oneAPI"]

[compat]
AMDGPU = "1, 2"
AMDGPU = "2"
Adapt = "4"
CUDA = "5, 6"
CUDA = "6"
ChainRulesCore = "1"
DiffEqBase = "7"
DocStringExtensions = "0.9"
ForwardDiff = "0.10.38, 1"
ForwardDiff = "1"
GPUArraysCore = "0.2"
JLArrays = "0.1, 0.2, 0.3"
JLArrays = "0.3"
KernelAbstractions = "0.9"
LinearSolve = "3"
Metal = "1"
MuladdMacro = "0.2"
OpenCL = "0.9, 0.10"
OpenCL = "0.10"
Parameters = "0.12"
RecursiveArrayTools = "3.37, 4"
RecursiveArrayTools = "4"
SciMLBase = "3"
Setfield = "1"
SimpleDiffEq = "1.11"
Expand Down
20 changes: 10 additions & 10 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@ StochasticDiffEq = "789caeaf-c7a9-5a7d-9973-96adeb23e2a0"
SymbolicIndexingInterface = "2efcf032-c050-4f8e-a9bb-153293bab1f5"

[compat]
Adapt = "3, 4"
Adapt = "4"
BenchmarkTools = "1"
CUDA = "4, 5, 6"
DiffEqBase = "6.120, 7"
DiffEqGPU = "1,2, 3"
CUDA = "6"
DiffEqBase = "7"
DiffEqGPU = "3"
Documenter = "1"
Flux = "0.13, 0.14, 0.15, 0.16"
ForwardDiff = "0.10, 1"
ModelingToolkit = "9, 10, 11"
OrdinaryDiffEq = "6, 7"
Flux = "0.16"
ForwardDiff = "1"
ModelingToolkit = "11"
OrdinaryDiffEq = "7"
Plots = "1"
SafeTestsets = "0.0.1, 0.1"
SafeTestsets = "0.1"
SciMLSensitivity = "7"
StaticArrays = "1"
Statistics = "1"
StochasticDiffEq = "6.57, 7"
StochasticDiffEq = "7"
SymbolicIndexingInterface = "0.3"
11 changes: 0 additions & 11 deletions src/DiffEqGPU.jl
Original file line number Diff line number Diff line change
Expand Up @@ -74,19 +74,9 @@ include("ensemblegpukernel/tableaus/kvaerno_tableaus.jl")
include("utils.jl")
include("algorithms.jl")
include("solve.jl")
# Re-export the ensemble interface from SciMLBase. Pre-OrdinaryDiffEq v7,
# `using OrdinaryDiffEq` transitively exposed these via `@reexport using
# SciMLBase` in DiffEqBase. v7 dropped that umbrella re-export, so users of
# `using DiffEqGPU` would otherwise have to add `using SciMLBase` just to
# build an `EnsembleProblem` to pass to DiffEqGPU's own ensemble algorithms.
export EnsembleProblem, EnsembleSolution, EnsembleSerial, EnsembleThreads,
EnsembleDistributed

# Re-export DAE init algorithms. v7's default is `CheckInit` (validate-only),
# which doesn't work for OOP `SVector` mass-matrix problems. Users solving
# such DAEs alongside DiffEqGPU's GPU ensemble paths need easy access to the
# pre-v7 default `BrownFullBasicInit` (auto-fix) without an extra `using
# DiffEqBase`.
export BrownFullBasicInit, CheckInit

export EnsembleCPUArray, EnsembleGPUArray, EnsembleGPUKernel, LinSolveGPUSplitFactorize
Expand All @@ -97,5 +87,4 @@ export GPURosenbrock23, GPURodas4, GPURodas5P, GPUKvaerno3, GPUKvaerno5

export terminate!

# This symbol is only defined on Julia versions that support extensions
end # module
9 changes: 0 additions & 9 deletions src/ensemblegpuarray/callbacks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,6 @@ function generate_callback(callback::ContinuousCallback, I, ensemblealg)
return nothing
end

# DiffEqBase v7's `apply_callback!` for `VectorContinuousCallback` invokes
# `callback.affect!(integrator, simultaneous_events::Vector{Int8})` once per
# step. Each entry of the mask is 0 (no trigger), -1 (upcrossing) or
# +1 (downcrossing) — see OrdinaryDiffEq v7 NEWS.md, "Breaking:
# VectorContinuousCallback affect! signature changed". We copy the host
# mask to a backend-native array, dispatch one GPU thread per trajectory,
# and route up/down crossings to the user's original `affect!` /
# `affect_neg!`. v7 no longer dispatches to `VectorContinuousCallback`'s
# `affect_neg!` field, so we don't supply one.
affect! = function (integrator, simultaneous_events::AbstractVector)
version = get_backend(integrator.u)
wgs = workgroupsize(version, size(integrator.u, 2))
Expand Down
7 changes: 0 additions & 7 deletions src/ensemblegpuarray/kernels.jl
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,6 @@ end
@views @inbounds out[i] = condition(u[:, i], t, FakeIntegrator(u[:, i], t, p[:, i]))
end

# v7: per-trajectory dispatch driven by the `simultaneous_events::Vector{Int8}`
# mask DiffEqBase passes to `VectorContinuousCallback`'s `affect!`. -1 marks an
# upcrossing → call the user's `affect!`; +1 marks a downcrossing → call
# `affect_neg!`. (See OrdinaryDiffEq v7 NEWS.md, "Breaking:
# VectorContinuousCallback affect! signature changed".) Iterating one thread
# per trajectory replaces the v6 `for i in event_idx` loop, which only worked
# because v6 passed the index of the *first* triggering trajectory as a scalar.
@kernel function continuous_affect!_kernel(
affect!, affect_neg!, simultaneous_events, u, t, p
)
Expand Down
12 changes: 2 additions & 10 deletions src/ensemblegpukernel/linalg/lu.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
# https://github.com/JuliaArrays/StaticArrays.jl/blob/master/src/lu.jl

# LU decomposition
pivot_options = if isdefined(LinearAlgebra, :PivotingStrategy) # introduced in Julia v1.7
(:(Val{true}), :(Val{false}), :NoPivot, :RowMaximum)
else
(:(Val{true}), :(Val{false}))
end
pivot_options = (:(Val{true}), :(Val{false}), :NoPivot, :RowMaximum)
for pv in pivot_options
# ... define each `pivot::Val{true/false}` method individually to avoid ambiguties
@eval function static_lu(A::StaticLUMatrix, pivot::$pv; check = true)
Expand Down Expand Up @@ -39,11 +35,7 @@ function _first_zero_on_diagonal(A::StaticLUMatrix{M, N, T}) where {M, N, T}
end

@generated function _lu(A::StaticLUMatrix{M, N, T}, pivot, check) where {M, N, T}
_pivot = if isdefined(LinearAlgebra, :PivotingStrategy) # v1.7 feature
pivot === RowMaximum ? Val(true) : pivot === NoPivot ? Val(false) : pivot()
else
pivot()
end
_pivot = pivot === RowMaximum ? Val(true) : pivot === NoPivot ? Val(false) : pivot()
return quote
L, U, P = __lu(A, $(_pivot))
if check
Expand Down
26 changes: 13 additions & 13 deletions test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,26 @@ pocl_jll = "627d6b7a-bbe6-5189-83e7-98cc0a5aeadd"
[compat]
Adapt = "4"
BenchmarkTools = "1"
CUDA = "5, 6"
DiffEqDevTools = "2, 3, 4.0"
CUDA = "6"
DiffEqDevTools = "3"
DiffEqGPU = "3"
ForwardDiff = "0.10.38, 1"
ForwardDiff = "1"
GPUArraysCore = "0.2"
JLArrays = "0.1, 0.2, 0.3"
JLArrays = "0.3"
KernelAbstractions = "0.9"
ModelingToolkit = "11.17.0"
OpenCL = "0.9, 0.10"
Optimization = "4, 5"
OpenCL = "0.10"
Optimization = "5"
OptimizationOptimisers = "0.3"
OrdinaryDiffEq = "6, 7"
OrdinaryDiffEqRosenbrock = "1, 2"
OrdinaryDiffEqSDIRK = "1, 2"
OrdinaryDiffEqStabilizedRK = "1, 2"
OrdinaryDiffEq = "7"
OrdinaryDiffEqRosenbrock = "2"
OrdinaryDiffEqSDIRK = "2"
OrdinaryDiffEqStabilizedRK = "2"
SafeTestsets = "0.1"
SciMLBase = "2.144, 3"
SciMLBase = "3"
StaticArrays = "1.9"
Statistics = "1"
StochasticDiffEq = "6, 7"
StochasticDiffEq = "7"
TOML = "1"
Zygote = "0.7.3"
pocl_jll = "6, 7"
pocl_jll = "7"
2 changes: 1 addition & 1 deletion test/distributed_multi_gpu.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Distributed
addprocs(2)
@everywhere using DiffEqGPU, OrdinaryDiffEq, Test, Random
@everywhere using OrdinaryDiffEqStabilizedRK: ROCK4 # v7 narrowed umbrella exports
@everywhere using OrdinaryDiffEqStabilizedRK: ROCK4
@everywhere include("utils.jl")

@everywhere begin
Expand Down
2 changes: 0 additions & 2 deletions test/ensemblegpuarray.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using DiffEqGPU, OrdinaryDiffEq, Test
# v7's umbrella narrowed its solver re-exports; pull every non-default solver
# this file references from its sublibrary explicitly.
using OrdinaryDiffEqRosenbrock: Rodas5
using OrdinaryDiffEqSDIRK: TRBDF2
using OrdinaryDiffEqStabilizedRK: ROCK4
Expand Down
2 changes: 0 additions & 2 deletions test/ensemblegpuarray_inputtypes.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# OrdinaryDiffEq v7 no longer re-exports SciMLBase, so pull SciMLBase in
# directly — this test references `SciMLBase.FullSpecialize` on line 17.
using OrdinaryDiffEq, DiffEqGPU, ForwardDiff, Test
using SciMLBase

Expand Down
2 changes: 1 addition & 1 deletion test/ensemblegpuarray_oop.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using DiffEqGPU, OrdinaryDiffEq, StaticArrays
using OrdinaryDiffEqSDIRK: TRBDF2 # not in OrdinaryDiffEq v7 umbrella exports
using OrdinaryDiffEqSDIRK: TRBDF2

include("utils.jl")

Expand Down
3 changes: 0 additions & 3 deletions test/gpu_kernel_de/stiff_ode/gpu_ode_discrete_callbacks.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using DiffEqGPU, OrdinaryDiffEq, StaticArrays, LinearAlgebra
# OrdinaryDiffEq v7's umbrella only re-exports Rosenbrock23 and Rodas5P from
# the Rosenbrock family (see NEWS.md "Package scope reduction"). Pull Rodas4
# from its sublibrary explicitly.
using OrdinaryDiffEqRosenbrock: Rodas4
@info "Callbacks"

Expand Down
8 changes: 0 additions & 8 deletions test/gpu_kernel_de/stiff_ode/gpu_ode_mass_matrix.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,6 @@ monteprob = EnsembleProblem(prob, safetycopy = false)

alg = GPURosenbrock23()

# OrdinaryDiffEq v7 changed the default DAE initialization from
# `BrownFullBasicInit` (auto-fix) to `CheckInit` (validate-only). SciMLBase's
# OOP `CheckInit` then calls `tmp .= …` on the f-evaluation result, but for
# an out-of-place `SVector` problem that result is itself an `SVector`, so
# the in-place broadcast errors with `setindex!(::SVector, …)`. Pass the
# pre-v7 default explicitly to restore the auto-fix behaviour for the bench
# solve. See OrdinaryDiffEq v7 NEWS.md, "Default DAE initialization changed
# to CheckInit".
bench_sol = solve(
prob, Rosenbrock23(), dt = 0.1, abstol = 1.0f-5, reltol = 1.0f-5,
initializealg = BrownFullBasicInit()
Expand Down
4 changes: 0 additions & 4 deletions test/gpu_kernel_de/stiff_ode/gpu_ode_modelingtoolkit_dae.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ monteprob = SciMLBase.EnsembleProblem(prob, safetycopy = false)
adaptive = false
)
@test length(sol.u) == 2
# `sol.u[1].u[end]` rather than `sol.u[1][end]`: under RecursiveArrayTools v4
# an `ODESolution` is an `AbstractArray` and `[end]` returns the last scalar
# element, not the last timestep. See OrdinaryDiffEq v7 NEWS.md, "ODESolution
# is now an AbstractArray".
@test !any(isnan, sol.u[1].u[end])
@test abs(sol.u[1].u[end][1] + sol.u[1].u[end][2] - 1.0f0) < 0.01f0
end
Expand Down
Loading