seems like GPU is not working in AWS Sagemaker Studio Lab

Viewed 459

I've selected compute type as GPU, and opened my project.

but checking the local devices, it doesn't look like any GPU is deployed.

import tensorflow as tf
from tensorflow.python.client import device_lib
device_lib.list_local_devices()

outputs:

[name: "/device:CPU:0"
 device_type: "CPU"
 memory_limit: 268435456
 locality {
 }
 incarnation: 13079107644747151451]

How can I enable GPU usage in AWS Sagemaker?

1 Answers

I ran your codes above and this is what I obtain:

[name: "/device:CPU:0"
 device_type: "CPU"
 memory_limit: 268435456
 locality {
 }
 incarnation: 1740204898309190353
 xla_global_id: -1,
 name: "/device:GPU:0"
 device_type: "GPU"
 memory_limit: 14463795200
 locality {
   bus_id: 1
   links {
   }
 }
 incarnation: 13861210837196428676
 physical_device_desc: "device: 0, name: Tesla T4, pci bus id: 0000:00:1e.0, compute capability: 7.5"
 xla_global_id: 416903419]

GPU did deploy and I just trained my model with it. It's working fine. Did you really choose the GPU as your compute type? If yes, which tensorflow version are you using?

Related