Created by: cryoco
Bug: Compiling Paddle inference lib fails on NV Jetson platforms:
Fix: According to PR#22716, if XBYAK is OFF, get avx info by calling __cpuid() function from cpuid.h, which is included in most gcc libs. However, on Jetson platforms, XBYAK is OFF, and the gcc of the origin linux distribution doesn't contain cpuid.h, causing the compile error above. So we use macros to skip the part PR#22716 added.
The bug#22636 that PR#22716 fixed is tested on Jetson TX2. It is not triggerd when executing import paddle.fluid as fluid
.
intel在2月合入的一个PR#22716里设置了在关掉xbyak时,调用gcc中的cpuid.h获得avx信息。这个改动目前会导致在英伟达jetson硬件上编译不过,因为jetson自带的gcc没有这个头文件。 由于要求所有jetson用户重装gcc的成本太高,所以加了个宏控制在jetson上编译时把pr22716的内容跳过。 PR#22716fix了一个在关掉xbyak时由于检测avx指令集返回false导致import paddle报错的bug,jetson是arm64 cpu,在jetson tx2上也验证了可以正常编译和import。