현재 GPU 사용가능 여부 파이썬 치트코드

  • 가끔은, GPU에서 돌아가는지 확인하고싶을때가 있다..

Untitled
In [1]:
from tensorflow.python.client import device_lib
device_lib.list_local_devices()
Out[1]:
[name: "/device:CPU:0"
 device_type: "CPU"
 memory_limit: 268435456
 locality {
 }
 incarnation: 5550868535459545335, name: "/device:GPU:0"
 device_type: "GPU"
 memory_limit: 4659994624
 locality {
   bus_id: 1
   links {
   }
 }
 incarnation: 3634315121717150951
 physical_device_desc: "device: 0, name: GeForce RTX 2060, pci bus id: 0000:0a:00.0, compute capability: 7.5"]

답글 남기기