This repository was archived by the owner on Mar 12, 2021. It is now read-only.

Description
Describe the bug
ArgumentError when displaying a view of CuArray
To Reproduce
The Minimal Working Example (MWE) for this bug:
cu(@view(rand(3,3)[:, [1]]))
ArgumentError: invalid index: 1.0f0 of type Float32
Stacktrace:
[1] to_index(::Float32) at ./indices.jl:273
[2] to_index(::Array{Float32,2}, ::Float32) at ./indices.jl:250
[3] getindex at ./indices.jl:301 [inlined]
...
Expected behavior
Display the expected SubArray
Environment details (please complete this section)
Details on Julia:
# please post the output of:
versioninfo()
Julia Version 1.3.0-rc3.0
Commit b5ccd0f2ef (2019-10-04 01:57 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Xeon(R) W-2123 CPU @ 3.60GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.1 (ORCJIT, skylake)