From 21088a1afcddefee98d23048e6b1375e7bb387da Mon Sep 17 00:00:00 2001 From: Wayne Xiu Date: Wed, 17 Apr 2024 15:12:09 +0000 Subject: [PATCH 1/3] WIP - try to fix DLA config issue in builder --- c/tensorNet.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/c/tensorNet.cpp b/c/tensorNet.cpp index 438a16291..c0a43c197 100644 --- a/c/tensorNet.cpp +++ b/c/tensorNet.cpp @@ -930,6 +930,12 @@ bool tensorNet::ConfigureBuilder( nvinfer1::IBuilder* builder, nvinfer1::IBuilde // set the default device type config->setDefaultDeviceType(deviceTypeToTRT(device)); + switch(device) + { + case deviceType::DEVICE_DLA: config->setDLACore(0); break; + case deviceType::DEVICE_DLA_1: config->setDLACore(1); break; + default: break; + } if( allowGPUFallback ) config->setFlag(nvinfer1::BuilderFlag::kGPU_FALLBACK); From 3c735595c6cae3c5cfb821c001dbf9befe86db13 Mon Sep 17 00:00:00 2001 From: Wayne Xiu Date: Wed, 14 Aug 2024 23:44:04 +0000 Subject: [PATCH 2/3] update disable HAS_VPI flag in CMake temporarily --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index abad4c320..a7ef6be70 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -109,8 +109,9 @@ if( NOT VPI_FOUND ) message("-- didn't find VPI on system, disabling VPI") else() message("-- VPI version: " ${VPI_VERSION}) - set(HAS_VPI 1) - add_definitions(-DHAS_VPI) + # TODO: FIXME for some devices, VPI2 will be found but not work, disable for now + set(HAS_VPI 0) + # add_definitions(-DHAS_VPI) endif() # setup project output paths From 475ba0998cfea4f7f279b81bed4cd02e2b8e7b8d Mon Sep 17 00:00:00 2001 From: Wayne Xiu Date: Mon, 30 Sep 2024 02:58:53 +0000 Subject: [PATCH 3/3] revert back changes in CMake for VPI --- CMakeLists.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a7ef6be70..abad4c320 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -109,9 +109,8 @@ if( NOT VPI_FOUND ) message("-- didn't find VPI on system, disabling VPI") else() message("-- VPI version: " ${VPI_VERSION}) - # TODO: FIXME for some devices, VPI2 will be found but not work, disable for now - set(HAS_VPI 0) - # add_definitions(-DHAS_VPI) + set(HAS_VPI 1) + add_definitions(-DHAS_VPI) endif() # setup project output paths