# TensorRT engine execute on jetson TX2

**URL:** <https://forums.developer.nvidia.com/t/tensorrt-engine-execute-on-jetson-tx2/65973>\
**Category:** TensorRT\
**Created:** [October 9, 2018, 8:54am UTC](https://forums.developer.nvidia.com/t/tensorrt-engine-execute-on-jetson-tx2/65973 "2018-10-09T08:54:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vered](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@vered](https://forums.developer.nvidia.com/u/vered)\
**Post date:** [October 9, 2018, 8:54am UTC](https://forums.developer.nvidia.com/t/tensorrt-engine-execute-on-jetson-tx2/65973/1 "2018-10-09T08:54:45Z")

</div>

Hi, I was able to create tensorrt engine using c++ api, and NVCC compiler.  
Now, I’ve tried to create code for inference.  
I’ve tried to compile and run the executable file for every new line I added, in order to make kind of debugging on my jetson TX2.  
My problem is with this line:  
context-\>execute(1, bindings);  
The compilation was successful but when I ran the output of the compilation I got this error:

cudnnEngine.cpp (420) - Cuda Error in execute: 4

Is anyone know this issue and know how to fix that?  
thank you all!!!

---

<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:** [October 9, 2018, 3:15pm UTC](https://forums.developer.nvidia.com/t/tensorrt-engine-execute-on-jetson-tx2/65973/2 "2018-10-09T15:15:15Z")

</div>

Hello,

CUDA error 4 is cudaErrorLaunchFailure.  
Usually due to dereferencing an invalid pointer or accessing out of bounds shared memory.

[http://docs.nvidia.com/cuda/cuda-runtime-api/group\_\_CUDART\_\_TYPES.html#group\_\_CUDART\_\_TYPES\_1g3f51e3575c2178246db0a94a430e0038](http://docs.nvidia.com/cuda/cuda-runtime-api/group __CUDART__ TYPES.html#group __CUDART__ TYPES_1g3f51e3575c2178246db0a94a430e0038)

Likely you have an out of resource issue.
