Hello,
I am trying to get the blstm example from Flux model zoo to work on GPU. The latest hurdle that I ran into is trying to convert the training data to GPU arrays. The example uses arrays of arrays to store the data, not matrices or tensors). CuArrays
blows up when I try to execute Xs = Xs |> gpu
with the following error message:
ERROR: LoadError: type does not have a fixed size
A shorter example:
julia> using CuArrays
julia> mx = rand(3, 5)
3×5 Array{Float64,2}:
0.12203 0.962134 0.619406 0.859975 0.517161
0.17649 0.540456 0.378313 0.0818683 0.807525
0.608563 0.924165 0.212063 0.088323 0.749014
julia> cu(mx)
3×5 CuArray{Float32,2}:
0.12203 0.962134 0.619406 0.859975 0.517161
0.17649 0.540456 0.378313 0.0818683 0.807525
0.608563 0.924165 0.212063 0.088323 0.749014
julia> vx = [mx[i, :] for i=1:size(mx, 1)]
3-element Array{Array{Float64,1},1}:
[0.12203, 0.962134, 0.619406, 0.859975, 0.517161]
[0.17649, 0.540456, 0.378313, 0.0818683, 0.807525]
[0.608563, 0.924165, 0.212063, 0.088323, 0.749014]
julia> cu(vx)
ERROR: type does not have a fixed size
Would the only workaround for this be to rewrite the example for tensors?
My environment is as follows:
Linux CentOS 7
Julia 1.0.3
CUDA 9.1.85
CuArrays 1.0.2
CUDAnative v2.1.3
Flux 0.8.3
Is it something that has been fixed in the recent versions of Julia?
Any help would be highly appreciated.