I am running the same code on two different machines, one with Titan X and CUDA 7.5 and the other with Pascal 100 and CUDA 8.0 and I am seeing this error with the Pascal setup:
  File "./python2.7/site-packages/torch/autograd/variable.py", line 145, in backward
    self._execution_engine.run_backward((self,), (gradient,), retain_variables)
  File "./python2.7/site-packages/torch/nn/_functions/linear.py", line 22, in backward
    grad_input = torch.mm(grad_output, weight)
RuntimeError: cublas runtime error : the GPU program failed to execute at /data/users/soumith/miniconda2/conda-bld/pytorch-0.1.9_1487343590888/work/torch/lib/THC/THCBlas.cu:246