Skip to content

Commit 8948063

Browse files
committed
Update
1 parent d1880b8 commit 8948063

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/Nonlinear/ReverseAD/forward_over_reverse.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@
66

77
const TAG = :ReverseAD
88

9+
"""
10+
const MAX_CHUNK::Int = 10
11+
12+
An upper bound on the chunk sie for forward-over-reverse. Increasing this could
13+
improve performance at the cost of extra memory allocation. It has been 10 for a
14+
long time, and nobody seems to have complained.
15+
"""
916
const MAX_CHUNK = 10
1017

1118
"""

test/Nonlinear/ReverseAD.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ function test_objective_quadratic_multivariate_subexpressions()
156156
H = [NaN, NaN, NaN]
157157
μ = Float64[]
158158
MOI.eval_hessian_lagrangian(evaluator, H, val, 1.5, μ)
159+
@test 0 == @allocated MOI.eval_hessian_lagrangian(evaluator, H, val, 1.5, μ)
159160
@test H == 1.5 .* [2.0, 2.0, 1.0]
160161
v = [0.3, 0.4]
161162
hv = [NaN, NaN]

0 commit comments

Comments
 (0)