c++ - 编译时未启用 intel-oneApi CUDA 支持

标签 c++ ubuntu ubuntu-20.04 intel-oneapi

我是 intel-oneapi 的新手,我关注了intel's instructions在 Ubuntu 20.04 上安装 oneApi。
我编译成功vector-add例子。不幸的是,在运行时我得到以下异常:

pi_die: CUDA support was not enabled at compilation time
terminate called without an active exception
Aborted (core dumped)
我需要特殊标志才能在 nvidia GPU 上运行它吗?当我切换 sycl::default_selectorsycl::cpu_selector然后代码毫无异常(exception)地执行。

最佳答案

如果您使用 DPC++ 以 Nvidia 硬件为目标,您当前需要使用此支持重新编译 DPC++。
执行此操作的说明在 the repository here 中。 .
完成后,您可以使用适当的设备选择器来选择 Nvidia GPU 来执行。

关于c++ - 编译时未启用 intel-oneApi CUDA 支持,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62923007/

相关文章:

c++ - 错误 1 ​​错误 C2679 : binary '<<' : no operator found which takes a right-hand operand of type 'rational' (or there is no acceptable conversion)

c++ - 使变量字符串忽略转义序列

c++ - 逐字输出模拟打字效果

c++ - Qt QTreeWidget 替代 IndexFromItem?

c - 由于 C 中内存不足导致的段错误

ansible-facts - Ansible 不报告 Ubuntu 20.04 上的分发信息?

ubuntu - 如何在针对 UBUNTU 运行的 ASP.NET Core 2.1 应用程序中设置 HTTPS 证书?

linux - 无法找到 mini-httpd 包?

kvm - XFCE 和 Ubuntu 20.04 的 x2go 问题

ubuntu-20.04 - 在目录的父目录中找不到平台源代码树