word-rnn icon indicating copy to clipboard operation
word-rnn copied to clipboard

why CudaTensor?

Open foice opened this issue 8 years ago • 2 comments

Hi, I am very excited to try word-rnn and I have installed torch and all that on OS X 10.11

Running the test program th train.lua -gpuid -1 I get an error connected to Cuda, which is

./util/SharedDropout.lua:3: attempt to call field 'CudaTensor' (a nil value)

Is this how it is supposed to be? any ideas for this error?

Thanks, Roberto

PS Please note I have a (old) GPU, some CUDA installed in my system (6.0), but wanted torch to work on CPU only, so I have "cheated" in the installation of torch and avoided it to find nvcc, so I am a bit surprised the code uses "CudaTensor" ...

foice avatar Mar 21 '16 00:03 foice

If you modify torch.CudaTensor() to torch.Tensor() in /util/SharedDropout.lua it works fine on the cpu. Probably should be changed to behave correctly though (opencl mode using cltensor, cpu mode using tensor)

psychosomaticdragon avatar Mar 30 '16 22:03 psychosomaticdragon

Well, it worked! thanks for the tip!

foice avatar Apr 01 '16 14:04 foice