Wanted to know in detail about parser in the tensorrt

Hi all, this is regarding the minimal information present in the tensorrt about how the parser function works.
While understanding the trtexec source and in many of the source code I have come across with these functions and have got following doutbs

  1. parser.caffeParser->parse(
    model.prototxt.c_str(), modelName.empty() ? nullptr : modelName.c_str(), network, DataType::kFLOAT);

  2. parser.uffParser->parse(model.baseModel.model.c_str(), network);

  3. parser.onnxParser.reset(createParser(network, sample::gLogger.getTRTLogger()));
    parser.onnxParser->parseFromFile(
    model.baseModel.model.c_str(), static_cast(sample::gLogger.getReportableSeverity())

Doubt - What it does with the parameter ‘network’ passed to it?. Will it parse the model in terms of understanding the layers present in the model and populate the network [creates layers in the network and assigns number of input/output and weights to each of the layers?


Please clarify my above doubts.

Also the tensorrt documentation I have read on the parser, I am not finding a detailed explanation on parser. Can you please point me to a right place in the documentation where I find a detailed information on parser with regards to parser.

Thanks and Regards

Nagaraj Trivedi

Hi all, please update me on this.

Thanks and Regards

Nagaraj Trivedi

Dear @trivedi.nagaraj,
We have open sourced the parsers at https://github.com/NVIDIA/TensorRT/tree/release/8.6/parsers . You can check the implementation details.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.