Installing/ Building Torch-Tensorrt for JetPack 5.0.1 DP/ L4t-ml r34.1.1-py3

Hi,

Is there a stable way to build Torch-Tensorrt for Xavier AGX from source?
I am aware of a post here:

However, I need to build it for JetPack 5.0+ since I want to use Ubuntu 20.04 base.
I tried using the instructions:
https://pytorch.org/TensorRT/

But I get several errors when trying to build.

Further, I used L4t-ML docker image r34.1.1-py3

Please help me out.

Best Regards
Sambit

Hi,

Do you compile it with the instructions below?
If yes, would you mind sharing the error you met with us?
https://pytorch.org/TensorRT/tutorials/installation.html

Thanks.

Sure, I will share it shortly.
However, as you can see in the section for native build on jetson, the platform option only shows for jetpack 4.6

This is the first point of confusion, can I just change it to 5.0 and issue the build command?

I also had to change lines in workspace since Jetpack 5.0 has Python3.8

Shown lines are for Python3.6

Best Regards
Sambit

Hi,

It should work by updating the version into JetPack 5.0 DP and python into 3.8.
It will be good if you can share the commands/steps as well.

Thanks.

Here is the error message I get when I change to jetpack_5.0

Best Regards

Update - I was able to build it.
Change - toolchain/BUILD
platform(
name = “jetpack_5.0”,
constraint_values = [
@platforms//os:linux”,
@platforms//cpu:aarch64”,
“@//toolchains/jetpack:5.0”
]
)

Change - toolchain/Jetpack/BUILD
constraint_value(
name = “5.0”,
constraint_setting = “:jetpack”
)

Last question -
After building, do I need to copy the generated files from bazel-bin (include files and .so) to some other system directory?
Also, how can I use it with base Python interpreter?

Best Regards

Hi,

There should be a package like torch-xxx-linux_aarch64.whl.
Then you can copy it to another platform and install it with pip3.

Thanks.

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