ApolloAuto / apollo

An open autonomous driving platform
Apache License 2.0
25.25k stars 9.72k forks source link

apollo 9.0 NVDLA support #15521

Open xhzzhang opened 2 months ago

xhzzhang commented 2 months ago

Describe the bug Hello, I use NVIDIA AGX orin, build apoll 9.0, cusotmize a perception component 'prception_nvidia', this component linking tensorrt, and my tensorrt player use NVDLA, so expect support DLA.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error *launch error [nvidia@in-dev-docker:/apollo]$ cyber_launch start modules/perception_nvidia/launch/perception_nvidia.launch [cyber_launch_36922] INFO Launch file [modules/perception_nvidia/launch/perception_nvidia.launch] [cyber_launch_36922] INFO ======================================================================================================================== [cyber_launch_36922] INFO Load module [perception_nvidia] library: [perception_nvidia] [CYBER_DEFAULT] conf, exception_handler: [], respawn_limit: [3] [cyber_launch_36922] INFO Start process [perception_nvidia] successfully. pid: 36929 [cyber_launch_36922] INFO ------------------------------------------------------------------------------------------------------------------------ [perception_nvidia] WARNING: Logging before InitGoogleLogging() is written to STDERR [perception_nvidia] I0905 20:57:01.150024 36929 module_argument.cc:89] []command: mainboard -d /apollo/modules/perception_nvidia/dag/perception.dag -p perception_nvidia -s CYBER_DEFAULT [perception_nvidia] I0905 20:57:01.150879 36929 global_data.cc:153] []host ip: 192.168.1.100 [perception_nvidia] I0905 20:57:01.152675 36929 module_argument.cc:62] []binaryname is mainboard, processgroup is perception_nvidia, has 1 dag conf [perception_nvidia] I0905 20:57:01.152700 36929 module_argument.cc:65] []dag_conf: /apollo/modules/perception_nvidia/dag/perception.dag [perception_nvidia] E0905 20:57:03.114118 36929 class_loader_utility.cc:218] [mainboard]LibraryLoadException: libnvdla_compiler.so: cannot open shared object file: No such file or directory [perception_nvidia] E0905 20:57:03.114257 36929 class_loader_utility.cc:234] [mainboard]shared library failed: /apollo/bazel-bin/modules/perception_nvidia/libperception_nvidia_component.so [perception_nvidia] E0905 20:57:03.114295 36929 class_loader_manager.h:78] [mainboard]Invalid class name: PerceptionnvidiaComponent [perception_nvidia] E0905 20:57:03.114326 36929 module_controller.cc:69] [mainboard]Failed to load module: /apollo/modules/perception_nvidia/dag/perception.dag [perception_nvidia] E0905 20:57:03.114344 36929 class_loader_utility.cc:256] [mainboard]Attempt to UnloadLibrary lib, but can't find lib: /apollo/bazel-bin/modules/perception_nvidia/libperception_nvidia_component.so [perception_nvidia] E0905 20:57:03.114351 36929 mainboard.cc:39] [mainboard]module start error. [perception_nvidia]
    [cyber_launch_36922] ERROR Process [perception_nvidia] has died [pid 36929, exit code 255, cmd mainboard -d /apollo/modules/perception_nvidia/dag/perception.dag -p perception_nvidia -s CYBER_DEFAULT]. [cyber_launch_36922] INFO All processes has died. [cyber_launch_36922] INFO Cyber exit. [cyber_launch_36922] INFO All processes have been stopped.

Expected behavior A clear and concise description of what you expected to happen.

