本文介绍了NVIDIA GeForce GTX 560 Ti是否适合C ++ AMP?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


几个月前,我使用搜索文件夹中的dxdiag检索了我的计算机系统信息.


Couple of months ago, I used the dxdiag in the search folder to retrieve my computer system information.

基于检索到的信息,我检查了DirectX版本和驱动程序模型以查看
查看我的计算机是否可以使用C ++ AMP.看起来有可能.

Based on the retrieved information I checked for DirectX Version and Driver Model to see
to see if C++ AMP is possible with my computer. Look like it is possible.

在学习了如何对C ++ AMP进行编程之后,我设法创建了一个项目来处理GPU中的计算.

After learning how to program C++ AMP and I managed to create a project to handle computations in GPU.

我遵循所有C ++ AMP规则,例如确保在CPU和GPU之间传输数据时使用大数据,否则会浪费时间.传输的数据大小范围可以在25,000到200,000个样本之间的任何位置.数据 使用的类型是< double>

I followed all the C++ AMP rules, such as make sure that I use large data when transferring data between CPU and GPU otherwise its a waste of time. The range of data size being transferred can be anywhere betweeen 25,000 to 200,000 of samples. Data type used is <double>

每执行一次p_f_e之后,我还要确保使用sync()将数据传输回CPU.我还确保没有多个GPU线程会尝试写入相同的内存位置.每个GPU线程都不需要依赖其他GPU线程. GPU线程可处理任何类型的数据.每个线程彼此独立.在执行p_f_e之前,我的CPU将为每个GPU线程提供任何必要的数据信息.

Also after every p_f_e execution I made sure to use synchronization() to have data transferred back to CPU. I also made sure that NO multiple GPU threads will try to write to the same memory location. Each GPU thread will not need to rely on other GPU thread for any kind of data. Every thread is independent from each other. My CPU will provide any necessary data information to each GPU thread before the p_f_e execution.

我有两个项目.一个项目仅使用CPU(100%).
我创建的第二个项目使用CPU/GPU.对于第二个项目,大约85%的计算是在GPU中完成的.

I have two projects. One project uses CPU (100%) only.
The second project that I created uses CPU/GPU. For the second project, about 85% of computations is done in GPU.

项目完成后,我将测试并与仅在CPU中运行的项目进行比较.结果是,使用CPU/GPU的项目比仅使用CPU的项目要慢得多.现在这对我来说没有任何意义,因为我在做乘法 GPU中的并行计算,这应该可以显着提高项目的执行速度.

Once the project was finished, I tested and compared to the project that runs in CPU only. The outcome was that the project using CPU/GPU was significantly slower than the project using CPU only. Now that didn't make any sense to me because I am doing multipe parallel computations in GPU which should significantly make the project go faster.

经过数次尝试发现问题的努力,您是否认为我的NVIDIA GeForce GTX 560 Ti不适合C ++ AMP(以获得最佳计算速度性能)?

After several efforts of trying to find the problem, do you think its possible that my NVIDIA GeForce GTX 560 Ti it's not suitable for C++ AMP (to get best computation speed perfomance)?

假设我遵循了C ++ AMP的所有规则(我确信我已经做到了,否则我将不会获得与完全在CPU中完成的项目相同的结果),您是否还有其他想法可能会导致这种情况GPU项目进展缓慢 比CPU项目?

Supposing that I followed all the rules of C++ AMP (which I am sure I did, otherwise I would not have gotten the same results as with project done entirely in CPU) do you have any other ideas of what else might cause this GPU project to go slower than CPU project?

See my accelerator properties during the project run: ===================================================== Accelerators and their properties. Description: NVIDIA GeForce GTX 560 Ti Device path = PCI\VEN_10DE&DEV_1082&SUBSYS_087310DE&REV_A1\4&2E917B5E&0&0018 Version = 11.0 Dedicated memory = 1278400 KB Supports double precision = false Limited double precision = true Has display = true Is emulated = false Is debug = true Description: Software Adapter Device path = direct3d\ref Version = 11.0 Dedicated memory = 0 KB Supports double precision = false Limited double precision = true Has display = true Is emulated = true Is debug = true Description: CPU accelerator Device path = cpu Version = 0.1 Dedicated memory = 4145364 KB Supports double precision = false Limited double precision = false Has display = false Is emulated = true Is debug = false Accelerator for the process: NVIDIA GeForce GTX 560 Ti Found accelerator: TRUE Default view: NVIDIA GeForce GTX 560 Ti !! Notice that during the project run at the beginning, it chooses

