NVIDIA 计算设备不受 OpenCL 版本支持
此错误发生在 Zivid SDK 的 OpenCL 版本安装在配有 NVIDIA GPU 的机器上时。请改为安装 CUDA 版本,或在 Config.yml 文件中明确允许不受支持的计算设备。
问题
Zivid Studio 或使用 Zivid SDK 的应用程序在初始化时失败,并出现以下错误:
错误
An error occurred: Error occurred during initialization: Nvidia compute devices are not supported by the OpenCL version of the Zivid SDK on platform 'windows'.
To use an Nvidia compute device, install the CUDA version of the Zivid SDK.
You can enable this compute device by setting the Config.yml option 'ComputeDevice/AllowUnsupported' to 'yes'.
Note that your compute device is untested by Zivid, and can cause issues such as incorrect results or crashes.
Zivid recommends to only use supported compute devices for production.
For more information, see the knowledge base article https://support.zivid.com/en/latest/getting-started/software-installation/about-gpu.html#selecting-compute-device.
The following compute devices were found on your system: ...
To choose a different compute device than the one selected by the Zivid SDK, set the Config.yml option 'ComputeDevice/SelectionFilter'.
原因
Zivid SDK 的 OpenCL 版本将 NVIDIA GPU 视为 不受支持的计算设备。当 SDK 的 OpenCL 版本安装在配有 NVIDIA GPU 的机器上时,这是预期的行为。
解决方案
推荐做法:安装 CUDA 版本
卸载 SDK 的 OpenCL 版本,改为安装 CUDA 版本,该版本无需额外配置即可支持 NVIDIA GPU。安装说明请参阅 软件安装。
备选方案:允许不受支持的计算设备
如果您希望继续在 NVIDIA GPU 上使用 SDK 的 OpenCL 版本,请下载 Config.yml 文件并将其放置在以下目录中:
Windows
mkdir %LOCALAPPDATA%\Zivid\API
move %HOMEPATH%\Downloads\Config.yml %LOCALAPPDATA%\Zivid\API\
Ubuntu
mkdir --parents "${XDG_CONFIG_HOME-$HOME/.config}"/Zivid/API
mv ~/Downloads/Config.yml "${XDG_CONFIG_HOME-$HOME/.config}"/Zivid/API/
该配置文件将 Vendor 设置为 Nvidia,将 AllowUnsupported 设置为 yes:
__version__:
serializer: 1
data: 19
Configuration:
ComputeDevice:
Type: GPU
Vendor: Nvidia
AllowUnsupported: yes