Build pytorch v1.8.1 from source for the drive agx

Please provide the following info (check/uncheck the boxes after clicking “+ Create Topic”):
Software Version
DRIVE OS Linux 5.2.0
DRIVE OS Linux 5.2.0 and DriveWorks 3.5
NVIDIA DRIVE™ Software 10.0 (Linux)
NVIDIA DRIVE™ Software 9.0 (Linux)
other DRIVE OS version

Target Operating System

Hardware Platform
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)
NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)

SDK Manager Version

Host Machine Version
native Ubuntu 18.04


I am trying to build pytorch v1.8.1 from source for the AGX, following this blog post: Build the pytorch from source for drive agx xavier

But I constantly get errors:

I try to build pytorch, to get a cuda compatible package, because I want to run yolov5 (GitHub - ultralytics/yolov5: YOLOv5 in PyTorch > ONNX > CoreML > TFLite) as a python ros2 node.

Hi yannick.otten.2010,

Would you please help to update your registration info to be the business email instead of the private one, and the full name if company?


Hi @kayccc ,
I updated my registration info.

Dear @yannick.otten,
I could see error related to compiling .cu files. I would expect this in DRIVE OS 5.2.0 due to unavailability of nvcc on target where as DRIVE SW 10 has nvcc on target.

PyTorch is not officially supported and optimized for DRIVE platform. We recommend using ONNX → TensorRT conversion and use TensorRT model for inference to get optimal performance. Please check Developer Guide :: NVIDIA Deep Learning TensorRT Documentation for more details.

Hey @SivaRamaKrishnaNV ,

I don’t understand why PyTorch is supported on the Jetson and not on the DRIVE platform. Converting models to ONNX and then to TensorRT is a really time consuming workflow and shouldn’t be a “solution”.

The example you named uses the TensorRT python module, but according to the documentation the DRIVE platform doesn’t support this module: TensorRT Support Matrix :: NVIDIA Deep Learning SDK Documentation