yolox_example 在 aarch64 linux 下编译失败
Opened this issue · 3 comments
xTayEx commented
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
chenqy4933 commented
看起来好像是 neon 的头文件不对,这个数据类型没有找到,你直接到模型编译完成之后的 runtime 下面去执行 cmake ,看看是不是cmake 就报错了。
xTayEx commented
在 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 commented
在 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