Trtexec OOM when translating ONNX model

Hi, all
I am trying to convert a YOLOv4 (full yolov4, not tiny version) model in format ONNX to the tensorRT engine using trtexec. The device I am using is jetson Xavier NX.
Even with --buildOnly flag, the executive fails with code 137(out of memory). Yolov4 is not a big model and won’t take too much GPU memory. In the testing with Pytorch, It cost about 3GB and with Tensorflow the cost is almost the same.

So the problem is: 1) Why is this kind of translation costing so much memory of Jetson Devices?
2) Any alternative solution for this? Like building the model with V100/RTX2080ti and manually
selecting the compute compatibility version to 7.2 ?


There is no update from you for a period, assuming this is not an issue any more.
Hence we are closing this topic. If need further support, please open a new one.


May I know the OOM occurs on onnx -> TensorRT or wts -> onnx?

Only little extra memory will be used when converting the model from onnx into TensorRT.
If the memory issue do occur on the TensorRT conversion, could you share the onnx model with us for checking?