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

Remove cat adjoint in favour of ChainRules #1212

Merged
merged 2 commits into from
Apr 26, 2022
Merged

Conversation

ToucheSir
Copy link
Member

Now that this has been effectively superseded by https://github.com/JuliaDiff/ChainRules.jl/blob/v1.28.2/src/rulesets/Base/array.jl#L345, we can ease some of our maintenance burden. I've kept the tests around for now.

Copy link
Member

@mcabbott mcabbott left a comment

Choose a reason for hiding this comment

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

Sounds fine. Why not hcat, vcat, hvcat too?

@mzgubic
Copy link
Collaborator

mzgubic commented Apr 26, 2022

Why not hcat, vcat, hvcat too?

IIRC there are some issues because Zygote adjoints are typed as Number rather than Real/Complex. But removing these out would be great!

@mcabbott
Copy link
Member

I see rrule(::typeof(hcat), Xs::Union{AbstractArray, Number}...) there, vs. here:

@adjoint hcat(xs::Number...)
@adjoint hcat(A::Union{AbstractVector, AbstractMatrix}...)

In #1201 it was suggested to allow non-Number types too, which should be fine.

@DhairyaLGandhi
Copy link
Member

DhairyaLGandhi commented Apr 26, 2022

Is there a plan on adressing the inferrability/ stability in the general case. With say multiple dimensions?

@ToucheSir ToucheSir merged commit a392eab into master Apr 26, 2022
@ToucheSir ToucheSir deleted the bc/cat-chainrule branch April 26, 2022 20:52
@mcabbott mcabbott added the ChainRules adjoint -> rrule, and further integration label Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ChainRules adjoint -> rrule, and further integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants