Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tag #270

Closed
wants to merge 1 commit into from
Closed
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
10 changes: 6 additions & 4 deletions src/highlevel/forward_mode.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
coloring_result = sd(ad, f, x)
fx = fx === nothing ? similar(f(x)) : fx
if coloring_result isa NoMatrixColoring
cache = ForwardDiff.JacobianConfig(f, x, __chunksize(ad, x),
ifelse(ad.tag === nothing, SparseDiffToolsTag(), ad.tag))
tag = ifelse(ad.tag === nothing,

Check warning on line 16 in src/highlevel/forward_mode.jl

View check run for this annotation

Codecov / codecov/patch

src/highlevel/forward_mode.jl#L16

Added line #L16 was not covered by tests
ForwardDiff.Tag(SparseDiffToolsTag(), eltype(x)), ad.tag)
cache = ForwardDiff.JacobianConfig(f, x, __chunksize(ad, x), tag)

Check warning on line 18 in src/highlevel/forward_mode.jl

View check run for this annotation

Codecov / codecov/patch

src/highlevel/forward_mode.jl#L18

Added line #L18 was not covered by tests
jac_prototype = nothing
else
cache = ForwardColorJacCache(f, x, __chunksize(ad); coloring_result.colorvec,
Expand All @@ -28,8 +29,9 @@
sd::AbstractMaybeSparsityDetection, f!::F, fx, x) where {F}
coloring_result = sd(ad, f!, fx, x)
if coloring_result isa NoMatrixColoring
cache = ForwardDiff.JacobianConfig(f!, fx, x, __chunksize(ad, x),
ifelse(ad.tag === nothing, SparseDiffToolsTag(), ad.tag))
tag = ifelse(ad.tag === nothing,

Check warning on line 32 in src/highlevel/forward_mode.jl

View check run for this annotation

Codecov / codecov/patch

src/highlevel/forward_mode.jl#L32

Added line #L32 was not covered by tests
ForwardDiff.Tag(SparseDiffToolsTag(), eltype(x)), ad.tag)
cache = ForwardDiff.JacobianConfig(f!, fx, x, __chunksize(ad, x), tag)

Check warning on line 34 in src/highlevel/forward_mode.jl

View check run for this annotation

Codecov / codecov/patch

src/highlevel/forward_mode.jl#L34

Added line #L34 was not covered by tests
jac_prototype = nothing
else
cache = ForwardColorJacCache(f!, x, __chunksize(ad); coloring_result.colorvec,
Expand Down
Loading