- Discuss Zygote PRs:
Video link: https://youtu.be/8HOeSQSjSMc
- Tests pass, seems like a reasonable change
- Are there unintended/untested consequences?
- Based on linked Julia PR, semantics of
accum
should matchx + y
notx .+ y
- Change seems good to go
- Minor issues like naming anonymous functions
- Why is
Base.Broadcast.Broadcasted(::Nothing)
marked as non-differentiable?- Enters call stack via
copyto!(::Buffer, ::Broadcasted{Nothing})
mechanism - But gradient should be
nothing
anyways
- Enters call stack via
- Originally adapting
Iterators.product
pullback for scalar iterators, but augmented for inferrability - Scalar-related changes isolated to original lines 282 and 283—all other changes seem to be for type stability
- Unclear why swapping
ntuple
construction formap
is more type stable - Unclear why using a
Vector{Int}
fordims
is more type stable than anntuple
- Changes for type stability appear to be functionally the same as original—so this is good to go sans uncertainty about why it is more type stable