How to Set TensorRT to use Discrete GPU exclusively

I am currently running the example code in /usr/src/tensorrt/bin, a.k.a. giexec, on a DRIVE PX 2. We monitored the performance of the DRIVE PX 2 with tegrastats as the giexec ran, and noticed that, even though the device code was set to 0

./giexec --deploy='filename.prototxt' --model='model.caffemodel' --output=prob --batch=16 --device=0

, the discrete GPU (GR3D_PCI) was not being utilized by giexec; all workload was on the GR3D (embedded GPU).

Any suggestions for running giexec with the discrete GPU? Thanks!

Dear JerryHong,

I think --device=0 is right option for dGPU.
When I try to run tensorrt with below commands, I could run dGPU.
./giexe --model=…/data/googlenet/googlenet.caffemodel --deploy=…/data/googlenet/googlenet.prototxt --output=prob --batch=16 --device=0

If still have same issue, please use this command to setup first.
$ export CUDA_VISIBLE_DEVICES=0
And then re-run below commands.
./giexe --model=…/data/googlenet/googlenet.caffemodel --deploy=…/data/googlenet/googlenet.prototxt --output=prob --batch=16 --device=0
Thanks.