TexasInstruments / edgeai-tidl-tools

Edgeai TIDL Tools and Examples - This repository contains Tools and example developed for Deep learning runtime (DLRT) offering provided by TI’s edge AI solutions.
Other
129 stars 33 forks source link

CPP Compiled Failed: cannot find -lonnxruntime #7

Closed Lllllp93 closed 2 years ago

Lllllp93 commented 2 years ago

Hi there,

I need to run my model on TDA4VM with CPP APIs (dlr). I write a CPP script for my model,which can be built and run on PC. But that file cannot be built on TDA4, below is the output info:

edgeai

I tried to 2 ways :

  1. copy the libonnxruntime.so from tidl_tools(PC sdk8.0 folder) to /usr/lib (on TDA4)
  2. download tidl_tools.tar.gz in this repo and copy libonnxruntime.so to /usr/lib (on TDA4)

But cannot work, how can I solve this problem?

BTW, I can run my model with CPP API on TDA4VM in this way, but the inference time is two times slower than python API. so what's the difference between these two methods to run CPP API?

kumardesappan commented 2 years ago

Please reefer the DLR CPP example available here to run on PC as well as VEM https://github.com/TexasInstruments/edgeai-tidl-tools/tree/master/examples/osrt_cpp/dlr

libonnxruntime.so Is already available in EVM file system. Need not to copy specifically. The cmake rule added the required path to the link command

Lllllp93 commented 2 years ago

But the error is 'cannot find -lonnxruntime' even if the EVM file system is correct . Or can you provide a correct verison of libonnxruntime.so and tell me where should I copy to?