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

Yota support #50

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
ExprTools = "e2ba6199-217a-4e67-a87a-7c52f15ade04"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"

[compat]
ChainRulesCore = "1"
Expand All @@ -26,7 +27,8 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c"
Yota = "cd998857-8626-517d-b929-70ad188a48f0"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"

[targets]
test = ["Test", "FiniteDifferences", "ForwardDiff", "Random", "ReverseDiff", "Tracker", "Zygote"]
test = ["Test", "FiniteDifferences", "ForwardDiff", "Random", "ReverseDiff", "Tracker", "Yota", "Zygote"]
3 changes: 3 additions & 0 deletions src/AbstractDifferentiation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,9 @@ function __init__()
ZygoteBackend() = ReverseRuleConfigBackend(Zygote.ZygoteRuleConfig())
end
end
@require Yota = "cd998857-8626-517d-b929-70ad188a48f0" begin
YotaBackend() = ReverseRuleConfigBackend(Yota.YotaRuleConfig())
end
end

end
4 changes: 2 additions & 2 deletions test/ruleconfig.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using AbstractDifferentiation
using Test
using Zygote
using Zygote, Yota

@testset "ReverseRuleConfigBackend(ZygoteRuleConfig())" begin
backends = [@inferred(AD.ZygoteBackend())]
backends = [@inferred(AD.ZygoteBackend()), @inferred(AD.YotaBackend())]
@testset for backend in backends
@testset "Derivative" begin
test_derivatives(backend)
Expand Down