硬件仿真模式下编译CUDA SDK示例

发布于 2024-11-18 20:00:33 字数 1067 浏览 1 评论 0原文

我正在尝试通过仿真模式在没有支持 CUDA 的 GPU 的 PC 上进行一些 CUDA 开发。操作系统是Linux Mint Debian(可以考虑用于所有实际目的的Debian测试)32位(2.6.32-5-686内核)。这是我到目前为止所做的:

echo "# CUDA stuff PATH=\$PATH:/usr/local/cuda/bin LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/local/cuda/lib 导出路径 export LD_LIBRARY_PATH" >> ~/.bashrc

  • 添加了 /etc/ld.so.conf.d/cuda.conf 的路径: /usr/local/cuda/lib

  • 执行“sudo ldconfig”

  • 重新启动会话

  • 然后将 SDK 安装在 /home/user 中/NVIDIA_GPU_Computing_SDK 文件夹

  • 当我到达 NVIDIA_GPU_Computing_SDK/C 并输入“make emu=1”来编译我得到的示例:

nvcc警告:选项“设备仿真”已被弃用并被忽略 /usr/bin/ld: 找不到 -lcudatemu /usr/bin/ld: 找不到 -lcudatemu Collect2: ld 返回 1 退出状态

似乎缺少库(rt = 运行时?)。包管理器中有 libcudart3,但需要一大堆 nvidia 的东西作为依赖项,包括驱动程序,而我在这台机器上什至没有 NVIDIA 卡。另外显然 GPU 模拟现在已被弃用...有人有 CUDA 模拟的经验吗?

I'm trying to do some CUDA development on a PC without CUDA-capable GPU via emulation mode. The OS is Linux Mint Debian (can be considered Debian testing for all practical purposes) 32bit (2.6.32-5-686 kernel). Here's what I did so far:

echo "# CUDA stuff
PATH=\$PATH:/usr/local/cuda/bin
LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/local/cuda/lib
export PATH
export LD_LIBRARY_PATH" >> ~/.bashrc

  • Added the path to /etc/ld.so.conf.d/cuda.conf:
    /usr/local/cuda/lib

  • Executed "sudo ldconfig"

  • Restarted the session

  • Then installed the SDK in /home/user/NVIDIA_GPU_Computing_SDK folder

  • When I got to NVIDIA_GPU_Computing_SDK/C and type "make emu=1" to compile the examples I get:

nvcc warning : option 'device-emulation' has been deprecated and is ignored
/usr/bin/ld: cannot find -lcudartemu
/usr/bin/ld: cannot find -lcudartemu
collect2: ld returned 1 exit status

Seems like a library missing (rt = runtime ?). There is libcudart3 in the package manager, but wants a whole bunch of nvidia stuff as a dependency, including drivers and I don't even have an NVIDIA card on this machine. Also apparently the GPU emulation is now deprecated... Does anybody have some experience with CUDA emulation?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

傻比既视感 2024-11-25 20:00:33

CUDA 中不再有模拟。它在 3.x 发布周期中已被弃用并删除。除了 CUDA 3.1 IIRC 之外,没有任何仿真支持。当然,在 CUDA 4.0 中你无能为力。

在 Linux 上,最好的选择是尝试 gpuocelot,它在 x86 处理器上提供 PTX 级别的模拟以及 CUDA API 的重新实现。

There is no emulation in CUDA any more. It was deprecated and removed during the 3.x release cycle. There is no emulation support beyond CUDA 3.1 IIRC. Certainly there is nothing you can do in CUDA 4.0.

On Linux, your best bet is to try gpuocelot, which provides a PTX level emulation on x86 processors and a reimplementation of the CUDA APIs.

痕至 2024-11-25 20:00:33

虽然我同意尝试 Ocelot 的建议,但当我在同一条船上时,我发现最简单的方法是在 eBay 上获取一张便宜的支持 CUDA 的卡用于测试(我想我支付了不到 40 美元)。如果您有能力打开硬件(我意识到这对某些人来说不是一个选择)并安装驱动程序,这就是我的建议。

Although I agree with the suggestion to try Ocelot, when I was in the same boat I found it easiest to go on eBay and get a cheap CUDA capable card to use for testing (I think I paid < $40). If you have the ability to open the hardware (I realize this isn't an option for some people) and to install drivers, that's what I'd suggest.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文