BUG: nvidia_uvm needs to be removed and re-inserted in order to work after wakeup from suspend

Dear developer, it seems that the latest nvidia-470 (470.63.01) driver has a minor glitch, that after every wake-up from suspend (especially when there are active CUDA processes either running or at breakpoint), I need to manually rmmod and modprobe the nvidia-uvm kernel driver in order to run PyTorch/Tensorflow with CUDA support. The following terminal screenshot explains the situation:

xuancong@wxc-dell:~$ ./Desktop/anaconda-python3 -c “import torch; print(torch.cuda.is_available())”
/opt/anaconda3/lib/python3.8/site-packages/torch/cuda/init.py:52: UserWarning: CUDA initialization: CUDA unknown error - this may be due to an incorrectly set up environment, e.g. changing env variable CUDA_VISIBLE_DEVICES after program start. Setting the available devices to be zero. (Triggered internally at /pytorch/c10/cuda/CUDAFunctions.cpp:115.)
return torch._C._cuda_getDeviceCount() > 0
False

xuancong@wxc-dell:~$ lsmod | grep nvidia
nvidia_uvm 1032192 0
nvidia_drm 61440 2
nvidia_modeset 1196032 2 nvidia_drm
nvidia 35266560 73 nvidia_uvm,nvidia_modeset
drm_kms_helper 200704 2 nvidia_drm,i915
drm 495616 22 drm_kms_helper,nvidia,nvidia_drm,i915
xuancong@wxc-dell:~$ sudo rmmod nvidia_uvm
xuancong@wxc-dell:~$ sudo modprobe nvidia_uvm
xuancong@wxc-dell:~$ ./Desktop/anaconda-python3 -c “import torch; print(torch.cuda.is_available())”
True
xuancong@wxc-dell:~$ nvidia-smi
Sat Sep 4 16:19:40 2021
±----------------------------------------------------------------------------+
| NVIDIA-SMI 470.63.01 Driver Version: 470.63.01 CUDA Version: 11.4 |
|-------------------------------±---------------------±---------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce … Off | 00000000:01:00.0 Off | N/A |
| N/A 38C P8 N/A / N/A | 4MiB / 4042MiB | 0% Default |
| | | N/A |
±------------------------------±---------------------±---------------------+

±----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 21812 G /usr/lib/xorg/Xorg 4MiB |
±----------------------------------------------------------------------------+