Is there a way to map the GPU number of the gpuDevice to the GPU number in Windows Task Manager?
조회 수: 2 (최근 30일)
Our GPU server is shared by multiple people. I hope to avoid using the GPU that is being used by others. The main method is to check the GPU utilization rate through the task manager, because MATLAB can only check the GPU memory usage, but not the GPU computing unit usage. However, the GPU number correspondence between task manager and MATLAB gpuDevice does not seem to be fixed, and it is different every time the operating system is started.
Aditya Srikar 2023년 5월 26일
Unfortunately, the correspondence between the GPU number in Task Manager and MATLAB's gpuDevice function is not always fixed. This is because the operating system assigns the GPU number based on the order in which the GPUs were initialized, and this order can vary from session to session.
To avoid using the GPU that is being used by others, you can try the following:
1. Try to coordinate with other users to avoid overlapping usage times.
2. Use a GPU monitoring tool that provides information on which processes are currently using which GPU. This will allow you to check if the GPU you want to use is currently being used by others.
3. You can use the command "nvidia-smi" in the command prompt to check the status of all GPUs and their corresponding processes. This should give you an idea of which GPUs are currently being used and by which processes. You can then select an available GPU for your MATLAB code using the "gpuDevice" function. Note that you may have to specify the index of the GPU you want to use rather than its number.
Hope this helps!