Migrating to Driveworks 4.0

Please provide the following info (check/uncheck the boxes after creating this topic):
Software Version
DRIVE OS Linux 5.2.6
DRIVE OS Linux 5.2.6 and DriveWorks 4.0
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 migrate the sample code from the DNN Webinar (GitHub - ShayNvidia/dnnWebinar: NVIDIA DriveWorks for Drive) to Driveworks 4.0; The old code is as follows:

void sampleIntegrateDnn::onProcess()
// Run data conditioner to prepare input for the network
if(m_imageSource.getCudaImageRGBA(m_rgbaImageHandleCUDA, getProfilerCUDA()))
dwImageCUDA* rgbaImage;
CHECK_DW_ERROR(dwImage_getCUDA(&rgbaImage, m_rgbaImageHandleCUDA));
float32_t * deviceInputData = m_cudaBuffersIn->getDeviceBuffer();
float32_t * deviceOutputData = m_cudaBuffersOut->getDeviceBuffer();
// Run data conditioner on the input to apply pre-processing actions on the input imagedeviceInput
ProfileCUDASection s(getProfilerCUDA(), “preprocessindeviceInputgFrame”);
CHECK_DW_ERROR(dwDataConditioner_prepareData(deviceInputData, &rgbaImage, 1, &m_detectionRoi, cudaAddressModeClamp, m_dataConditionedeviceInputr));


dwDataConditioner_prepareData above expects an object of type dwDNNTensorHandle_t; but I have a float32_t pointer from m_cudaBuffersIn->getDeviceBuffer();

How do I get a dwDNNTensorHandle from the inputbuffer?

Dear @user3705,
Please use dwDataConditioner_prepareDataRaw for float buffers(DriveWorks SDK Reference: DataConditioner Interface).
Could you check DriveWorks SDK Reference: Basic Object Detector and Tracker Sample sample code for reference

Thanks SivaRamaKrishna. We were able to get past the compilation issue after using the _prepareDataRaw API

1 Like

Hi, @user3705

Thank you for letting us know.
This is also mentioned in DriveWorks SDK Reference: Porting Guide from SDK 2.2 to SDK 3.0. FYR.