Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/host/broadcast.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ end
@inline function _copyto!(dest::AbstractArray, bc::Broadcasted)
axes(dest) == axes(bc) || Broadcast.throwdm(axes(dest), axes(bc))
isempty(dest) && return dest
if eltype(dest) <: BrokenBroadcast
throw(ArgumentError("Broadcast operation resulting in $(eltype(eltype(dest))) is not GPU compatible"))
end
bc = Broadcast.preprocess(dest, bc)

@kernel function broadcast_kernel_linear(dest, bc)
Expand All @@ -69,10 +72,6 @@ end

# ndims check for 0D support
broadcast_kernel(dest, bc; ndrange = ndims(dest) > 0 ? size(dest) : (1,))
if eltype(dest) <: BrokenBroadcast
throw(ArgumentError("Broadcast operation resulting in $(eltype(eltype(dest))) is not GPU compatible"))
end

return dest
end

Expand Down
Loading