FluxML / Flux.jl

Relax! Flux is the ML library that doesn't make you tensor
https://fluxml.ai/
Other
4.54k stars 610 forks source link

RNN unbroadcast on GPU not working #421

Closed r3tex closed 3 years ago

r3tex commented 6 years ago

I came across this in my project now and noticed it happens on the Char-RNN in the Model Zoo. When training an LSTM on GPU we get ERROR: MethodError: no method matching unbroadcast(::Tuple{Int64,Int64}, ::CuArray{Float32,2}) at

[1] (::getfield(Flux.CUDA, Symbol("##13#14")){Flux.LSTMCell{TrackedArray{…,CuArray{Float32,2}},TrackedArray{…,CuArray{Float32,1}}},TrackedArray{…,CuArray{Float32,2}},TrackedArray{…,CuArray{Float32,2}},TrackedArray{…,CuArray{Float32,2}},CuArray{UInt8,1},Tuple{CuArray{Float32,2},CuArray{Float32,2},CuArray{Float32,2}}})(::Tuple{CuArray{Float32,2},CuArray{Float32,2},CuArray{Float32,2}}) at /data/home/r3tex/.julia/packages/Flux/UHjNa/src/cuda/cudnn.jl:344
MikeInnes commented 6 years ago

I've fixed this specific issue here. Unfortunately it now seems that CUDNN is unhappy with how we're calling RNNs, so that needs looking into.

ToucheSir commented 3 years ago

RNNs no longer use CuDNN (at least for now), so I think this should be resolved.