为ARM Cortex A9生成AOT卤化物对象文件
Generate AOT Halide object file for ARM Cortex A9
我正在尝试使用halde -lang AOT和交叉编译教程。我想做的是跨AOT为Cortex A9嵌入式Linux目标编译一个Halide程序。
我对lesson_11_cross_compile .cpp进行了如下修改:
Target target;
target.os = Target::Linux; // The operating system
target.arch = Target::ARM; // The CPU architecture
target.bits = 32; // The bit-width of the architecture
std::vector<Target::Feature> arm_features; // A list of features to set
arm_features.push_back(Target::ARMv7s);
target.set_features(arm_features);
brighter.compile_to_file("lesson_11_arm_32_linux", args, target); // Pass the target as the last argument.
brighter.compile_to_c("lession_11.c", args, "foo", target);
我用列在lesson_11_cross_compile .cpp文件顶部的g++命令编译它。这将生成lession_11可执行文件。我运行可执行文件,得到一个lesson_11_arm_32_linux.h/o文件。
然后在该文件上运行交叉编译器,尝试使用以下命令行为目标生成程序:
/opt/Xilinx/SDK/2014.2/gnu/arm/lin/bin/arm- Xilinx -linux-gnueabi-g++ -o test -std=c++11 -lpthread lesson_10_aot_compilation_run.cpp lesson_11_arm_32_linux. cppo -mfpu = neon-vfpv4/opt/Xilinx/SDK/2014.2/gnu/胳膊/林/bin/. ./lib/gcc/arm-xilinx-linux-gnueabi/4.8.1/../../../../arm-xilinx-linux-gnueabi/bin/ld: error: lesson_11_arm_32_linux. xmlo使用VFP寄存器参数,test不使用/opt/Xilinx/SDK/2014.2/gnu/胳膊/林/bin/. ./lib/gcc/arm-xilinx-linux-gnueabi/4.8.1/../../../../arm-xilinx-linux-gnueabi/bin/ld: failed to merge target specific data of file lesson_11_arm_32_linux.o
收集2:error: ld returned 1 exit status似乎Halide生成了使用VFP的代码。我试过改变-mfpu选项和-mfloat-abi=softfp、soft和hard。没有什么工作。是否有一种方法可以配置卤化物来生成某种类型的FPU指令?
我不认为你想要armv7s的皮质-a9。对于32位arm, Halide假定一个cortex-a9 ,除非您启用了armv7s。
如果你有一个'gnueabihf'工具链,你可以使用,这应该工作(硬浮动)。如果你愿意自己编译Halide,你也可以修改CodeGen_ARM::use_soft_float_abi() (https://github.com/halide/Halide/blob/master/src/CodeGen_ARM.cpp#L1252)来做你想做的事情。
我们可能应该添加一个选择浮点数abi的目标标志。
- 彩色图像的卤化物处理平均值
- 具有 GPU 时间表的卤化物产生黑色图像
- 卤化物:X86汇编代码生成
- 更快地将卤化物图像转换为 opencv 垫?
- 卤化物::GPU 上的缓冲区
- 有没有办法将两个输入图像堆叠到卤化物发生器中的单个 4 维缓冲区中?
- 定义一个带有缓冲区的函数作为卤化物中的边界框参数
- 卤化物:较大图像的去马赛克算法错误.似乎适用于 16x16 图像
- 如何使以下卤化物代码更加高效
- 如何让卤化物使用滑动窗口优化?
- 卤化物最佳计划
- 之一卤化物中的Cholesky分解
- 卤化物:将C 功能传递到卤化物弹性中
- 卤化物中的可变域还原
- 卤化物检查是否可以分开
- 如何使用卤化物轮廓仪
- 卤化物表达式:_pFirstBlock == pHead 在简单程序上崩溃
- 将卤化物与表示为浮点数组的 HDR 图像一起使用
- 更改卤化物输出缓冲器布局
- 为ARM Cortex A9生成AOT卤化物对象文件