How can I make full use of 1080ti with ffmpeg in one process?

My problem is this :
Cuda programming is hard to me, so I used ffmpeg(GPU) to decode H264 .
In One process , when the Camera count is less than 14, the process was running OK. But when the Camera count is more than 14, the process will crash, and the error Information is :
“ctx->cvdl->cuvidCreateDecoder(&ctx->cudecoder, &cuinfo) failed -> CUDA_ERROR_OUT_OF_MEMORY: out of memory
ctx->cvdl->cuvidDecodePicture(ctx->cudecoder, picparams) failed -> CUDA_ERROR_INVALID_HANDLE: invalid resource handle
cuvid decode callback error” .
1080ti has 11G memory ,when the error occured, the process used only 4G memory. And when two processes is running ,each process decode 14 cameras ,there is no problem.
So , my question is :
“How can I make full use of 1080ti with ffmpeg in one process? Is there any config params?”

Hi! I have exactly the same problem with you, the bottle neck of video decoding count for me is 27, have you solved this problem now?