If you select GPU when creating a notebook instance, perform the following operations to view GPU usage:
nvidia-smi
python /modelarts/tools/gpu_processes.py
The following figure shows the case that the current process is using GPUs.
The following figure shows the case that the current process is not using GPUs.
Method 2:
Open /resource_info/gpu_usage.json and view the processes that are using GPUs.
If no process is using GPUs, the file may be unavailable or empty.