Nvenc with decklink card input in ffmpeg cmd

Hi ,
I am new to nvenc , i tried to run nvenc with input as file works perfectly fine.
BUt when i try same thing with Decklink card output as input to the nvenc using ffmpeg it give error Init Cuda().

Below are the command line which i used .

only Decklink card cmd line … (works fine)
ffmpeg -y -format_code hp59 -f decklink -i ‘DeckLink Mini Recorder 4K’ -map 0 -vf scale=1280:720 -c:v libx264 -ac 2 -ar 48000 -c:a libfdk_aac -b:a 96k output.ts

File base Nvenc cmd line … (works fine)
./ffmpeg -y -hwaccel cuvid -c:v h264_cuvid -i Despicable3.mp4 -map 0 -vf scale_cuda=1280:720 -c:v h264_nvenc -ac 2 -ar 48000 -c:a libfdk_aac -b:a 96k out.ts

But Decklink card and nvenc give error
./ffmpeg -y -format_code hp59 -f decklink -i ‘DeckLink Mini Recorder 4K’ -map 0 -vf scale=1280:720 -c:v hevc_nvenc -profile:v main -level 3.1 -pix_fmt yuv420p test67.ts

Note :
Me running in server with centos 7
Cuda 9.0 is insatlled
GPU = p5000

Is my cmd line has problem or i am missing anything ?

[hevc_nvenc @ 0x355b520] Cannot init CUDA
[hevc_nvenc @ 0x355b520] cuCtxPushCurrent failed
Error initializing output stream 0:0 – Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!