We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Something funny I discovered while trying to write tests for this: julia> A = CuArray(randn(ComplexF32, 5)); julia> vA = @view A[2:5]; julia> rvA = reshape(vA, (4,1)); julia> typeof(rvA) CuArray{ComplexF32, 2, CUDA.DeviceMemory} julia> B = CuArray(randn(ComplexF32, 4, 5)); julia> vB = @view B[1:1, 1:1]; julia> rvB = reshape(vB, (1,1)); julia> typeof(rvB) Base.ReshapedArray{ComplexF32, 2, SubArray{ComplexF32, 2, CuArray{ComplexF32, 2, CUDA.DeviceMemory}, Tuple{UnitRange{Int64}, UnitRange{Int64}}, false}, Tuple{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64}}} @maleadt this seems a bit sus to me although I suspect there's a good reason for it!
Something funny I discovered while trying to write tests for this:
julia> A = CuArray(randn(ComplexF32, 5)); julia> vA = @view A[2:5]; julia> rvA = reshape(vA, (4,1)); julia> typeof(rvA) CuArray{ComplexF32, 2, CUDA.DeviceMemory} julia> B = CuArray(randn(ComplexF32, 4, 5)); julia> vB = @view B[1:1, 1:1]; julia> rvB = reshape(vB, (1,1)); julia> typeof(rvB) Base.ReshapedArray{ComplexF32, 2, SubArray{ComplexF32, 2, CuArray{ComplexF32, 2, CUDA.DeviceMemory}, Tuple{UnitRange{Int64}, UnitRange{Int64}}, false}, Tuple{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64}}}
@maleadt this seems a bit sus to me although I suspect there's a good reason for it!
Originally posted by @kshyatt in #2407
Looks like a bug; the @view B[1:1, 1:1] isn't deemed contiguous, so we hit the generic fallback. The logic for that is here, in case anybody wants to take a look https://github.com/JuliaGPU/GPUArrays.jl/blob/174bba1303a098029d2964fa16db775adddcc22a/src/host/base.jl#L302-L320
@view B[1:1, 1:1]
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Originally posted by @kshyatt in #2407
Looks like a bug; the
@view B[1:1, 1:1]
isn't deemed contiguous, so we hit the generic fallback. The logic for that is here, in case anybody wants to take a look https://github.com/JuliaGPU/GPUArrays.jl/blob/174bba1303a098029d2964fa16db775adddcc22a/src/host/base.jl#L302-L320The text was updated successfully, but these errors were encountered: