質問編集履歴
7
文面の修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -70,6 +70,11 @@
|
|
70
70
|
あと、試しにcupyをインストールしてこちらでもgpuの使用をテストしようとしたところ
|
71
71
|
こちらだとcuda110版ではバージョンの相違によるエラーが検出されました。一方で、cuda101版を使うと、バージョンの差異のエラーは出なかったものの、関数の実行時にメモリのエラーが発生しました。
|
72
72
|
|
73
|
+
このことから
|
74
|
+
1.cudaのバージョンは10.1でおそらく正しい
|
75
|
+
2.pythonとGPU間自体に問題がある、pythonのインストール自体などに問題がある
|
76
|
+
ことが示唆されました。
|
77
|
+
|
73
78
|
cupy-cuda110の場合
|
74
79
|
```python
|
75
80
|
>>> import cupy
|
6
表現の修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -112,9 +112,9 @@
|
|
112
112
|
>>> x = cp.arange(6).reshape(2, 3).astype('f')
|
113
113
|
Traceback (most recent call last):
|
114
114
|
File "<stdin>", line 1, in <module>
|
115
|
-
File "/
|
115
|
+
File "/xxx/.venv/tff-IwBB_zea/lib/python3.6/site-packages/cupy/_creation/ranges.py", line 55, in arange
|
116
116
|
ret = cupy.empty((size,), dtype=dtype)
|
117
|
-
File "/
|
117
|
+
File "/xxx/.venv/tff-IwBB_zea/lib/python3.6/site-packages/cupy/_creation/basic.py", line 22, in empty
|
118
118
|
return cupy.ndarray(shape, dtype, order=order)
|
119
119
|
File "cupy/core/core.pyx", line 138, in cupy.core.core.ndarray.__init__
|
120
120
|
File "cupy/cuda/memory.pyx", line 578, in cupy.cuda.memory.alloc
|
5
cupyでのエラーについての説明
title
CHANGED
File without changes
|
body
CHANGED
@@ -64,5 +64,65 @@
|
|
64
64
|
1.7.0+cu101
|
65
65
|
|
66
66
|
```
|
67
|
-
追記2
|
67
|
+
### 追記2
|
68
|
-
cuda 11.0用のコマンド(pip install torch==1.7.0+cu110 torchvision==0.8.1+cu110 torchaudio===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html)も試しましたが同一のエラーが発生しました。
|
68
|
+
cuda 11.0用のコマンド(pip install torch==1.7.0+cu110 torchvision==0.8.1+cu110 torchaudio===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html)も試しましたが同一のエラーが発生しました。
|
69
|
+
|
70
|
+
あと、試しにcupyをインストールしてこちらでもgpuの使用をテストしようとしたところ
|
71
|
+
こちらだとcuda110版ではバージョンの相違によるエラーが検出されました。一方で、cuda101版を使うと、バージョンの差異のエラーは出なかったものの、関数の実行時にメモリのエラーが発生しました。
|
72
|
+
|
73
|
+
cupy-cuda110の場合
|
74
|
+
```python
|
75
|
+
>>> import cupy
|
76
|
+
Traceback (most recent call last):
|
77
|
+
File "/xxx/.venv/tff-IwBB_zea/lib/python3.6/site-packages/cupy/__init__.py", line 21, in <module>
|
78
|
+
from cupy import core # NOQA
|
79
|
+
File "/xxx/.venv/tff-IwBB_zea/lib/python3.6/site-packages/cupy/core/__init__.py", line 1, in <module>
|
80
|
+
from cupy.core import core # NOQA
|
81
|
+
ImportError: libcublas.so.11: cannot open shared object file: No such file or directory
|
82
|
+
|
83
|
+
During handling of the above exception, another exception occurred:
|
84
|
+
|
85
|
+
Traceback (most recent call last):
|
86
|
+
File "<stdin>", line 1, in <module>
|
87
|
+
File "/xxx/.venv/tff-IwBB_zea/lib/python3.6/site-packages/cupy/__init__.py", line 42, in <module>
|
88
|
+
six.reraise(ImportError, ImportError(msg), exc_info[2])
|
89
|
+
File "/xxx/.venv/tff-IwBB_zea/lib/python3.6/site-packages/six.py", line 702, in reraise
|
90
|
+
raise value.with_traceback(tb)
|
91
|
+
File "/xxx/.venv/tff-IwBB_zea/lib/python3.6/site-packages/cupy/__init__.py", line 21, in <module>
|
92
|
+
from cupy import core # NOQA
|
93
|
+
File "/xxx/.venv/tff-IwBB_zea/lib/python3.6/site-packages/cupy/core/__init__.py", line 1, in <module>
|
94
|
+
from cupy.core import core # NOQA
|
95
|
+
ImportError: CuPy is not correctly installed.
|
96
|
+
|
97
|
+
If you are using wheel distribution (cupy-cudaXX), make sure that the version of CuPy you installed matches with the version of CUDA on your host.
|
98
|
+
Also, confirm that only one CuPy package is installed:
|
99
|
+
$ pip freeze
|
100
|
+
|
101
|
+
If you are building CuPy from source, please check your environment, uninstall CuPy and reinstall it with:
|
102
|
+
$ pip install cupy --no-cache-dir -vvvv
|
103
|
+
|
104
|
+
Check the Installation Guide for details:
|
105
|
+
https://docs.cupy.dev/en/latest/install.html
|
106
|
+
|
107
|
+
original error: libcublas.so.11: cannot open shared object file: No such file or directory
|
108
|
+
```
|
109
|
+
cupy-cuda101の場合
|
110
|
+
```python
|
111
|
+
>>> import cupy as cp
|
112
|
+
>>> x = cp.arange(6).reshape(2, 3).astype('f')
|
113
|
+
Traceback (most recent call last):
|
114
|
+
File "<stdin>", line 1, in <module>
|
115
|
+
File "/home/slab/kshono/.venv/tff-IwBB_zea/lib/python3.6/site-packages/cupy/_creation/ranges.py", line 55, in arange
|
116
|
+
ret = cupy.empty((size,), dtype=dtype)
|
117
|
+
File "/home/slab/kshono/.venv/tff-IwBB_zea/lib/python3.6/site-packages/cupy/_creation/basic.py", line 22, in empty
|
118
|
+
return cupy.ndarray(shape, dtype, order=order)
|
119
|
+
File "cupy/core/core.pyx", line 138, in cupy.core.core.ndarray.__init__
|
120
|
+
File "cupy/cuda/memory.pyx", line 578, in cupy.cuda.memory.alloc
|
121
|
+
File "cupy/cuda/memory.pyx", line 1250, in cupy.cuda.memory.MemoryPool.malloc
|
122
|
+
File "cupy/cuda/memory.pyx", line 1270, in cupy.cuda.memory.MemoryPool.malloc
|
123
|
+
File "cupy/cuda/device.pyx", line 25, in cupy.cuda.device.get_device_id
|
124
|
+
File "cupy_backends/cuda/api/runtime.pyx", line 275, in cupy_backends.cuda.api.runtime.getDevice
|
125
|
+
File "cupy_backends/cuda/api/runtime.pyx", line 247, in cupy_backends.cuda.api.runtime.check_status
|
126
|
+
cupy_backends.cuda.api.runtime.CUDARuntimeError: cudaErrorMemoryAllocation: out of memory
|
127
|
+
|
128
|
+
```
|
4
cuda11.0用インストールについての記述を追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -63,4 +63,6 @@
|
|
63
63
|
>>> print(torch.__version__)
|
64
64
|
1.7.0+cu101
|
65
65
|
|
66
|
-
```
|
66
|
+
```
|
67
|
+
追記2
|
68
|
+
cuda 11.0用のコマンド(pip install torch==1.7.0+cu110 torchvision==0.8.1+cu110 torchaudio===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html)も試しましたが同一のエラーが発生しました。
|
3
pytorchのインストールについて補足
title
CHANGED
File without changes
|
body
CHANGED
@@ -43,4 +43,24 @@
|
|
43
43
|
|
44
44
|
```
|
45
45
|
#### OS、Pytorchのバージョン
|
46
|
-
pytorch
|
46
|
+
pytorch version 1.7.0+cu101
|
47
|
+
OS debian 10.6
|
48
|
+
pytorchは確か一回pip install torchで普通にインストールした後、GPUの問題が起きたのを見てからアンインストールして、"pip install torch==1.7.0+cu101 torchvision==0.8.1+cu101 torchaudio==0.7.0 -f https://download.pytorch.org/whl/torch_stable.html"で再インストールしました。
|
49
|
+
|
50
|
+
cuda、OS、pytorchのバージョンはそれぞれ下記の通りで確認しました。
|
51
|
+
```bash
|
52
|
+
aoies: ~$ nvcc --version
|
53
|
+
nvcc: NVIDIA (R) Cuda compiler driver
|
54
|
+
Copyright (c) 2005-2019 NVIDIA Corporation
|
55
|
+
Built on Sun_Jul_28_19:07:16_PDT_2019
|
56
|
+
Cuda compilation tools, release 10.1, V10.1.243
|
57
|
+
|
58
|
+
aoies: ~$ cat /etc/debian_version
|
59
|
+
10.6
|
60
|
+
```
|
61
|
+
```python
|
62
|
+
>>> import torch
|
63
|
+
>>> print(torch.__version__)
|
64
|
+
1.7.0+cu101
|
65
|
+
|
66
|
+
```
|
2
OS、Pytorchのバージョンの情報を追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -15,6 +15,7 @@
|
|
15
15
|
```
|
16
16
|
|
17
17
|
### 追記
|
18
|
+
#### GPU
|
18
19
|
nvidia-smiを使うと下記のような返答があるので恐らくGPUは動作しているのではないかと考えました。
|
19
20
|
```
|
20
21
|
nvidia-smi
|
@@ -40,4 +41,6 @@
|
|
40
41
|
+-------------------------------+----------------------+----------------------+
|
41
42
|
|
42
43
|
|
43
|
-
```
|
44
|
+
```
|
45
|
+
#### OS、Pytorchのバージョン
|
46
|
+
pytorchのバージョンは1.7.0+cu101、OSはdebianのバージョン10.6です。
|
1
GPUの状態を追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -12,4 +12,32 @@
|
|
12
12
|
torch._C._cuda_init()
|
13
13
|
RuntimeError: Unexpected error from cudaGetDeviceCount(). Did you run some cuda functions before calling NumCudaDevices() that might have already set an error? Error 2: out of memory
|
14
14
|
|
15
|
+
```
|
16
|
+
|
17
|
+
### 追記
|
18
|
+
nvidia-smiを使うと下記のような返答があるので恐らくGPUは動作しているのではないかと考えました。
|
19
|
+
```
|
20
|
+
nvidia-smi
|
21
|
+
Tue Nov 10 23:49:33 2020
|
22
|
+
+-----------------------------------------------------------------------------+
|
23
|
+
| NVIDIA-SMI 450.66 Driver Version: 450.66 CUDA Version: 11.0 |
|
24
|
+
|-------------------------------+----------------------+----------------------+
|
25
|
+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
|
26
|
+
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|
27
|
+
| | | MIG M. |
|
28
|
+
|===============================+======================+======================|
|
29
|
+
| 0 Tesla K40m On | 00000000:03:00.0 Off | 0 |
|
30
|
+
| N/A 32C P8 21W / 235W | 0MiB / 11441MiB | 0% Default |
|
31
|
+
| | | N/A |
|
32
|
+
+-------------------------------+----------------------+----------------------+
|
33
|
+
| 1 Tesla K40m On | 00000000:04:00.0 Off | 0 |
|
34
|
+
| N/A 31C P8 21W / 235W | 0MiB / 11441MiB | 0% Default |
|
35
|
+
| | | N/A |
|
36
|
+
+-------------------------------+----------------------+----------------------+
|
37
|
+
| 2 Tesla K40m On | 00000000:82:00.0 Off | 0 |
|
38
|
+
| N/A 31C P8 20W / 235W | 0MiB / 11441MiB | 0% Default |
|
39
|
+
| | | N/A |
|
40
|
+
+-------------------------------+----------------------+----------------------+
|
41
|
+
|
42
|
+
|
15
43
|
```
|