Skip to content

Commit 28bb36b

Browse files
committed
Fix check forward mode
1 parent 51aacab commit 28bb36b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/internal/helpers.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@ end
3232
# AutoDiff Selection Functions
3333
function get_concrete_forward_ad(
3434
autodiff::ADTypes.AbstractADType, prob, sp::Val{test_sparse} = True,
35-
args...; check_reverse_mode = true, kwargs...) where {test_sparse}
36-
# TODO: shouldn't this be `check_forward_mode`?
37-
if !isa(ADTypes.mode(autodiff), ADTypes.ForwardMode) && check_reverse_mode
35+
args...; check_forward_mode = true, kwargs...) where {test_sparse}
36+
if !isa(ADTypes.mode(autodiff), ADTypes.ForwardMode) && check_forward_mode
3837
@warn "$(autodiff)::$(typeof(autodiff)) is not a `ForwardMode`. Use with caution." maxlog=1
3938
end
4039
return autodiff

0 commit comments

Comments
 (0)