Unable to use CUDA in gstreamer

System info:
Linux DEB-SystemPr-SystemSerialNumber 4.19.0-17-amd64 #1 SMP Debian 4.19.194-3 (2021-07-18) x86_64 GNU/Linux

Card info:
NVRM version: 440.44
CUDA version: 10.2

Device Index: 0
Device Minor: 0
Model: GeForce GTX 1660 Ti
Brand: GeForce
GPU UUID: GPU-7fecce6c-7d65-4919-5461-581143e188ae
Bus Location: 00000000:02:00.0
Architecture: 7.5

nvidia-smi output:

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.44       Driver Version: 440.44       CUDA Version: 10.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 166...  Off  | 00000000:02:00.0 Off |                  N/A |
| 27%   34C    P8     9W / 120W |     47MiB /  5941MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      1211      G   /usr/lib/xorg/Xorg                            45MiB |
+-----------------------------------------------------------------------------+

I’ve been trying to use “nvdec” for RTSP from NVIDIA VIDEO CODEC SDK.
I’m getting following error:

> 0:00:00.060319450  1275 0x55c816f34e40 WARN                   nvdec gstnvdec.c:58:cuda_OK: CUDA call failed: CUDA_ERROR_UNKNOWN, unknown error
> 0:00:00.060347211  1275 0x55c816f34e40 ERROR                  nvdec gstnvdec.c:101:gst_nvdec_cuda_context_init: failed to init CUDA
> 0:00:00.060357886  1275 0x55c816f34e40 WARN                   nvdec gstnvdec.c:58:cuda_OK: CUDA call failed: CUDA_ERROR_NOT_INITIALIZED, initialization error
> 0:00:00.060362120  1275 0x55c816f34e40 ERROR                  nvdec gstnvdec.c:104:gst_nvdec_cuda_context_init: failed to create CUDA context
> 0:00:00.060369444  1275 0x55c816f34e40 WARN                   nvdec gstnvdec.c:58:cuda_OK: CUDA call failed: CUDA_ERROR_NOT_INITIALIZED, initialization error
> 0:00:00.060374425  1275 0x55c816f34e40 ERROR                  nvdec gstnvdec.c:107:gst_nvdec_cuda_context_init: failed to pop current CUDA context
> 0:00:00.067076706  1275 0x55c816f34e40 WARN                   nvdec gstnvdec.c:58:cuda_OK: CUDA call failed: CUDA_ERROR_NO_DEVICE, no CUDA-capable device is detected
> 0:00:00.067082914  1275 0x55c816f34e40 ERROR                  nvdec gstnvdec.c:110:gst_nvdec_cuda_context_init: failed to create CUDA context lock
> 0:00:00.067112543  1275 0x55c816f34e40 ERROR                  nvdec gstnvdec.c:397:gst_nvdec_start:<nvdec0> failed to create CUDA context or lock
> 0:00:00.067117949  1275 0x55c816f34e40 WARN            videodecoder gstvideodecoder.c:2524:gst_video_decoder_change_state:<nvdec0> error: Failed to start decoder

I also get a module error for nvidia-uvm as belows

[47176.507967] nvidia_uvm: module uses symbols from proprietary module nvidia, inheriting taint.
[47176.508604] nvidia_uvm: Unknown symbol set_cpus_allowed_ptr (err -2)
[47176.508685] nvidia_uvm: Unknown symbol mmu_notifier_unregister (err -2)
[47176.508874] nvidia_uvm: Unknown symbol __mmu_notifier_register (err -2)

Can anyone tell me what is the issue here?