Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yolox_example 在 aarch64 linux 下编译失败 #48

Open
xTayEx opened this issue May 28, 2023 · 3 comments
Open

yolox_example 在 aarch64 linux 下编译失败 #48

xTayEx opened this issue May 28, 2023 · 3 comments

Comments

@xTayEx
Copy link

xTayEx commented May 28, 2023

build target 为 aarch64 的 linux ,按照 https://github.com/MegEngine/MegCC/blob/main/yolox_example/README.md 中的说明操作,当执行 python ../runtime/scripts/runtime_build.py --cross_build --kernel_dir ./kernel_yolox_s_arm/ --remove_old_build --cross_build_target_os LINUX --cross_build_target_arch aarch64 时,会出现如下错误:

/home/xxxx/Downloads/megcc_release/release_megcc/runtime/../immigration/include/marm_neon.h:241:62: error: pragma or attribute ‘target("dotprod")’ is not valid
  241 |                                                              int8x16_t b) {
      |                                                              ^~~~~~~~~

编译工具链为gcc-aarch64-linux-gnu
MegCC版本为v0.1.2

@xTayEx xTayEx changed the title Can't build yolox_example for aarch64 linux yolox_example在aarch64 linux下构建失败 May 28, 2023
@xTayEx xTayEx changed the title yolox_example在aarch64 linux下构建失败 yolox_example 在 aarch64 linux 下编译失败 May 28, 2023
@chenqy4933
Copy link
Collaborator

看起来好像是 neon 的头文件不对,这个数据类型没有找到,你直接到模型编译完成之后的 runtime 下面去执行 cmake ,看看是不是cmake 就报错了。

@xTayEx
Copy link
Author

xTayEx commented Jun 1, 2023

在 runtime 下执行 cmake 没有问题,结果如下

-- build MegCC runtime with kernel dir /home/xxxxx/Downloads/megcc_release/release_megcc/yolox_example/kernel_yolox_s_arm
-- TinyNN BUILD INFO:
-- 	System:                                 Linux
-- 	Processor:                              x86_64
-- 	Enable shared libarys:                  OFF
-- 	Enable asan check:                      OFF
-- 	Enabel achieve all staitc:              OFF
-- 	Enabel alloc tensor dynamic:            OFF
-- 	Enabel dump tensor to dir:              OFF
-- 	Build with register callback:           OFF
-- 	Build with Not standard os:             OFF
-- 	Build kernel dir:                       /home/xxxxx/Downloads/megcc_release/release_megcc/yolox_example/kernel_yolox_s_arm
-- Gen flatcc header.
-- Get immigration kernel.
CMake Warning at CMakeLists.txt:165 (message):
  build static tinynn, if you want strip and mangle sym, please run python3
  runtime/scripts/strip_and_mangling_static_tinynn.py manually


-- Configuring done
-- Generating done
-- Build files have been written to: /home/xxxxxxx/Downloads/megcc_release/release_megcc/yolox_example/kernel_yolox_s_arm/runtime

@Li-Ming-xin
Copy link
Contributor

在 runtime 下执行 cmake 没有问题,结果如下

-- build MegCC runtime with kernel dir /home/xxxxx/Downloads/megcc_release/release_megcc/yolox_example/kernel_yolox_s_arm
-- TinyNN BUILD INFO:
-- 	System:                                 Linux
-- 	Processor:                              x86_64
-- 	Enable shared libarys:                  OFF
-- 	Enable asan check:                      OFF
-- 	Enabel achieve all staitc:              OFF
-- 	Enabel alloc tensor dynamic:            OFF
-- 	Enabel dump tensor to dir:              OFF
-- 	Build with register callback:           OFF
-- 	Build with Not standard os:             OFF
-- 	Build kernel dir:                       /home/xxxxx/Downloads/megcc_release/release_megcc/yolox_example/kernel_yolox_s_arm
-- Gen flatcc header.
-- Get immigration kernel.
CMake Warning at CMakeLists.txt:165 (message):
  build static tinynn, if you want strip and mangle sym, please run python3
  runtime/scripts/strip_and_mangling_static_tinynn.py manually


-- Configuring done
-- Generating done
-- Build files have been written to: /home/xxxxxxx/Downloads/megcc_release/release_megcc/yolox_example/kernel_yolox_s_arm/runtime

看起来你执行的时候,没有指定Arch和OS,指定一下试试呢?或者直接看python ../runtime/scripts/runtime_build.py --cross_build --kernel_dir ./kernel_yolox_s_arm/ --remove_old_build --cross_build_target_os LINUX --cross_build_target_arch aarch64的输出,找到cmake的输出部分。 @xTayEx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants