CenterPoint icon indicating copy to clipboard operation
CenterPoint copied to clipboard

Why two subgraphs instead of one whole graph

Open hygxy opened this issue 4 years ago • 1 comments

In the README, it says "Here we extract two pure nn models from the whole computation graph---pfe and rpn, this is to make it easier for trt to optimize its inference engines, and we use cuda to connect these nn engines."

Is there any repo/docu/link/tutorial that supports this argument? i.e., why is it easier for trt to optimize its inference engines? (one onnx vs two onnxs)

hygxy avatar Sep 22 '22 14:09 hygxy

  1. TensorRT is developed to optimize nn inference, the connection part between pfe & rpn (voxel assigning) involves no nn computing, I don't think TRT would optimize that part of computation.
  2. Since TensorRT is a like black box, I'd rather believe you should take over the non-nn computation part as much as possible, because you can control something like memory allocation or threads allocation and so on.

That is why I spilled into two part of nn graphs, and connected them using cuda.

Hale423 avatar Sep 26 '22 02:09 Hale423

But 2 onnx will generate more mem cost, like pfe output ,intermediates and rpn input cost more resources.

ryanyej avatar Oct 16 '23 07:10 ryanyej