Skip to content

Commit

Permalink
update for changes on master
Browse files Browse the repository at this point in the history
  • Loading branch information
jgreener64 committed Aug 3, 2022
1 parent 67069cb commit 167d500
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/lib/broadcast.jl
Original file line number Diff line number Diff line change
Expand Up @@ -286,11 +286,10 @@ using GPUArraysCore # replaces @require CUDA block, weird indenting to preserve

pull_block_vert(sz, Δ::AbstractGPUArray, A::Number) = @allowscalar Δ[sz]

∇getindex(x::CUDA.CuArray, inds::Tuple{AbstractArray{<:Integer}}) = dy -> begin
∇getindex(x::T, inds::Tuple{AbstractArray{<:Integer}}) where {T <: AbstractGPUArray} = dy -> begin
inds1_cpu = Array(inds[1])
dx = zeros(eltype(dy), length(x))
dxv = view(dx, inds1_cpu)
dxv .= accum.(dxv, _droplike(Array(dy), dxv))
return _project(x, CUDA.CuArray(dx)), nothing
return _project(x, T(dx)), nothing
end
end

0 comments on commit 167d500

Please sign in to comment.