【问题标题】:Can not execute hexagon_graph_execution on hexagon-sim无法在 hexagon-sim 上执行 hexagon_graph_execution
【发布时间】:2017-06-07 16:57:31
【问题描述】:

我已关注build_and_run_inception_hexagon.sh 并生成了 hexagon_graph_execution 可执行文件。现在,我不想使用真实设备,而是想使用 SDK 3.0 提供的hexagon-sim 测试初始模型。因此无需使用 adb push 命令,因为 SDK 可以使用 hexagon-sim 模拟 HVX 设备。 我已将运行时库和初始模型以及图像放在同一个文件夹中。执行后它给了我这个错误:

~/Qualcomm/HEXAGON_Tools/7.2.12/Tools/bin/hexagon-sim ./hexagon_graph_execution "/home/aashouri/Qualcomm/Hexagon_SDK/3.0/test/common/inception"
Error: Unsupported machine type 0x0 in ELF image "./hexagon_graph_execution" - exiting.

任何人都可以对此发表评论吗?

Hexagon-readelf:

ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              DYN (Shared object file)
  Machine:                           ARM
  Version:                           0x1
  Entry point address:               0xc8c9c
  Start of program headers:          52 (bytes into file)
  Start of section headers:          39944896 (bytes into file)
  Flags:                             0x5000000, Version5 EABI
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         8
  Size of section headers:           40 (bytes)
  Number of section headers:         36
  Section header string table index: 35

XXD info

0000000: 7f45 4c46 0101 0100 0000 0000 0000 0000  .ELF............
0000010: 0300 2800 0100 0000 9c8c 0c00 3400 0000  ..(.........4...
0000020: c082 6102 0000 0005 3400 2000 0800 2800  ..a.....4. ...(.
0000030: 2400 2300 0600 0000 3400 0000 3400 0000  $.#.....4...4...
0000040: 3400 0000 0001 0000 0001 0000 0400 0000  4...............
0000050: 0400 0000 0300 0000 3401 0000 3401 0000  ........4...4...
0000060: 3401 0000 1300 0000 1300 0000 0400 0000  4...............
0000070: 0100 0000 0100 0000 0000 0000 0000 0000  ................
0000080: 0000 0000 ece6 2a01 ece6 2a01 0500 0000  ......*...*.....
0000090: 0010 0000 0100 0000 20eb 2a01 20fb 2a01  ........ .*. .*.

【问题讨论】:

  • 做一个~/Qualcomm/HEXAGON_Tools/7.2.12/Tools/bin/hexagon-readelf -h ./hexagon_graph_execution。也许是xxd ./hexagon_graph_execution|head
  • 谢谢。更新了我的问题@Brian

标签: android tensorflow hexagon-dsp


【解决方案1】:
ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              DYN (Shared object file)
  Machine:                           ARM
  Version:                           0x1

这个二进制文件不是由 hexagon-clang 构建的。您一定是不小心使用 ARM 工具链构建的——如果它是为 hexagon DSP 构建的,“Machine”字段会显示“Qualcomm Hexagon”。

【讨论】:

  • 哦!我懂了。我认为hexagon-sim 能够在 Android 构建的二进制文件上模拟 DSP 环境。所以我必须用hexagon-clang 更改工具链中所有使用GCCclang 的实例?
  • 是的,至少是这样。构建 .so 可能需要更多标志,但以 hexagon-clang 开头。顺便说一句,现在您可能更喜欢 SDK 3.2。
  • 谢谢。起初我使用它,但 3.2 与 Tensorflow HVX makefile 和运行时之间存在不一致,迫使我使用 3.0。
  • 好点。如果您不介意,请打开另一个关于这些问题的 SO 问题。也许我们可以解决这个问题。
  • 当然,在这个测试之后我会:) 谢谢
猜你喜欢
  • 2021-09-12
  • 2013-01-20
  • 1970-01-01
  • 1970-01-01
  • 2016-05-04
  • 2014-07-31
  • 2019-09-23
  • 2014-05-25
  • 2019-05-27
相关资源
最近更新 更多