train.lua looks for cutorch even though "-gpu 0"
wsanders opened this issue · comments
W Sanders commented
# th train.lua -input_h5 data/tiny-shakespeare.h5 -input_json data/tiny-shakespeare.json -gpu 0
/root/torch/install/bin/luajit: /root/torch/install/share/lua/5.1/trepl/init.lua:389: module 'cutorch' not found:No LuaRocks module found for cutorch
I think you mean
if opt.gpu > 0 and opt.gpu_backend == 'cuda' then
and not
if opt.gpu >= 0 and opt.gpu_backend == 'cuda' then
antihutka commented
You need to specify -gpu -1
to train on the CPU. GPU numbers are zero-based in torch-rnn.
Rabinandan Kishor commented
Yes -gpu -1 will execute code in CPU mode. For more about command line argument passed to it
Look - https://github.com/jcjohnson/torch-rnn/blob/master/doc/flags.md#training