Hi,
I am using TensroRT on Jetson TX2/NX for object detection. I have one question, can I create two engines(models) in one IRuntime, and do inference one by one?
Some code like below to create two engines and do inference:
IRuntime* runtime = createInferRuntime(gLogger);
ICudaEngine* engine = runtime->deserializeCudaEngine(ModelStream, size);
IExecutionContext* context = engine->createExecutionContext();
ICudaEngine* engine2 = runtime->deserializeCudaEngine(ModelStream2, size);
IExecutionContext* context2 = engine2->createExecutionContext();**
context.enqueue(xxx);
//parse output of first model inference, then use it as input of the second model inference
context2.enqueue(xxx);
Is this possible? If not, how can I implement the two models inference one by one?
Thanks
Harry