Below is the output of nvidia-smi
.
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 410.104 Driver Version: 410.104 CUDA Version: 10.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 108... On | 00000000:01:00.0 Off | N/A |
| 57% 68C P8 19W / 280W | 7278MiB / 11176MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
| 1 GeForce GTX 108... On | 00000000:02:00.0 Off | N/A |
| 67% 73C P2 259W / 280W | 10873MiB / 11178MiB | 96% Default |
+-------------------------------+----------------------+----------------------+
Now I try to run a code and it gives me this message.
RuntimeError: CUDA out of memory. Tried to allocate 8.62 MiB (GPU 0; 10.91 GiB total capacity; 2.80 GiB already allocated; 16.88 MiB free; 0 bytes cached)
I understand that I do not have enough memory but where do I see how much memory is required by my code?
I try to run another code that requires x10000 more memory and it gives me this error
RuntimeError: CUDA out of memory. Tried to allocate 858.38 MiB (GPU 0; 10.91 GiB total capacity; 2.51 GiB already allocated; 756.88 MiB free; 0 bytes cached)
How can I make it tell me something like CUDA out of memory. Need 12GB Memory total.
0 Answers