This file contains hidden or 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
def get_gpu_with_highest_free_memory(): | |
""" | |
Returns the index of the GPU with the highest free memory. | |
This function sorts the GPUs by PCI bus ID and then returns the index of the GPU with the highest free memory. | |
Returns: | |
list: A list containing the index and free memory of the GPU with the highest free memory. | |
Notes: |
OlderNewer