Screenshots check link state [nvidia@in-dev-docker:/apollo]$ ldd -r /apollo/bazel-bin/modules/perception_nvidia/libperception_robot_component.so |grep nv libabsl_scoped_set_env.so => /apollo/bazel-bin/modules/perception_nvidia/../../_solib_aarch64/_U@com_Ugoogle_Uabsl_S_S_Cabsl___Ulib/libabsl_scoped_set_env.so (0x0000ffff823d8000) libnvinfer.so.8 => /usr/lib/aarch64-linux-gnu/libnvinfer.so.8 (0x0000ffff746c7000) libnvinfer_plugin.so.8 => /usr/lib/aarch64-linux-gnu/libnvinfer_plugin.so.8 (0x0000ffff732a4000) libnvparsers.so.8 => /usr/lib/aarch64-linux-gnu/libnvparsers.so.8 (0x0000ffff72f33000) libnvonnxparser.so.8 => /usr/lib/aarch64-linux-gnu/libnvonnxparser.so.8 (0x0000ffff72c64000) libnvdla_compiler.so => not found libnvdla_runtime.so => not found libdouble-conversion.so.3 => /usr/lib/aarch64-linux-gnu/libdouble-conversion.so.3 (0x0000ffff360ab000) undefined symbol: _ZN5nvdla11destroySyncEPNS_5ISyncE (/usr/local/cuda/lib64/libcudla.so.1) undefined symbol: _ZN5nvdla14destroyRuntimeEPNS_8IRuntimeE (/usr/local/cuda/lib64/libcudla.so.1) undefined symbol: _ZN5nvdla13createRuntimeEv (/usr/local/cuda/lib64/libcudla.so.1) undefined symbol: _ZN5nvdla19createSyncSemaphoreEPK17NvDlaSemaphoreRec (/usr/local/cuda/lib64/libcudla.so.1) undefined symbol: _ZN5nvdla19createSyncSyncpointEPK13NvDlaFenceRec (/usr/local/cuda/lib64/libcudla.so.1) undefined symbol: _ZN5nvdla8IRuntime6submitEbbjjPPNS_5ISyncE (/usr/local/cuda/lib64/libcudla.so.1) undefined symbol: _ZN5nvdla25createSyncStrideSemaphoreEPK17NvDlaSemaphoreRecj (/usr/local/cuda/lib64/libcudla.so.1) undefined symbol: _ZN5nvdla8IRuntime15bindSubmitEventEi18NvDlaSyncEventTypePNS_5ISyncEPi (/usr/local/cuda/lib64/libcudla.so.1) undefined symbol: _ZN5nvdla14destroyNetworkEPNS_8INetworkE (/usr/lib/aarch64-linux-gnu/libnvinfer.so.8) undefined symbol: _ZN5nvdla13destroyWisdomEPNS_7IWisdomE (/usr/lib/aarch64-linux-gnu/libnvinfer.so.8) undefined symbol: _ZN5nvdla8IProfile37setCanCompressStructuredSparseWeightsEb (/usr/lib/aarch64-linux-gnu/libnvinfer.so.8) undefined symbol: _ZN5nvdla8IProfile17setUseSoftMaxOptzEb (/usr/lib/aarch64-linux-gnu/libnvinfer.so.8) undefined symbol: _ZN5nvdla12createWisdomEv (/usr/lib/aarch64-linux-gnu/libnvinfer.so.8) undefined symbol: _ZN5nvdla13createNetworkEv (/usr/lib/aarch64-linux-gnu/libnvinfer.so.8) undefined symbol: _ZN5nvdla8INetwork10addReshapeEPNS_7ITensorENS_5Dims4E (/usr/lib/aarch64-linux-gnu/libnvinfer.so.8) undefined symbol: _ZN5nvdla8INetwork12addTransposeEPNS_7ITensorENS_5Dims4E (/usr/lib/aarch64-linux-gnu/libnvinfer.so.8) undefined symbol: _ZN5nvdla8INetwork9addResizeEPNS_7ITensorENS_10ResizeModeENS_7WeightsE (/usr/lib/aarch64-linux-gnu/libnvinfer.so.8) undefined symbol: _ZN5nvdla8INetwork8addSliceEPNS_7ITensorENS_7WeightsES3_S3_S3_NS_14SliceLayerModeE (/usr/lib/aarch64-linux-gnu/libnvinfer.so.8) undefined symbol: _ZN5nvdla13ISoftMaxLayer7setAxisEi (/usr/lib/aarch64-linux-gnu/libnvinfer.so.8) undefined symbol: _ZN5nvdla13IPoolingLayer30setPoolingPaddingInclusionTypeENS_27PoolingPaddingInclusionTypeE (/usr/lib/aarch64-linux-gnu/libnvinfer.so.8)

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.