Skip to content

Commit 7c8f21e

Browse files
Merge branch 'master' into compathelper/new_version/2024-09-20-16-09-35-712-03414958508
2 parents 9419d21 + fb76984 commit 7c8f21e

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

Project.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ authors = ["Christopher Rackauckas <[email protected]>", "Yingbo Ma <
44
version = "7.67.0"
55

66
[deps]
7-
Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697"
87
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
8+
Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697"
99
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
1010
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
1111
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
@@ -45,8 +45,8 @@ TruncatedStacktraces = "781d530d-4396-4725-bb49-402e4bee1e77"
4545
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
4646

4747
[compat]
48-
Accessors = "0.1.36"
4948
ADTypes = "0.1, 0.2, 1"
49+
Accessors = "0.1.36"
5050
Adapt = "1.0, 2.0, 3.0, 4"
5151
AlgebraicMultigrid = "0.6.0"
5252
Aqua = "0.8.4"
@@ -61,7 +61,7 @@ DiffEqNoiseProcess = "5.19"
6161
Distributed = "1"
6262
Distributions = "0.25"
6363
EllipsisNotation = "1"
64-
Enzyme = "0.12"
64+
Enzyme = "0.12, 0.13"
6565
FiniteDiff = "2"
6666
ForwardDiff = "0.10"
6767
FunctionProperties = "0.1"

docs/Project.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ DiffEqCallbacks = "2.24, 3"
4141
DiffEqNoiseProcess = "5.14"
4242
DifferentialEquations = "7"
4343
Documenter = "1"
44-
Enzyme = "0.12"
44+
Enzyme = "0.12, 0.13"
4545
Flux = "0.14"
4646
ForwardDiff = "0.10"
4747
IterTools = "1"
4848
Lux = "0.5.7, 1"
4949
LuxCUDA = "0.3"
5050
Optimization = "3.9, 4"
51-
OptimizationOptimJL = "0.2, 0.3"
52-
OptimizationOptimisers = "0.2"
51+
OptimizationOptimJL = "0.2, 0.3, 0.4"
52+
OptimizationOptimisers = "0.2, 0.3"
5353
OptimizationPolyalgorithms = "0.2"
5454
OrdinaryDiffEq = "6.31"
5555
Plots = "1.36"

test/gpu/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ LuxCUDA = "d0bbae9a-e099-4d5b-a835-1c6931763bda"
77
[compat]
88
CUDA = "3.12, 4, 5"
99
DiffEqCallbacks = "2.24, 3"
10-
DiffEqFlux = "3"
10+
DiffEqFlux = "3, 4"
1111
LuxCUDA = "0.3.1"

test/gpu/mixed_gpu_cpu_adjoint.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
using SciMLSensitivity, OrdinaryDiffEq
22
using Lux, LuxCUDA, Test, Zygote, Random, LinearAlgebra, ComponentArrays
33

4+
const gdev = gpu_device()
5+
46
CUDA.allowscalar(false)
57

68
H = CuArray(rand(Float32, 2, 2))
@@ -42,10 +44,10 @@ grad = Zygote.gradient(cost, p)[1]
4244
rng = MersenneTwister(1234)
4345
m = 32
4446
n = 16
45-
Z = randn(rng, Float32, (n, m)) |> gpu
47+
Z = randn(rng, Float32, (n, m)) |> gdev
4648
𝒯 = 2.0f0
4749
Δτ = 1.0f-1
48-
ca_init = [zeros(1); ones(m)] |> gpu
50+
ca_init = [zeros(1); ones(m)] |> gdev
4951

5052
function f(ca, Z, t)
5153
a = ca[2:end]
@@ -54,7 +56,7 @@ function f(ca, Z, t)
5456
Ka_unit = Z' * w_unit
5557
z_unit = dot(abs.(Ka_unit), a_unit)
5658
aKa_over_z = a .* Ka_unit / z_unit
57-
[sum(aKa_over_z) / m; -abs.(aKa_over_z)] |> gpu
59+
[sum(aKa_over_z) / m; -abs.(aKa_over_z)] |> gdev
5860
end
5961

6062
function c(Z)

0 commit comments

Comments
 (0)