Try to cast your LongTensor to a CUDA tensor and run it again.
Unrelated, but is there a reason you are using 0.2.0?
It’s a bit old by now and the current stable release has a lot of bug fixes and new features.