Please provide complete information as applicable to your setup.
• Hardware Platform: GTX 1080 • DeepStream Version: 5.0 • NVIDIA GPU Driver Version (valid for GPU only): 440.33.01
Hi,
I have two GTX 1080, both of which are added to deepstream docker. I run my pipeline using gpu-id 1 for all the plugins in the pipeline. Whenever I use nvinferserver plugin I observe that a constant 507 Mib is occupied on GPU 0 having the same PID as the application running on GPU 1 also. There is no GPU-util for GPU 0 neither are any plugin set to gpu-id 0. I tried filling up the total memory of GPU 0 and then run the pipeline, it throws this error
A non-primary context 0x561bd21c7090 for device 0 exists before initializing the StreamExecutor. The primary context is now 0x561bd21ca490. We haven’t verified StreamExecutor works with that.
2020-09-15 11:20:11.749658: F tensorflow/stream_executor/lib/statusor.cc:34] Attempting to fetch value instead of handling error Internal: failed initializing StreamExecutor for CUDA device ordinal 0: Internal: failed call to cuDevicePrimaryCtxRetain: CUDA_ERROR_OUT_OF_MEMORY: out of memory; total memory reported: 8513978368
Aborted (core dumped)
Hi @kayccc, @bcao
my pipeline is
uridecodebin - > streammux → pgie → queue → nvvidconv → nvosd, → fakesink
If I use nvinfer for pgie it uses one GPU but if uses nvinferserver the issue happens.
I have set the GPUs in the nvinferserver config and also model/config.pbtxt
Please try reduce following value and try again.
user should check value of tf_gpu_memory_fraction.
model_repo { tf_disable_soft_placement: 0.3 } => set a smaller value for tf models
Hi @bcao,
I was using tf_gpu_memory_fraction=0.2 for my case and I tried setting tf_disable_soft_placement:0 but it didn’t help. I tried with ssd_inception_v2_coco model having same issue.
Hey, can you try “docker run --gpus 1” to see if GPU0’s memory is still occupied?
Or try to run “CUDA_VISIBLE_DEVICES=1 deepstream-app -c config-file”.
Hi @bcao,
“docker run --gpus” is working(does not occupy GPU 0 mem) but that can be a fix as I can have multiple pipeline one running on GPU 0 other running on GPU 1.
Hi,
Sorry I mistyped ‘but that can be a fix’ meant to be ‘but that cannot be a fix’ as I may need both GPUs for one pipeline, one GPU for other and one GPU for third something like that. I don’t want the container to be restricted to one GPU.
Hi @bcao,
Setting the “CUDA_VISIBLE_DEVICES=<device>” works fine. I have checked for multiple pipelines running together, specifying “CUDA_VISIBLE_DEVICES=<device>” for each pipeline works.