gcc 7.2和nvptx nvidia gpu卸载
自gcc版本7.1以来,gcc支持将openmp代码卸载到nvidia卡,但我无法使用它。我在Ubuntu17.10上,安装了gcc 7.2和nvptx nvidia gpu卸载,gcc,openmp,nvidia,offloading,Gcc,Openmp,Nvidia,Offloading,自gcc版本7.1以来,gcc支持将openmp代码卸载到nvidia卡,但我无法使用它。我在Ubuntu17.10上,安装了nvptx工具和gcc卸载nvptx软件包。当我试图编译openmp目标代码时,我得到了这个错误 ptxas /tmp/ccqGsx2p.o, line 383; error : State space mismatch between instruction and address in instruction 'ld' ptxas /tmp/ccqGsx2p.o,
nvptx工具
和gcc卸载nvptx
软件包。当我试图编译openmp目标代码时,我得到了这个错误
ptxas /tmp/ccqGsx2p.o, line 383; error : State space mismatch between instruction and address in instruction 'ld'
ptxas /tmp/ccqGsx2p.o, line 456; error : State space mismatch between instruction and address in instruction 'ld'
ptxas /tmp/ccqGsx2p.o, line 383; error : Unknown symbol '__stack_chk_guard'
ptxas /tmp/ccqGsx2p.o, line 383; fatal : Label expected for forward reference of '__stack_chk_guard'
ptxas fatal : Ptx assembly aborted due to errors
nvptx-as: ptxas returned 255 exit status
mkoffload: fatal error: x86_64-linux-gnu-accel-nvptx-none-gcc-7 returned 1 exit status
compilation terminated.
lto-wrapper: fatal error: /usr/lib/gcc/x86_64-linux-gnu/7//accel/nvptx-none/mkoffload returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
我找不到任何解决方案,gcc中支持nvptx的openmp几乎没有文档可能是gcc中的一个错误:你的编译字符串是什么(例如
g++-fopenmp main.cpp
)?@Richard我现在不记得了(已经有一段时间了)但它确实包含了一个-nvptx
标志以及-fopenmp
这个问题(\uuuu stack\u chk\u guard
)在GCC 7.2中也出现了。g++-O3-Wall foo.cpp-fopenmp-foffload=nvptxnone-fno堆栈保护器
。