Created
October 4, 2022 22:04
-
-
Save amrakm/2ac8d3bd5ca4fdcf4867e0985967cfc0 to your computer and use it in GitHub Desktop.
print_GPU_name_and_memory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#@markdown **NVIDIA GPU** | |
import subprocess | |
sub_p_res = subprocess.run(['nvidia-smi', '--query-gpu=name,memory.total,memory.free', '--format=csv,noheader'], stdout=subprocess.PIPE).stdout.decode('utf-8') | |
print(sub_p_res) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment