Skip to content

Commit

Permalink
Merge pull request #189 from JuliaDiff/ox/1pb
Browse files Browse the repository at this point in the history
Switch to pullbacks only taking a single input
  • Loading branch information
oxinabox authored May 20, 2020
2 parents 2d8b265 + 3fe9c7d commit 54d1d74
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "ChainRules"
uuid = "082447d4-558c-5d27-93f4-14fc19e9eca2"
version = "0.5.3"
version = "0.6.0"

[deps]
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
Expand All @@ -10,8 +10,8 @@ Requires = "ae029012-a4dd-5104-9daa-d747884805df"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[compat]
ChainRulesCore = "0.7"
ChainRulesTestUtils = "0.2.2"
ChainRulesCore = "0.8"
ChainRulesTestUtils = "0.3"
Compat = "3"
FiniteDifferences = "0.9"
Reexport = "0.2"
Expand Down
11 changes: 0 additions & 11 deletions src/rulesets/Base/base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,3 @@ function rrule(::typeof(identity), x)
end
return (x, identity_pullback)
end

function rrule(::typeof(identity), x::Tuple)
# `identity(::Tuple)` returns multiple outputs;because that is how we think of
# returning a tuple, so its pullback needs to accept multiple inputs.
# `identity(::Tuple)` has one input, so its pullback should return 1 matching output
# see https://github.com/JuliaDiff/ChainRulesCore.jl/issues/152
function identity_pullback(ȳs...)
return (NO_FIELDS, Composite{typeof(x)}(ȳs...))
end
return x, identity_pullback
end

2 comments on commit 54d1d74

@oxinabox
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 register()

@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/15058

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.6.0 -m "<description of version>" 54d1d74c815df0a2d4c864706a8f6f45f13416d4
git push origin v0.6.0

Please sign in to comment.