# TensorRT5 onnx parser API issue

**URL:** <https://forums.developer.nvidia.com/t/tensorrt5-onnx-parser-api-issue/67163>\
**Category:** TensorRT\
**Created:** [November 9, 2018, 3:50am UTC](https://forums.developer.nvidia.com/t/tensorrt5-onnx-parser-api-issue/67163 "2018-11-09T03:50:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vincentl13x](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@vincentl13x](https://forums.developer.nvidia.com/u/vincentl13x)\
**Post date:** [November 9, 2018, 3:50am UTC](https://forums.developer.nvidia.com/t/tensorrt5-onnx-parser-api-issue/67163/1 "2018-11-09T03:50:34Z")

</div>

I found the doc of TensorRT5 (in the downloaded pdf SWE-SWDOCTRT-001-DEVG\_v5.0.2) inconsistent with api.

The MNIST sample in section 9.1.4.1 is different in the actual sample code sampleOnnxMNIST.cpp

In pp68-69,  
this is the sample from the doc

```auto
nvonnxparser::IONNXParser* parser = nvonnxparser::createONNXParser(*config);

```

However there is no createONNXParser in the header file NvOnnxParser.h, and there is not a api that accepts a config object either (it should be createONNXParser, according to the doc)

In ONNXParser::parse previously I can specify datatype. I noticed this is changed now. Could you also explain how can I specify a datatype (int8) now in ONNXParser?

---

<div class="post-metadata">

**Author:** ![403387795](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@403387795](https://forums.developer.nvidia.com/u/403387795)\
**Post date:** [December 2, 2018, 4:34pm UTC](https://forums.developer.nvidia.com/t/tensorrt5-onnx-parser-api-issue/67163/2 "2018-12-02T16:34:08Z")

</div>

Same issue.  
When using TensorRT4.0, i can set fp16 mode and actually speed up 180%.  
But using TensorRT5.0, i cannot find a param to set parser datatype, only using buider.setfp16mode(true) and i cannot speed up.

---

<div class="post-metadata">

**Author:** ![jongchan](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@jongchan](https://forums.developer.nvidia.com/u/jongchan)\
**Post date:** [February 18, 2019, 6:08am UTC](https://forums.developer.nvidia.com/t/tensorrt5-onnx-parser-api-issue/67163/3 "2019-02-18T06:08:38Z")

</div>

I had the same problem, and solved by changing all my codes according to the new samples in JetPack4.0.  
including the Make.config file.

---

<div class="post-metadata">

**Author:** ![xingzhou](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@xingzhou](https://forums.developer.nvidia.com/u/xingzhou)\
**Post date:** [February 26, 2019, 2:30am UTC](https://forums.developer.nvidia.com/t/tensorrt5-onnx-parser-api-issue/67163/4 "2019-02-26T02:30:13Z")

</div>

> [@](#):
>
> I had the same problem, and solved by changing all my codes according to the new samples in JetPack4.0.  
> including the Make.config file.

Hi jongchan,

I had the same problem. Could you share how to change the code?

Thank.
