How to know if lua version is using GPU?

How to know if LUA version is using GPU when I start it with

OpenNMT$ th preprocess.lua -train_src data/src-train.txt -train_tgt data/tgt-train.txt -valid_src data/src-val.txt -valid_tgt data/tgt-val.txt -save_data data/demo

Hi @mantili1 !

you have to specify -gpuid ID with ID a number not being 0 to let OpenNMT use a gpu. If don’t, by default it will run on cpu, like if you have set -gpuid 0

Good luck!

1 Like