# Why is TensorRT faster than TensorFlow?

**URL:** <https://forums.developer.nvidia.com/t/why-is-tensorrt-faster-than-tensorflow/212277>\
**Category:** TensorRT\
**Created:** [April 22, 2022, 2:20am UTC](https://forums.developer.nvidia.com/t/why-is-tensorrt-faster-than-tensorflow/212277 "2022-04-22T02:20:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lolcocks1231](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@lolcocks1231](https://forums.developer.nvidia.com/u/lolcocks1231)\
**Post date:** [April 22, 2022, 2:20am UTC](https://forums.developer.nvidia.com/t/why-is-tensorrt-faster-than-tensorflow/212277/1 "2022-04-22T02:20:04Z")

</div>

Hello,

What is the exact technical reason why TensorRT is faster than TensorFlow or others?

Everywhere I see, I see reasons like “40% faster” etc. No technical reasons.

Does anyone have a link to a technical reason?

---

<div class="post-metadata">

**Author:** ![NVES](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/nves/32/14043_2.png) [@NVES](https://forums.developer.nvidia.com/u/NVES)\
**Post date:** [April 22, 2022, 2:37am UTC](https://forums.developer.nvidia.com/t/why-is-tensorrt-faster-than-tensorflow/212277/2 "2022-04-22T02:37:48Z")

</div>

Hi,

Request you to share the model, script, profiler, and performance output if not shared already so that we can help you better.

Alternatively, you can try running your model with trtexec command.

> **[TensorRT/samples/trtexec at master · NVIDIA/TensorRT](https://github.com/NVIDIA/TensorRT/tree/master/samples/trtexec)**
>
> NVIDIA® TensorRT™ is an SDK for high-performance deep learning inference on NVIDIA GPUs. This repository contains the open source components of TensorRT. - NVIDIA/TensorRT

While measuring the model performance, make sure you consider the latency and throughput of the network inference, excluding the data pre and post-processing overhead.  
Please refer to the below links for more details:

> **[NVIDIA TensorRT Documentation — NVIDIA TensorRT](https://docs.nvidia.com/deeplearning/tensorrt/latest/)**

> **[NVIDIA TensorRT Documentation — NVIDIA TensorRT](https://docs.nvidia.com/deeplearning/tensorrt/latest/)**

Thanks!

---

<div class="post-metadata">

**Author:** ![lolcocks1231](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@lolcocks1231](https://forums.developer.nvidia.com/u/lolcocks1231)\
**Post date:** [April 22, 2022, 2:31pm UTC](https://forums.developer.nvidia.com/t/why-is-tensorrt-faster-than-tensorflow/212277/5 "2022-04-22T14:31:54Z")

</div>

Thank you, NVES!

But this is a more general question.

I am asking, why does TensorRT in general perform better than TensorFlow on the GPU? Like how exactly is TensorRT taking advantage of the hardware to perform better than other machine learning libraries.

---

<div class="post-metadata">

**Author:** ![spolisetty](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/spolisetty/32/14047_2.png) [@spolisetty](https://forums.developer.nvidia.com/u/spolisetty)\
**Post date:** [April 26, 2022, 5:16am UTC](https://forums.developer.nvidia.com/t/why-is-tensorrt-faster-than-tensorflow/212277/6 "2022-04-26T05:16:58Z")

</div>

Hi,

We document some of what we do here, Please refer following.  
[https://developer.nvidia.com/tensorrt#features](https://developer.nvidia.com/tensorrt#features)

Thank you.
