Skip to content

Commit

Permalink
Revert "Don't unthunk explicitly in unbroadcast"
Browse files Browse the repository at this point in the history
This reverts commit 34865ea.
  • Loading branch information
oschulz committed Mar 11, 2022
1 parent e6aa6d0 commit ea2dafa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/broadcast.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ function Base.reducedim_init(::typeof(identity), ::typeof(accum), A::AbstractArr
Base.reducedim_initarray(A, region, nothing, Union{Nothing,eltype(A)})
end

function unbroadcast(x::AbstractArray, x̄)
function unbroadcast(x::AbstractArray, maybethunked_x̄)
= unthunk_tangent(maybethunked_x̄)
N = ndims(x̄)
if length(x) == length(x̄)
_project(x, x̄) # ProjectTo handles reshape, offsets, structured matrices, row vectors
Expand Down

0 comments on commit ea2dafa

Please sign in to comment.