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

strange splatting bug #41

Closed
denizyuret opened this issue Nov 19, 2015 · 1 comment
Closed

strange splatting bug #41

denizyuret opened this issue Nov 19, 2015 · 1 comment

Comments

@denizyuret
Copy link
Contributor

I am not sure if this bug belongs here or in the base or if I should get my head checked but this got me stumpted. And it does not happen when I replace CudaArray's with Array's. So I am posting here:

using CUDArt

function bmultest5(a::CudaArray, d::Dims)
    @show typeof(size(a))
    @show size(a)
    b = reinterpret(eltype(a), a, d)
    @show typeof(size(b))
    @show size(b)
    @show Cint[size(b)...]
end

bmultest5(CudaArray(zeros(2)), (2,1,1,1))

gives

typeof(size(a)) = Tuple{Int64}
size(a) = (2,)
typeof(size(b)) = Tuple{Int64,Int64,Int64,Int64}
size(b) = (2,1,1,1)
Cint[size(b)...] = Int32[2,1]

i.e. if size(b) has more than 2 elements, only the first two show up in the result of Cint[size(b)...]!

@timholy
Copy link
Contributor

timholy commented Nov 19, 2015

Failure in constant-propagation before inference, JuliaLang/julia#5560. Might be worth reporting there as an interesting example.

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

2 participants