@SherlockLiao: I guess the question was about accessing GPU usage inside python code. If that’s the case, you can try nvidia-ml-py 177 or simply run subprocess and parse the output as shown here 126. I am not aware of any torch.cuda API for doing this.