nV News Forums

 
 

nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   Software Development (http://www.nvnews.net/vbulletin/forumdisplay.php?f=53)
-   -   Anybody into CUDA ? (http://www.nvnews.net/vbulletin/showthread.php?t=118850)

walterman 09-02-08 04:49 PM

Anybody into CUDA ?
 
I just installed the SDK & Toolkit, and i'm reading the documentation.

The first step is always the hardest -> Build & compile the first project :)

I'm checking the SDK\Projects samples. In special, there is one called 'cppIntegration'.

I can compile & run all the projects, but, i still dunno how to create a project from zero in Visual Studio.

I think that everybody would like to use standard C++ code, and a call to a CUDA function, to do the hard work.

If somebody has tried these first steps, please, share your knowledge with us :)

hemmy 11-28-08 10:31 AM

Re: Anybody into CUDA ?
 
I got to about where you are, and just kinda gave up

Indeed it would be easy if we could write it in c/c++ :(

ViN86 11-29-08 05:51 PM

Re: Anybody into CUDA ?
 
im pretty sure you need to add a reference to some DLL or something but i cant figure it out either.

the software seems very powerful but damn is it hard to get going :lol:

walterman 11-30-08 12:53 PM

Re: Anybody into CUDA ?
 
I'm waiting for the CUDA 2.1 release. I heard that it will support VS 2008, and it is what i'm using now. I need this version, cause i use SSE4 assembler ops in my code. I did some tests with VS 2005, but, i was not able to compare my C++ code with the CUDA code, due the missing SSE4 ops.

nekrosoft13 12-01-08 07:37 AM

Re: Anybody into CUDA ?
 
planning to implement it in your BloodRayne 2 patch?

jcrox 12-01-08 08:04 AM

Re: Anybody into CUDA ?
 
Quote:

Originally Posted by ViN86 (Post 1858985)

the software seems very powerful but damn is it hard to get going :lol:

My Java instructor who does some sort of research with GPGPUs said the same exact thing about CUDA, it can be a real pain to get it up and running but once you figure it out its apparently some pretty cool stuff.

If anyone does get it up and running please, do tell how you did so... I really want to try it out soon

walterman 12-01-08 11:11 AM

Re: Anybody into CUDA ?
 
Quote:

Originally Posted by nekrosoft13 (Post 1860168)
planning to implement it in your BloodRayne 2 patch?

In the benchmark part only.

In the game, i see 2 problems:

1) I dunno if Direct3D 8 will work with CUDA.
2) The game is bounded by the gfx card power (& i do not like to lose frame rate).

Quote:

Originally Posted by jcrox
If anyone does get it up and running please, do tell how you did so... I really want to try it out soon

Once you install VS 2005 & the CUDA SDK, check the 'nvidia cuda sdk\projects\template' folder. It's the most simple project. It works in VS 2005.

My problem is that i already have a full working solution, and i want to add CUDA support to it, and it's a VS 2008 project.

Bad Sector 01-13-09 05:38 PM

Re: Anybody into CUDA ?
 
I played with CUDA and wrote a bit about it. Its a very interesting technology and once i find some more time i plan to play more with it :-)

ViN86 01-13-09 05:51 PM

Re: Anybody into CUDA ?
 
i am going to be working with PDE solvers here in grad school, so i may give CUDA a try when i start working on the project.

Tuork 01-15-09 04:07 PM

Re: Anybody into CUDA ?
 
Does anyone know any simple guides to get started with CUDA?

CUDA is part of my "want to learn" list for 2009.
:)

Bman212121 01-18-09 10:39 PM

Re: Anybody into CUDA ?
 
Quote:

Originally Posted by Some random bot
i m not familiar with CUDA but i want to know some how about it still i think you might have to change your plat forum may be it will work.wish you good luck

Until then you might want to work on your grammar. :lol:

walterman 02-19-09 12:54 PM

Re: Anybody into CUDA ?
 
Finally, i have the whole thing working: VS 2008 + CUDA 2.1.

The setup to create a new project, by hand, is not very easy, and i lost a lot of time trying to compile my first program with success.

This is a quick guide, from my personal experiences:
  • Download & Install CUDA 2.1 & the CUDA SDK, from the nVidia site.

  • Open VS 2008, and start a new C++ Win32 Console project.

  • Right click in the name of the project in the solution explorer, and select 'Custom Build Rules'. A new window will open. Click on 'import' and select the file "C:\CUDA SDK\common\CUDA.rules". Then mark the checkbox for the CUDA files.

  • Rename the main .cpp file to .cu

  • Right click on the .cu file and select 'properties'. Select 'CUDA Build Rule 2.1.0' in General - Tool.

  • Open the properties of the project, and change:


    C++
    General

    • Additional include directories: $(CUDA_INC_PATH);$(NVSDKCUDA_ROOT)\common\inc
    • Debug Information Format: Program Database (/Zi)

    Code Generation

    • Runtime Library: Multi-threaded Debug (/MTd)

    Linker
    General

    • Enable incremental linkin: No (/INCREMENTAL:NO)
    • Additional Library Directories: $(CUDA_LIB_PATH);$(NVSDKCUDA_ROOT)\common\lib

    Input

    • Additional Dependencies: cudart.lib cutil32D.lib

    Optimization

    • Enable COMDAT folding: Do Not Remove Redundant COMDATs (/OPT:NOICF)

Then, edit your .cu file, and put your kernel there.

I tried my perlin code on the GPU, and, atm, it sucks. It's slightly faster than my multi-threaded SSE3 code, and this gfx card has 240 'cores', vs my quad. Obviously, i need to learn some CUDA tricks to speed up my code, because this cannot be so slow.

Also, i still dunno how to debug the CUDA code. It's a pain in the ass atm when something does not work.


All times are GMT -5. The time now is 01:14 PM.

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.