# Assertion engine != nullptr failed

**URL:** <https://forums.developer.nvidia.com/t/assertion-engine-nullptr-failed/241838>\
**Category:** Jetson AGX Orin\
**Tags:** tensorrt\
**Created:** [February 6, 2023, 3:42pm UTC](https://forums.developer.nvidia.com/t/assertion-engine-nullptr-failed/241838 "2023-02-06T15:42:45Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![wesley3](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@wesley3](https://forums.developer.nvidia.com/u/wesley3)\
**Post date:** [February 6, 2023, 3:42pm UTC](https://forums.developer.nvidia.com/t/assertion-engine-nullptr-failed/241838/1 "2023-02-06T15:42:45Z")

</div>

I am attempting to convert an ONNX model to TensorRT with the python package on a Jetson Orin Development Kit device. This is a continuation of this thread [https://forums.developer.nvidia.com/t/trtexec-internal-error-symbolic-relation-a-z-0-is-always-false/237317](https://forums.developer.nvidia.com/t/trtexec-internal-error-symbolic-relation-a-z-0-is-always-false/237317) but I am creating a new topic since the previous thread has been closed. I have just recently reflashed and upgraded the Jetson device to Jetpack 5.1 and found this similar issue here [https://forums.developer.nvidia.com/t/error-code-2-internal-error-assertion-engineptr-nullptr-failed/205371/3](https://forums.developer.nvidia.com/t/error-code-2-internal-error-assertion-engineptr-nullptr-failed/205371/3) but their solution was simply to upgrade Jetpack, which I have already done. Running apt show I see that my nvidia-cuda version is 5.1-b147 and my nvidia-tensorrt version is 5.1-b147. The only modification I have made to the code was to add a memory pool limit since the script threw a non enough memory error the first time I ran it, the complete script is here:

```auto
import tensorrt as trt
logger = trt.Logger(trt.Logger.WARNING)
builder = trt.Builder(logger)
network = builder.create_network(1 << int(trt.NetworkDefinitionCreationFlag.EXPLICIT_BATCH))
parser = trt.OnnxParser(network, logger)
success = parser.parse_from_file("sidewalk3.onnx")
config = builder.create_builder_config()
config.set_memory_pool_limit(pool=trt.MemoryPoolType.WORKSPACE,pool_size=16777216)
serialized_engine = builder.build_serialized_network(network, config)

```

 ![image](https://global.discourse-cdn.com/nvidia/original/3X/a/1/a1522e2185ede4e15a89781ebf7919e9b7e925ba.png)

```auto
[02/06/2023-09:52:58] [TRT] [E] 4: [optimizer.cpp::computeCosts::3725] Error Code 4: Internal Error (Could not find any implementation for node {ForeignNode[onnx::MatMul_9671 + (Unnamed Layer* 5373) [Shuffle]...Transpose_3662 + Reshape_3663]} due to insufficient workspace. See verbose log for requested sizes.)
[02/06/2023-09:52:58] [TRT] [E] 2: [builder.cpp::buildSerializedNetwork::751] Error Code 2: Internal Error (Assertion engine != nullptr failed. )

```

Any help would be very much appreciated, thank you!

---

<div class="post-metadata">

**Author:** ![AastaLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/aastalll/32/14043_2.png) [@AastaLLL](https://forums.developer.nvidia.com/u/AastaLLL)\
**Post date:** [February 7, 2023, 2:42am UTC](https://forums.developer.nvidia.com/t/assertion-engine-nullptr-failed/241838/3 "2023-02-07T02:42:44Z")

</div>

Hi,

Could you try to convert the model with _trtexec_ to see if it works?

```auto
$ /usr/src/tensorrt/bin/trtexec --onnx=

```

More, could you confirm which platform you use?  
Do you switch to the Orin device for XavierNX?

Thanks.

---

<div class="post-metadata">

**Author:** ![wesley3](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@wesley3](https://forums.developer.nvidia.com/u/wesley3)\
**Post date:** [February 7, 2023, 8:10pm UTC](https://forums.developer.nvidia.com/t/assertion-engine-nullptr-failed/241838/4 "2023-02-07T20:10:20Z")

</div>

[trtexec\_output.txt](https://forums.developer.nvidia.com/uploads/short-url/uvGEmV7H5pr70a7wgIWNQKhlu2r.txt) (260.6 KB)

I am now using the Orin Development Kit

---

<div class="post-metadata">

**Author:** ![AastaLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/aastalll/32/14043_2.png) [@AastaLLL](https://forums.developer.nvidia.com/u/AastaLLL)\
**Post date:** [February 8, 2023, 2:54am UTC](https://forums.developer.nvidia.com/t/assertion-engine-nullptr-failed/241838/5 "2023-02-08T02:54:21Z")

</div>

Hi,

Thanks, I’m moving your topic to the XavierNX board.  
Will update more information for you later.

---

<div class="post-metadata">

**Author:** ![wesley3](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@wesley3](https://forums.developer.nvidia.com/u/wesley3)\
**Post date:** [February 8, 2023, 2:56am UTC](https://forums.developer.nvidia.com/t/assertion-engine-nullptr-failed/241838/6 "2023-02-08T02:56:30Z")

</div>

Hello, I am not using a XavierNX board. I am using an Orin Development Kit.

---

<div class="post-metadata">

**Author:** ![wesley3](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@wesley3](https://forums.developer.nvidia.com/u/wesley3)\
**Post date:** [February 9, 2023, 12:26am UTC](https://forums.developer.nvidia.com/t/assertion-engine-nullptr-failed/241838/7 "2023-02-09T00:26:05Z")

</div>

Hi just in case you didn’t get my last post since the thread was moved, I want to again clarify that I am not using the XavierNX and I am using the Orin Development Kit. Should my thread be moved back to the Orin forum? If so, is that something that I could do or would that be something for a Moderator?

---

<div class="post-metadata">

**Author:** ![AastaLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/aastalll/32/14043_2.png) [@AastaLLL](https://forums.developer.nvidia.com/u/AastaLLL)\
**Post date:** [February 9, 2023, 6:30am UTC](https://forums.developer.nvidia.com/t/assertion-engine-nullptr-failed/241838/8 "2023-02-09T06:30:49Z")

</div>

Hi,

Sorry for the mistake. I have moved your topic back.

Based on the log, the model can run successfully with the _trtexec_.  
So the error should come from implementation side.

Could you remove the below line to see if it helps?

```auto
config.set_memory_pool_limit(pool=trt.MemoryPoolType.WORKSPACE,pool_size=16777216)

```

Thanks.

---

<div class="post-metadata">

**Author:** ![wesley3](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@wesley3](https://forums.developer.nvidia.com/u/wesley3)\
**Post date:** [February 24, 2023, 4:05am UTC](https://forums.developer.nvidia.com/t/assertion-engine-nullptr-failed/241838/10 "2023-02-24T04:05:11Z")

</div>

Sorry for the delay. This worked! Thank you for your help. Only thing that wasn’t completely clear in the developer guide is how to do inference with the context that you generate from the deserialized engine. Is there a more recent or deeper explanation somewhere other than here: [Developer Guide :: NVIDIA Deep Learning TensorRT Documentation](https://docs.nvidia.com/deeplearning/tensorrt/developer-guide/index.html#perform_inference_python)

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/system/32/68080_2.png) [@system](https://forums.developer.nvidia.com/u/system)\
**Post date:** [March 10, 2023, 4:05am UTC](https://forums.developer.nvidia.com/t/assertion-engine-nullptr-failed/241838/11 "2023-03-10T04:05:34Z")

</div>

Closed on March 10, 2023, 4:05am UTC

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