试图获得CUDA 7.5与GCC 5.x一起使用 [英] Trying to get CUDA 7.5 to work with GCC 5.x
问题描述
所以,如果你试图使用nvcc当系统GCC是版本5及以上,你会得到一个不支持的版本的错误。但是 - 我听说有人报告他们刚刚评论过这一点,CUDA 7.5为他们工作与GCC 5.x。
当我做同样,但是(检查是在 $ CUDA_DIR / host_config.h
),并编译的东西,我得到以下错误:
/usr/lib/gcc/x86_64-redhat-linux/5.3.1/include/mwaitxintrin.h(36):错误:标识符__builtin_ia32_monitorx未定义
/usr/lib/gcc/x86_64-redhat-linux/5.3.1/include/mwaitxintrin.h(42):错误:标识符__builtin_ia32_mwaitx未定义
和一堆其他人,但那些可能依赖于这些。现在,这些是与X86架构相关的MMX相关内在函数。我不直接使用它们,所以我猜他们选择了。也许这可以避免?
有没有办法克服这些错误,实际上让GCC 5与CUDA 7.5共存?
- 我已阅读过建议使用
-D__STRICT_ANSI __
。
$ b b
解决方案
试图让GCC 5.x与CUDA 7.5一起工作本质上是徒劳的 - 有一些(或许多?)不兼容的问题,你根本不能解决。相反,只是升级到CUDA 8.0,已经提出自这个问题。
So, if you try to use nvcc when the system GCC is version 5 and up, you get an "unsupported version" error. But - I've heard people report that they've just commented this out and that CUDA 7.5 "works for them" with GCC 5.x .
When I do the same, however (the check is in $CUDA_DIR/host_config.h
), and compile something, I get the following errors:
/usr/lib/gcc/x86_64-redhat-linux/5.3.1/include/mwaitxintrin.h(36): error: identifier "__builtin_ia32_monitorx" is undefined
/usr/lib/gcc/x86_64-redhat-linux/5.3.1/include/mwaitxintrin.h(42): error: identifier "__builtin_ia32_mwaitx" is undefined
and a bunch of others, but those may be dependent on these. Now, these are MMX-related intrinsics for X86 architectures. I don't use them directly, so I'm guessing they're opted-in somehow. Perhaps this can be avoided?
Is there a way to overcome these errors and actually get GCC 5 to coexist with CUDA 7.5? And for code to build and run?
Notes:
- I've read a suggestion to use
-D__STRICT_ANSI__
. I have, and it doesn't seem to help. - I'm on Fedora 22 in case it matters.
It's essentially futile to try to get GCC 5.x to work with CUDA 7.5 - there are some (or many?) incompatiblity issues which you simply can't resolve. Instead, just upgrade to CUDA 8.0 which has become available since this question was asked.
这篇关于试图获得CUDA 7.5与GCC 5.x一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!