![]() ![]() Nvidia has a page where they document how you can use the /proc filesystem interface to obtain run-time information about the driver, any installed NVIDIA graphics cards, and the AGP status. How can I implement this?Īpart from the excellent explanation by Mrry, where he suggested to use device_lib.list_local_devices() I can show you how you can check for GPU related information from the command line.īecause currently only Nvidia's gpus work for NN frameworks, the answer covers only them. In short, I want a function like tf.get_available_gpus() that will return if there are two GPUs available in the machine. I also could restrict GPUs intentionally using the CUDA_VISIBLE_DEVICES environment variable, so I don't want to know a way of getting GPU information from OS kernel. ![]() My question is how do I get information about current available GPU from TensorFlow? I can get loaded GPU information from the log, but I want to do it in a more sophisticated, programmatic way. I tensorflow/core/common_runtime/gpu/gpu_:838] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 1080, pci bus id: 0000:01:00.0) I tensorflow/core/common_runtime/gpu/gpu_:136] 0: Y I found that when running tf.Session() TensorFlow gives information about GPU in the log messages like below: I tensorflow/core/common_runtime/gpu/gpu_:126] DMA: 0 In a cluster environment, each machine could have 0 or 1 or more GPUs, and I want to run my TensorFlow graph into GPUs on as many machines as possible. I have a plan to use distributed TensorFlow, and I saw TensorFlow can use GPUs for training and testing. ![]()
0 Comments
Leave a Reply. |