torch-rnn
torch-rnn copied to clipboard
Error running with OpenCL
Hello
I am using Ubuntu 16.04. I tried to run torch-rnn with OpenCL and met the error.
Using NVIDIA Corporation , OpenCL platform: NVIDIA CUDA
Using OpenCL device: Quadro FX 580
Running with OpenCL on GPU 0
OpenCL error -11 on line 244 of /tmp/luarocks_cltorch-scm-1-8151/cltorch/cltorch/src/clMathLibraries/clBLAS/src/library/blas/xgemm.cc
clBuildProgram Failed
err = -11
Error: Failed to build program executable!
Build Log:
Error parsing value of -cl-std flag!
OpenCL error -45 on line 269 of /tmp/luarocks_cltorch-scm-1-8151/cltorch/cltorch/src/clMathLibraries/clBLAS/src/library/blas/xgemm.cc
OpenCL error -48 on line 583
OpenCL error -48 on line 585
OpenCL error -48 on line 587
OpenCL error -48 on line 589
OpenCL error -48 on line 591
OpenCL error -48 on line 593
OpenCL error -48 on line 595
OpenCL error -48 on line 597
OpenCL error -48 on line 599
OpenCL error -48 on line 601
OpenCL error -48 on line 603
OpenCL error -48 on line 605
OpenCL error -48 on line 607
OpenCL error -48 on line 609
/home/vinh/torch/install/bin/luajit: /home/vinh/torch/install/share/lua/5.1/nn/Container.lua:67:
In 2 module of nn.Sequential:
./LSTM.lua:160: clblasSgemm() failed with -1024 at /tmp/luarocks_cltorch-scm-1-8151/cltorch/cltorch/src/lib/THClBlas.cpp:438
stack traceback:
[C]: in function 'addmm'
./LSTM.lua:160: in function <./LSTM.lua:118>
[C]: in function 'xpcall'
/home/vinh/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors'
/home/vinh/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function 'forward'
train.lua:130: in function 'opfunc'
/home/vinh/torch/install/share/lua/5.1/optim/adam.lua:33: in function 'adam'
train.lua:187: in main chunk
[C]: in function 'dofile'
...vinh/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
[C]: at 0x00405d50
WARNING: If you see a stack trace below, it doesn't point to the place where this error occured. Please use only the one above.
stack traceback:
[C]: in function 'error'
/home/vinh/torch/install/share/lua/5.1/nn/Container.lua:67: in function 'rethrowErrors'
/home/vinh/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function 'forward'
train.lua:130: in function 'opfunc'
/home/vinh/torch/install/share/lua/5.1/optim/adam.lua:33: in function 'adam'
train.lua:187: in main chunk
[C]: in function 'dofile'
...vinh/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
[C]: at 0x00405d50
ValueError: max() arg is an empty sequence
How should I resolve this problem?
I installed cltorch and clnn and that's it.
Looks like you are running out of memory; the Quadro FX 580 you are using only has 512MB of VRAM. You can try a smaller rnn_size or seq_length.
Thanks
I tried with seq_length=5 but the error still happens (rnn_size=128 as default).