NVIDIA GeForce GTX 560 Ti作为默认加速器视图.

NVIDIA GeForce GTX 560 Ti as the default accelerator view.

See my dxdiag information:
=============================

   Operating System: Windows 7 Professional 64-bit

System Manufacturer: Alienware
       System Model: Aurora-R4

          Processor: Intel(R) Core(TM) i7-3820 CPU @ 3.60GHz (8 CPUs), ~3.6GHz
             Memory: 8192MB RAM
Available OS Memory: 8144MB RAM
          Page File: 2543MB used, 13743MB available
        Windows Dir: C:\Windows
    DirectX Version: DirectX 11
DX Setup Parameters: Not found
   User DPI Setting: Using System DPI
 System DPI Setting: 96 DPI (100 percent)
    DWM DPI Scaling: Disabled
     DxDiag Version: 6.01.7601.17514 32bit Unicode

--------------------
DirectX Debug Levels
--------------------
Direct3D:    0/4 (retail)
DirectDraw:  0/4 (retail)
DirectInput: 0/5 (retail)
DirectMusic: 0/5 (retail)
DirectPlay:  0/9 (retail)
DirectSound: 0/5 (retail)
DirectShow:  0/6 (retail)

---------------
Display Devices
---------------
          Card name: NVIDIA GeForce GTX 560 Ti
       Manufacturer: NVIDIA
          Chip type: GeForce GTX 560 Ti
           DAC type: Integrated RAMDAC

     Display Memory: 4064 MB
   Dedicated Memory: 1248 MB
      Shared Memory: 2815 MB
       Current Mode: 1920 x 1080 (32 bit) (60Hz)
       Monitor Name: Dell ST2220L(Analog)
      Monitor Model: DELL ST2220L
         Monitor Id: DELA063
        Native Mode: 1920 x 1080(p) (60.000Hz)
        Output Type: HD15
        Driver Name: nvd3dumx.dll,nvwgf2umx.dll,nvwgf2umx.dll,nvd3dum,nvwgf2um,nvwgf2um
Driver File Version: 8.17.0012.8576 (English)
     Driver Version: 8.17.12.8576
        DDI Version: 11
       Driver Model: WDDM 1.1
  Driver Attributes: Final Retail
   Driver Date/Size: 11/3/2011 23:26:00, 15694656 bytes
        WHQL Logo'd: n/a
    WHQL Date Stamp: n/a

推荐答案

GTX 560 Ti应该与C ++ AMP一起使用.我们已对该卡进行了测试,未发现该卡的任何特定问题.为了帮助您调查性能问题,如果您可以共享一些代码段,会更容易.没有代码,我可以做一些事情 想到的是:
(1)您的驱动程序很旧,请从NVidia下载最新版本;

GTX 560 Ti should work with C++ AMP. We have this card tested, didn't find any problems specific to this card. In order to help you investigate your performance issue, it would be easier if you could share some code snippet. Without code, some things I can thinks of are:
(1) Your driver is pretty old, please download latest from NVidia;

(2)您用来构建应用程序的编译配置是什么?是调试还是发布?

(2) What compilation configuration you used to build your application? Is it debug or release?

(3)如果您的内核没有足够的计算量,则由于较大的复制开销,GPU可能会变慢.另外,请尝试合并您的内存访问.不良的内存访问模式可能会导致GPU显着下降.

(3) If your kernel doesn't have enough computation, it's possible that GPU is slower due to big copy overhead. Also, try to make your memory access coalesced. Poor memory access patterns could lead to significant slowdown on GPU.

谢谢,
玲莉

Thanks,
Lingli


这篇关于NVIDIA GeForce GTX 560 Ti是否适合C ++ AMP?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-23 22:04