Skip to content

Commit

Permalink
Merge pull request #13 from dingraha/precompile_error
Browse files Browse the repository at this point in the history
Qualify access to TrackedReal and TrackedArray in nonlinear.jl
  • Loading branch information
andrewning authored Jul 21, 2023
2 parents e67909f + a9f1dcc commit 5aede62
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ImplicitAD"
uuid = "e7cbb90b-9b31-4eb2-a8c8-45099c074ee1"
authors = ["Andrew Ning <[email protected]> and contributors"]
version = "0.3"
version = "0.3.1"

[deps]
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
Expand Down
4 changes: 2 additions & 2 deletions src/external.jl
Original file line number Diff line number Diff line change
Expand Up @@ -196,5 +196,5 @@ function ChainRulesCore.rrule(::typeof(_provide_rule), func, x, p, mode, jacobia
return y, pullback
end

ReverseDiff.@grad_from_chainrules _provide_rule(func, x::TrackedArray, p, mode, jacobian, jvp, vjp)
ReverseDiff.@grad_from_chainrules _provide_rule(func, x::AbstractArray{<:TrackedReal}, p, mode, jacobian, jvp, vjp)
ReverseDiff.@grad_from_chainrules _provide_rule(func, x::ReverseDiff.TrackedArray, p, mode, jacobian, jvp, vjp)
ReverseDiff.@grad_from_chainrules _provide_rule(func, x::AbstractArray{<:ReverseDiff.TrackedReal}, p, mode, jacobian, jvp, vjp)
6 changes: 3 additions & 3 deletions src/linear.jl
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,9 @@ function ChainRulesCore.rrule(::typeof(_implicit_linear), A, b, lsolve, Af)
end

# register above rule for ReverseDiff
ReverseDiff.@grad_from_chainrules _implicit_linear(A::Union{TrackedArray, AbstractArray{<:TrackedReal}}, b, lsolve, Af)
ReverseDiff.@grad_from_chainrules _implicit_linear(A, b::Union{TrackedArray, AbstractArray{<:TrackedReal}}, lsolve, Af)
ReverseDiff.@grad_from_chainrules _implicit_linear(A::Union{TrackedArray, AbstractArray{<:TrackedReal}}, b::Union{TrackedArray, AbstractVector{<:TrackedReal}}, lsolve, Af)
ReverseDiff.@grad_from_chainrules _implicit_linear(A::Union{ReverseDiff.TrackedArray, AbstractArray{<:ReverseDiff.TrackedReal}}, b, lsolve, Af)
ReverseDiff.@grad_from_chainrules _implicit_linear(A, b::Union{ReverseDiff.TrackedArray, AbstractArray{<:ReverseDiff.TrackedReal}}, lsolve, Af)
ReverseDiff.@grad_from_chainrules _implicit_linear(A::Union{ReverseDiff.TrackedArray, AbstractArray{<:ReverseDiff.TrackedReal}}, b::Union{ReverseDiff.TrackedArray, AbstractVector{<:ReverseDiff.TrackedReal}}, lsolve, Af)


# function implicit_linear_inplace(A, b, y, Af)
Expand Down
4 changes: 2 additions & 2 deletions src/nonlinear.jl
Original file line number Diff line number Diff line change
Expand Up @@ -117,5 +117,5 @@ end


# register above rule for ReverseDiff
ReverseDiff.@grad_from_chainrules _implicit(solve, residual, x::TrackedArray, p, drdy, lsolve)
ReverseDiff.@grad_from_chainrules _implicit(solve, residual, x::AbstractVector{<:TrackedReal}, p, drdy, lsolve)
ReverseDiff.@grad_from_chainrules _implicit(solve, residual, x::ReverseDiff.TrackedArray, p, drdy, lsolve)
ReverseDiff.@grad_from_chainrules _implicit(solve, residual, x::AbstractVector{<:ReverseDiff.TrackedReal}, p, drdy, lsolve)

2 comments on commit 5aede62

@andrewning
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/88011

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.3.1 -m "<description of version>" 5aede6262fc8e1f3f02b8ae75ad5908ebcf09568
git push origin v0.3.1

Please sign in to comment.