gpt4 book ai didi

linux - 为什么 CUDA 6.5 示例不适用于 CUDA 5.5?

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:15:20 24 4
gpt4 key购买 nike

我的 CUDA 版本是 5.5,nvcc 的输出证明了这一点这是:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2013 NVIDIA Corporation
Built on Wed_Jul_17_18:36:13_PDT_2013
Cuda compilation tools, release 5.5, V5.5.0

我还没有使用 6.5,因为我的 NVIDIA 驱动程序是 331.113(这是我安装所有内容的 Kubuntu 14.04 repo 版本)。

我得到了 6.5 个示例,例如,如果我制作 2_graphics/Mandelbrot例如,没有编译错误,但是当我运行它时,我得到了

[CUDA Mandelbrot/Julia Set] - Starting...
CUDA error at ../../common/inc/helper_cuda.h:1032 code=35(cudaErrorInsufficientDriver) "cudaGetDeviceCount(&device_count)"

现在,如果我进入 examples/5.5/2_graphics/Mandelbrot目录和 make代码,当我运行它时一切正常。

当我收到 cudaErrorInsufficientDriver 时发生了什么错误,这两者有什么区别Mandelbrot会导致此错误但不会导致编译错误的软件包?

最佳答案

您运行的应用程序:2_graphics/Mandelbrot 显然是使用 CUDA 6.5 工具 编译的,即 nvcc,最重要的是它已链接针对 CUDA 6.5 运行时库 (cudart)。

此库将在初始化时检查当前安装的驱动程序版本。如果它不是 CUDA 6.5 的足够驱动程序,它将在 CUDA API 调用时返回错误。

如果您安装了 CUDA 5.5,并且仅使用 CUDA 5.5 工具和库构建了 2_graphics/Mandelbrot 示例代码(即使示例代码本身来自CUDA 6.5 发行版)很可能会正常工作。

关于linux - 为什么 CUDA 6.5 示例不适用于 CUDA 5.5?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31092550/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com