GPU模拟器,用于CUDA编程,无需硬件 [英] GPU Emulator for CUDA programming without the hardware

查看:3747
本文介绍了GPU模拟器,用于CUDA编程,无需硬件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题:是否有一个Geforce卡的仿真器,它允许我在没有实际硬件的情况下对CUDA进行编程和测试?

Question: Is there an emulator for a Geforce card that would allow me to program and test CUDA without having the actual hardware?

信息:

我想加快几个模拟我的CUDA,但我的问题是,我不是总是在我的桌面做这个发展。我想在我的上网本做一些工作,但我的上网本没有GPU。现在据我所知,你需要一个CUDA能力的GPU来运行CUDA。有办法解决这个问题吗?看起来像是唯一的方法是一个GPU模拟器(显然会很痛苦,但会工作)。

I'm looking to speed up a few simulations of mine in CUDA, but my problem is that I'm not always around my desktop for doing this development. I would like to do some work on my netbook instead, but my netbook doesn't have a GPU. Now as far as I know, you need a CUDA capable GPU to run CUDA. Is there a way to get around this? It would seem like the only way is a GPU emulator (which obviously would be painfully slow, but would work). But whatever way there is to do this I would like to hear.

我在Ubuntu 10.04 LTS上编程。

I'm programming on Ubuntu 10.04 LTS.

推荐答案

对于在2016年寻求答案的人...






免责声明




  • 我无法模拟GPU。

  • 如果您满足其
    依赖关系列表,请使用 gpuocelot

  • For those who are seeking the answer in 2016 ...


    Disclaimer

    • I've failed to emulate GPU after all.
    • It might be possible to use gpuocelot if you satisfy its list of dependencies.
    • 我试图得到一个模拟器的BunsenLabs(Linux 3.16.0-4-686-pae#1 SMP
      Debian 3.16.7-ckt20-1 + deb8u4(2016-02-29)i686 GNU / Linux) 。

      I've tried to get an emulator for BunsenLabs (Linux 3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt20-1+deb8u4 (2016-02-29) i686 GNU/Linux).

      我会告诉你我学到了什么。

      I'll tell you what I've learnt.


      1. nvcc 用于在CUDA中返回 -deviceemu 工具包3.0



        我下载了CUDA Toolkit 3.0,安装并试图运行一个简单的
        程序:

      1. nvcc used to have a -deviceemu option back in CUDA Toolkit 3.0

        I downloaded CUDA Toolkit 3.0, installed it and tried to run a simple program:

      #include <stdio.h>
      
      __global__ void helloWorld() {
          printf("Hello world! I am %d (Warp %d) from %d.\n",
              threadIdx.x, threadIdx.x / warpSize, blockIdx.x);
      }
      
      int main() {
          int blocks, threads;
          scanf("%d%d", &blocks, &threads);
          helloWorld<<<blocks, threads>>>();
          cudaDeviceSynchronize();
          return 0;
      }
      

      注意,在CUDA工具包3.0 nvcc / usr / local / cuda / bin /

      Note that in CUDA Toolkit 3.0 nvcc was in the /usr/local/cuda/bin/.

      遇到编译困难:


      NOTE: device emulation mode is deprecated in this release
            and will be removed in a future release.
      
      /usr/include/i386-linux-gnu/bits/byteswap.h(47): error: identifier "__builtin_bswap32" is undefined
      
      /usr/include/i386-linux-gnu/bits/byteswap.h(111): error: identifier "__builtin_bswap64" is undefined
      
      /home/user/Downloads/helloworld.cu(12): error: identifier "cudaDeviceSynchronize" is undefined
      
      3 errors detected in the compilation of "/tmp/tmpxft_000011c2_00000000-4_helloworld.cpp1.ii".
      




      我在互联网上发现如果我使用 gcc-4.2 或类似的古代,而不是 gcc-4.9.2 错误可能会消失。我放弃了。

      I've found on the Internet that if I used gcc-4.2 or similarly ancient instead of gcc-4.9.2 the errors might disappear. I gave up.

      Stringer的回答链接到一个非常古老的 gpuocelot 项目网站。所以起初我以为这个项目在2012年左右被放弃了。

      The answer by Stringer has a link to a very old gpuocelot project website. So at first I thought that the project was abandoned in 2012 or so. Actually, it was abandoned few years later.

      以下是一些最新的网站:

      Here are some up to date websites:

      • GitHub;
      • Project's website;
      • Installation guide.

      我尝试在指南。我在安装期间有几个错误,但我放弃了。 gpuocelot 不再受支持,并且取决于一组非常特定的库和软件版本。

      I tried to install gpuocelot following the guide. I had several errors during installation though and I gave up again. gpuocelot is no longer supported and depends on a set of very specific versions of libraries and software.

      您可以尝试关注本教程从2015年7月,但我不保证它会工作。

      You might try to follow this tutorial from July, 2015 but I don't guarantee it'll work. I've not tested it.

      MCUDA翻译框架是一个基于linux的工具,旨在将
      有效地将CUDA编程模型编译为CPU体系结构。

      The MCUDA translation framework is a linux-based tool designed to effectively compile the CUDA programming model to a CPU architecture.

      这可能是有用的。这是指向网站的链接

      It might be useful. Here is a link to the website.

      这是一个在Windows 7和8上使用的模拟器。它似乎不再开发了(最后一次提交日期是2013年7月4日)。

      It is an emulator to use on Windows 7 and 8. I've not tried it though. It doesn't seem to be developed anymore (the last commit is dated on Jul 4, 2013).

      这是项目网站的链接:https://code.google.com/archive/p/cuda-waste/

      Here's the link to the project's website: https://code.google.com/archive/p/cuda-waste/

      这篇关于GPU模拟器,用于CUDA编程,无需硬件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