Skip to content

Instantly share code, notes, and snippets.

@Merwanski
Created November 25, 2021 15:25
Show Gist options
  • Save Merwanski/e7740a2b14b99519fe47c26a1d01a995 to your computer and use it in GitHub Desktop.
Save Merwanski/e7740a2b14b99519fe47c26a1d01a995 to your computer and use it in GitHub Desktop.
get gpu name tensorflow and pytorch
# tensorflow
from tensorflow.python.client import device_lib
devices_tf = device_lib.list_local_devices()
devices_tf = print(devices)
# pytorch
import torch
devices_torch = torch.cuda.get_device_name()
print(devices_torch)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment