-
Notifications
You must be signed in to change notification settings - Fork 89
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
repeat
rrule ambiguity for Bool arrays
#654
Labels
Comments
Can we just do @non_differentiable repeat(::AbstractArray{Bool}, ::Integer...) It's just integers that are expected as the counts right? |
Might be worth trying to be systematic about these... at least to track progress. Not sure what to make of the julia> filter(Test.detect_ambiguities(ChainRules, ChainRulesCore)) do t
(t[1].name in [:frule, Symbol("frule##kw")])
end |> length
1242
julia> filter(Test.detect_ambiguities(ChainRules, ChainRulesCore)) do t
(t[1].name in [:rrule, Symbol("rrule##kw")])
end
8-element Vector{Tuple{Method, Method}}:
(rrule(::typeof(findfirst), var"776"::Union{Regex, AbstractChar, AbstractString, Function}, var"777"::AbstractString; findfirst_pullback)
@ ChainRules ~/.julia/packages/ChainRules/BbzFc/src/rulesets/Base/nondiff.jl:175, rrule(::typeof(findfirst), var"780"::Function, var"781"; findfirst_pullback)
@ ChainRules ~/.julia/packages/ChainRules/BbzFc/src/rulesets/Base/nondiff.jl:176)
((::ChainRulesCore.var"#rrule##kw")(kwargs, ::typeof(rrule), ::typeof(findfirst), var"780"::Function, var"781")
@ ChainRules none:0, (::ChainRulesCore.var"#rrule##kw")(kwargs, ::typeof(rrule), ::typeof(findfirst), var"776"::Union{Regex, AbstractChar, AbstractString, Function}, var"777"::AbstractString)
@ ChainRules none:0)
((::ChainRulesCore.var"#rrule##kw")(kwargs, ::typeof(rrule), ::typeof(findfirst), var"776"::Union{Regex, AbstractChar, AbstractString, Function}, var"777"::AbstractString)
@ ChainRules none:0, (::ChainRulesCore.var"#rrule##kw")(kwargs, ::typeof(rrule), ::typeof(findfirst), var"780"::Function, var"781")
@ ChainRules none:0)
((::ChainRulesCore.var"#rrule##kw")(kwargs, ::typeof(rrule), ::typeof(findlast), var"791"::Function, var"792")
@ ChainRules none:0, (::ChainRulesCore.var"#rrule##kw")(kwargs, ::typeof(rrule), ::typeof(findlast), var"787"::Union{AbstractChar, AbstractString, Function}, var"788"::AbstractString)
@ ChainRules none:0)
(rrule(::typeof(findlast), var"787"::Union{AbstractChar, AbstractString, Function}, var"788"::AbstractString; findlast_pullback)
@ ChainRules ~/.julia/packages/ChainRules/BbzFc/src/rulesets/Base/nondiff.jl:178, rrule(::typeof(findlast), var"791"::Function, var"792"; findlast_pullback)
@ ChainRules ~/.julia/packages/ChainRules/BbzFc/src/rulesets/Base/nondiff.jl:179)
((::ChainRulesCore.var"#rrule##kw")(kwargs, ::typeof(rrule), ::typeof(findlast), var"787"::Union{AbstractChar, AbstractString, Function}, var"788"::AbstractString)
@ ChainRules none:0, (::ChainRulesCore.var"#rrule##kw")(kwargs, ::typeof(rrule), ::typeof(findlast), var"791"::Function, var"792")
@ ChainRules none:0)
(rrule(::Type{Matrix}, var"427"::AbstractArray{Bool}; Matrix_pullback)
@ ChainRules ~/.julia/packages/ChainRules/BbzFc/src/rulesets/Base/nondiff.jl:57, rrule(TM::Type{<:Matrix}, A::Union{LinearAlgebra.Hermitian{T, S}, LinearAlgebra.Symmetric{T, S}} where {T, S})
@ ChainRules ~/.julia/packages/ChainRules/BbzFc/src/rulesets/LinearAlgebra/symmetric.jl:25)
(rrule(::typeof(repeat), xs::AbstractArray, counts::Integer...)
@ ChainRules ~/.julia/packages/ChainRules/BbzFc/src/rulesets/Base/array.jl:191, rrule(::typeof(repeat), var"454"::AbstractArray{Bool}, var"455"...; repeat_pullback)
@ ChainRules ~/.julia/packages/ChainRules/BbzFc/src/rulesets/Base/nondiff.jl:65) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Found while working on FluxML/Zygote.jl#1234. Is there a way to constrain the vararg type in
ChainRules.jl/src/rulesets/Base/nondiff.jl
Line 65 in 1770bb2
The text was updated successfully, but these errors were encountered: