Fix a bug when using Tensor with CUDA.
Fix a bug when using Tensor with CUDA.

naliboff/dealii,danshapero/dealii,naliboff/dealii,naliboff/dealii,danshapero/dealii,danshapero/dealii,danshapero/dealii,danshapero/dealii,sairajat/dealii,sairajat/dealii,sairajat/dealii,sairajat/dealii,sairajat/dealii,sairajat/dealii,naliboff/dealii,sairajat/dealii,naliboff/dealii,naliboff/dealii,danshapero/dealii,danshapero/dealii,naliboff/dealii