-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Closed
Labels
Description
Issue description
torch.LongTensor silently ignores device='cuda' parameter
Code example
import torch
i = torch.LongTensor(3, device='cuda')
assert i.is_cuda
Output:
Traceback (most recent call last):
File "tmp_prog/test.py", line 4, in <module>
assert i.is_cuda
AssertionError
System Info
PyTorch version: 0.4.1
Is debug build: No
CUDA used to build PyTorch: 9.0.176
OS: Ubuntu 16.04.5 LTS
GCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
CMake version: version 3.5.1
Python version: 3.6
Is CUDA available: Yes
CUDA runtime version: 9.0.176
GPU models and configuration: GPU 0: Tesla M60
Nvidia driver version: 384.130
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.5.1.10
/usr/lib/x86_64-linux-gnu/libcudnn.so.6.0.21
/usr/lib/x86_64-linux-gnu/libcudnn.so.7.0.3
/usr/lib/x86_64-linux-gnu/libcudnn_static_v5.a
/usr/lib/x86_64-linux-gnu/libcudnn_static_v6.a
/usr/lib/x86_64-linux-gnu/libcudnn_static_v7.a
Versions of relevant libraries:
[pip] numpy (1.14.3)
[pip] torch (0.4.1)
[pip] torchtext (0.2.3)
[pip] torchvision (0.2.1)
[conda] pytorch 0.4.1 py36_cuda9.0.176_cudnn7.1.2_1 pytorch
[conda] torchtext 0.2.3 <pip>
[conda] torchvision 0.2.1 py36_1 pytorch