This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] TDA4VM:回复:Github 上的 EDGE Tidl Tools 并尝试在 Ubuntu 上编译

Guru**** 2538960 points
Other Parts Discussed in Thread: TDA4VM

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1401813/tda4vm-re-edge-tidl-tools-on-github-and-trying-to-compile-on-ubuntu

器件型号:TDA4VM

工具与软件:

https://github.com/TexasInstruments/edgeai-tidl-tools 是我目前使用的 GitHub 链接。

我正在尝试在具有 x86_64的计算机上编译库、然后在 TDA4VM 电路板上推送推理。

到目前为止、我遇到了编译错误:

Operating System: Ubuntu 22.04.4 LTS
Kernel: Linux 6.5.0-45-generic

目前、编译挂起在这里...

~/edgeai-tidl-tools$ source ./scripts/run_python_examples.sh 
X64 Architecture
Running 4 Models - ['cl-tfl-mobilenet_v1_1.0_224', 'ss-tfl-deeplabv3_mnv2_ade20k_float', 'od-tfl-ssd_mobilenet_v2_300_float', 'od-tfl-ssdlite_mobiledet_dsp_320x320_coco']


Running_Model :  cl-tfl-mobilenet_v1_1.0_224
Process Process-1:

Running_Model :  ss-tfl-deeplabv3_mnv2_ade20k_float
Process Process-2:

Running_Model :  od-tfl-ssd_mobilenet_v2_300_float
Traceback (most recent call last):
Traceback (most recent call last):
  File "/usr/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/usr/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/usr/lib/python3.10/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3.10/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/home/gort/edgeai-tidl-tools/examples/osrt_python/tfl/tflrt_delegate.py", line 183, in run_model
    experimental_delegates=[tflite.load_delegate(os.path.join(tidl_tools_path, 'tidl_model_import_tflite.so'), delegate_options)])
  File "/home/gort/edgeai-tidl-tools/examples/osrt_python/tfl/tflrt_delegate.py", line 183, in run_model
    experimental_delegates=[tflite.load_delegate(os.path.join(tidl_tools_path, 'tidl_model_import_tflite.so'), delegate_options)])
  File "/home/gort/edgeai-tidl-tools/lib/python3.10/site-packages/tflite_runtime/interpreter.py", line 166, in load_delegate
    delegate = Delegate(library, options)
  File "/home/gort/edgeai-tidl-tools/lib/python3.10/site-packages/tflite_runtime/interpreter.py", line 166, in load_delegate
    delegate = Delegate(library, options)
  File "/home/gort/edgeai-tidl-tools/lib/python3.10/site-packages/tflite_runtime/interpreter.py", line 73, in __init__
    self._library = ctypes.pydll.LoadLibrary(library)
  File "/home/gort/edgeai-tidl-tools/lib/python3.10/site-packages/tflite_runtime/interpreter.py", line 73, in __init__
    self._library = ctypes.pydll.LoadLibrary(library)
  File "/usr/lib/python3.10/ctypes/__init__.py", line 452, in LoadLibrary
    return self._dlltype(name)
  File "/usr/lib/python3.10/ctypes/__init__.py", line 452, in LoadLibrary
    return self._dlltype(name)
  File "/usr/lib/python3.10/ctypes/__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
  File "/usr/lib/python3.10/ctypes/__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /home/gort/edgeai-tidl-tools/tidl_tools/tidl_model_import_tflite.so: cannot open shared object file: No such file or directory
OSError: /home/gort/edgeai-tidl-tools/tidl_tools/tidl_model_import_tflite.so: cannot open shared object file: No such file or directory
Exception ignored in: <function Delegate.__del__ at 0x784a9b1331c0>
Exception ignored in: <function Delegate.__del__ at 0x784a9b1331c0>
Traceback (most recent call last):
Traceback (most recent call last):
  File "/home/gort/edgeai-tidl-tools/lib/python3.10/site-packages/tflite_runtime/interpreter.py", line 109, in __del__
  File "/home/gort/edgeai-tidl-tools/lib/python3.10/site-packages/tflite_runtime/interpreter.py", line 109, in __del__
    if self._library is not None:
    if self._library is not None:
