ffmpeg master branch processing broken with newest nv-codec-headers.
Try running your sample and it'll report:
fmpeg -hwaccel cuvid -c:v h264_cuvid -i <in.mp4>-vf scale_npp=1280:720 -vcodec h264_nvenc <out.mp4
==> [h264_cuvid @ 0x2993740] Cannot load cuvidGetDecodeStatus
Given sample runs with
https://github.com/FFmpeg/nv-codec-headers/releases/download/n8.1.24.2/nv-codec-headers-8.1.24.2.tar.gz
NVIDIA-SMI 390.87