Returned error 4:NV_OF_ERR_INVALID_PTR in function 'NvidiaOpticalFlowImpl'

Hi, every one. When I run the “nvof =cv2.cuda_NvidiaOpticalFlow_1_0.create(frame1.shape[1], frame1.shape[0], 5, False, False, False, 1)”, I meet the problem below:
cv2.error: OpenCV(4.4.0-pre) /data00/wangqing/nvidiaSDK/opencv_contrib/modules/cudaoptflow/src/nvidiaOpticalFlow.cpp:380: error: (-27:Null pointer) GetAPI()->nvCreateOpticalFlowCuda(m_cuContext, &m_hOF) returned error 4:NV_OF_ERR_INVALID_PTR in function ‘NvidiaOpticalFlowImpl’

I really do not konw how to fix it. Can anyone help me? Thanks in advance!

GPU: 4 1080Ti
Opencv: 4.4.0-pre


GPU: 4 1080Ti

I assume this is ‘GeForce GTX 1080 Ti’, which is based on Pascal family GPU.
NVIDIA Optical Flow requires Turing or above family GPU.