[英]Do I have to build gcc-10 from source on Ubuntu 18.04 to have OpenMP GPU target offload?
When I use gcc-10 (and 9, 8, 7) from default repositories on Ubuntu 18.04, omp_get_num_devices()
returns 0
, even though I have:当我在 Ubuntu 18.04 上的默认存储库中使用 gcc-10(和
omp_get_num_devices()
时, omp_get_num_devices()
返回0
,即使我有:
paul@desktop:~$ nvidia-smi
...
| NVIDIA-SMI 450.80.02 Driver Version: 450.80.02 CUDA Version: 11.0 |
Do I need a special version of gcc to get target offload capability?我是否需要特殊版本的 gcc 才能获得目标卸载功能? A special build process for my project?
我的项目的特殊构建过程?
What was missing is nvptx-tools .缺少的是nvptx-tools 。 I installed them with:
我安装了它们:
sudo apt install nvptx-tools libgomp-plugin-nvptx1 gcc-10-offload-nvptx
and omp_get_num_devices()
returns 1
now. omp_get_num_devices()
现在返回1
。 Unfortunately, there is still something missing preventing code with offload directives from linking.不幸的是,仍然缺少一些东西来阻止带有卸载指令的代码链接。
Bear in mind that gcc-10 is not officially supported in Ubuntu 18.04, so testing repositories have to be used请记住,Ubuntu 18.04 不正式支持 gcc-10,因此必须使用测试存储库
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.