Skip to content

Commit

Permalink
Don't unthunk explicitly in unbroadcast
Browse files Browse the repository at this point in the history
  • Loading branch information
oschulz committed Oct 18, 2021
1 parent 3a9366b commit 34865ea
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/lib/broadcast.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ 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, maybethunked_x̄)
= unthunk_tangent(maybethunked_x̄)
function unbroadcast(x::AbstractArray, 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 34865ea

Please sign in to comment.