Skip to content

Commit 0c080e7

Browse files
Update src/lib/broadcast.jl
Co-authored-by: Michael Abbott <32575566+mcabbott@users.noreply.github.com>
1 parent 807e5e5 commit 0c080e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/broadcast.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,8 @@ end
263263

264264
end
265265

266-
@adjoint (::Type{<:CUDA.CuArray{T,N}})(xs::Array) where {T,N} =
267-
CUDA.CuArray{T,N}(xs), Δ -> (convert(Array, Δ), )
266+
@adjoint (::Type{T})(xs::Array) where {T<:CUDA.CuArray} =
267+
T(xs), Δ -> (convert(Array, Δ), )
268268

269269
@adjoint function sum(xs::CUDA.AbstractGPUArray; dims = :)
270270
placeholder = similar(xs)

0 commit comments

Comments
 (0)