How can I allocate different tensorrt model to multi-gpus

I have trained four different tensorrt models and the machine have four gpus, how can I allocate different tensorrt model to the different gpu, it looks like all the trt engine were allocated in the gpu 0 by default. But when I use “cudaSetDevice” in my code(I have to run all the models in one process and the code is C++ version), the message “WARNING: Using an engine plan file across different models of devices is not recommended and is likely to affect performance or even cause errors.” was reported, and all the models can’t run normally. Can you give me an solution? Thanks a lot!