AttributeError: 'Delegate' object has no attribute '_library'
AttributeError: 'Delegate' object has no attribute '_library'
Process Process-3:
Traceback (most recent call last):
  File "/usr/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/usr/lib/python3.10/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/home/gort/edgeai-tidl-tools/examples/osrt_python/tfl/tflrt_delegate.py", line 183, in run_model
    experimental_delegates=[tflite.load_delegate(os.path.join(tidl_tools_path, 'tidl_model_import_tflite.so'), delegate_options)])
  File "/home/gort/edgeai-tidl-tools/lib/python3.10/site-packages/tflite_runtime/interpreter.py", line 166, in load_delegate
    delegate = Delegate(library, options)
  File "/home/gort/edgeai-tidl-tools/lib/python3.10/site-packages/tflite_runtime/interpreter.py", line 73, in __init__
    self._library = ctypes.pydll.LoadLibrary(library)
  File "/usr/lib/python3.10/ctypes/__init__.py", line 452, in LoadLibrary
    return self._dlltype(name)
  File "/usr/lib/python3.10/ctypes/__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /home/gort/edgeai-tidl-tools/tidl_tools/tidl_model_import_tflite.so: cannot open shared object file: No such file or directory
Exception ignored in: <function Delegate.__del__ at 0x784a9b1331c0>
Traceback (most recent call last):
  File "/home/gort/edgeai-tidl-tools/lib/python3.10/site-packages/tflite_runtime/interpreter.py", line 109, in __del__
    if self._library is not None:
AttributeError: 'Delegate' object has no attribute '_library'

Running_Model :  od-tfl-ssdlite_mobiledet_dsp_320x320_coco
Process Process-4:
Traceback (most recent call last):
  File "/usr/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/usr/lib/python3.10/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/home/gort/edgeai-tidl-tools/examples/osrt_python/tfl/tflrt_delegate.py", line 183, in run_model
    experimental_delegates=[tflite.load_delegate(os.path.join(tidl_tools_path, 'tidl_model_import_tflite.so'), delegate_options)])
  File "/home/gort/edgeai-tidl-tools/lib/python3.10/site-packages/tflite_runtime/interpreter.py", line 166, in load_delegate
    delegate = Delegate(library, options)
  File "/home/gort/edgeai-tidl-tools/lib/python3.10/site-packages/tflite_runtime/interpreter.py", line 73, in __init__
    self._library = ctypes.pydll.LoadLibrary(library)
  File "/usr/lib/python3.10/ctypes/__init__.py", line 452, in LoadLibrary
    return self._dlltype(name)
  File "/usr/lib/python3.10/ctypes/__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /home/gort/edgeai-tidl-tools/tidl_tools/tidl_model_import_tflite.so: cannot open shared object file: No such file or directory
Exception ignored in: <function Delegate.__del__ at 0x784a9b1331c0>
Traceback (most recent call last):
  File "/home/gort/edgeai-tidl-tools/lib/python3.10/site-packages/tflite_runtime/interpreter.py", line 109, in __del__
    if self._library is not None:
AttributeError: 'Delegate' object has no attribute '_library'

我不是很清楚如何完成的事情,超过这种停顿。 有人对从何处开始调试输出有任何建议吗?

Seth

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    噢、我更改了编译器。。。

    这可能与编译错误有关。 我将把它改回来、看看能走多远。

    Seth

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    好的...所以 Docker 脚本构建得足够好、没有错误。

    Seth

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Seth:

    是的、我们建议使用 Docker 映像并运行安装文档中列出的安装脚本来安装所需的依赖项。  

    这样做是否解决了您的问题?

    此致!

    Asha

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    Asha、您好!

    我叫 Seth。 该问题尚未完全解决、因为我尚未尝试更新 TDA4VM 以从存储库进行推理构建。  

    我是否也应该在 TDA4VM 上使用 Docker、或者更适合只使用 SOC=am68pa 进行构建、然后让 Docker 处理所有内容、最后尝试将源代码放在 TDA4VM 上?

    Seth

    P.S.我将继续努力使它发挥作用。 如果有任何人有任何光荣作为从 TDA4VM 的输出,请分享.  

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Seth:

    编译仅发生在主机 PC 上。 您可以将模型工件放置在 TDA4VM 上、并在 EVM 上使用相同的脚本运行。 有关步骤、请参阅此处的说明: https://github.com/TexasInstruments/edgeai-tidl-tools/tree/master/examples/osrt_python

    此致!

    Asha

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    感谢您让我理解。 我会进行尝试并在完成后进行回复。

    Seth

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    谢谢你。 我被误认为如何建造和使用该产品。 现在、我想我可以离开这个 e2e 聊天客户端/论坛。  

    Seth

    P.S.如果我遇到问题、我将重新尝试连接。 谢谢你。