Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

broadcast issue #249

Open
rveltz opened this issue Sep 23, 2019 · 0 comments
Open

broadcast issue #249

rveltz opened this issue Sep 23, 2019 · 0 comments

Comments

@rveltz
Copy link

rveltz commented Sep 23, 2019

Hi,

In order to have AF working alongside with CuArrays, I would need the following to work:

a .= a  .+ b

but it returns

julia> a .= a .+ b
ERROR: MethodError: no method matching ndims(::Type{AFArray{Float64,1}})
Closest candidates are:
  ndims(::Base.Generator) at generator.jl:53
  ndims(::Number) at number.jl:67
  ndims(::Type{#s75} where #s75<:Number) at number.jl:68
  ...
Stacktrace:
 [1] Base.Broadcast.BroadcastStyle(::Type{AFArray{Float64,1}}) at ./broadcast.jl:103
 [2] combine_styles(::AFArray{Float64,1}) at ./broadcast.jl:405
 [3] Base.Broadcast.Broadcasted(::typeof(identity), ::Tuple{AFArray{Float64,1}}, ::Tuple{Base.OneTo{Int64}}) at ./broadcast.jl:175
 [4] materialize!(::AFArray{Float64,1}, ::AFArray{Float64,1}) at ./broadcast.jl:804
 [5] top-level scope at REPL[7]:1

Is it an easy fix?

Btw you should consider making AF a backend for GPUArrays

Thank you,

Best

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant