GPUArrays.jl icon indicating copy to clipboard operation
GPUArrays.jl copied to clipboard

2-arg show for GPUArray

Open mcabbott opened this issue 3 years ago • 0 comments

Replaces https://github.com/JuliaGPU/CUDA.jl/pull/1197 with a more generic version:

julia> using JLArrays

julia> (x=[1.0], y=[2f0 3f0])  # Arrays
(x = [1.0], y = Float32[2.0 3.0])

julia> map(jl, ans)  # previously looked identical
(x = JLArray([1.0]), y = JLArray(Float32[2.0 3.0]))

This sort-of assumes typeof(A).name.name is a reasonable constructor.

Unlike https://github.com/JuliaGPU/CUDA.jl/pull/1197, this is going to print CuArray(Float32[2.0 3.0]) rather than shortening to cu([2.0 3.0]).

mcabbott avatar Sep 23 '22 12:09 mcabbott