zl程序教程

您现在的位置是:首页 >  系统

当前栏目

报错:/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(11269): error: argument of type "void *" is incompatible with parameter of type "long long *"

Linux 报错 Error of is with quot type
2023-09-27 14:23:43 时间

报错:/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(11269): error: argument of type "void *" is incompatible with parameter of type "long long *"

环境:cuda9.0,python3.6,pytorch1.0,gcc5.5

服务器的环境,所以不能随意升级

报错原因在这里有讨论:

Apparently, there's a GCC bug involved:

[Bug 76731 - AVX512] _mm512_i32gather_epi32 and other scatter/gather routines have incorrect signature

It seems like GCC 5.5 shipped with some avx512?intrin.h headers that switched to using void* and const void*, but without switching the builtins to do the same. This was resolved in a post-release version of GCC 5. About GCC 6.x - I'm not sure.

A way to get around this is discussed on this forum thread: Downloading the patched headers from the GNU servers.

Shell script for use with GCC 5 (on a Linux system):

for f in avx512fintrin.h avx512pfintrin.h avx512vlintrin.h; do
  curl -H "User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36" -o $f "https://gcc.gnu.org/viewcvs/gcc/branches/gcc-5-branch/gcc/config/i386/${f}?view=co&revision=245536&content-type=text%2Fplain&pathrev=245536"
done && mv avx512*intrin.h  /usr/lib/gcc/x86_64-linux-gnu/5/include/

Actually, the files might be identical for all 3 versions, but I haven't checked.

Note: If you're wondering why the user-agent string - it's to avoid the server from turning away clients it doesn't like with a "Forbidden" response. Of course it doesn't have to be this specific UA string.

亲测,执行一下上面的脚本,也就是把那几个头文件拷贝过去,问题就解决了

当然,如果是自用环境,可以直接升级gcc试一试