I am trying to sum a Variable using torch.sum() on GPU and the following error happens:
 THCudaCheck FAIL file=/opt/conda/conda-bld/pytorch_1501972792122/work/pytorch-0.1.12/torch/lib/THC/generated/../THCReduceAll.cuh line=334 error=77 : an illegal memory access was encountered

I searched and found some solutions such as  https://github.com/torch/cutorch/issues/489 54 but none of them work. Any suggestions?