8

I realise there are several questions on this subject but I believe my angle is unique.

I have a mature C# app that I use for scientific number crunching. In the code I start 24 C# threads on my 24 HyperThread (i.e. I have 2 CPUs each with 6 cores/ 12 threads) workstation. I run Windows 7 and it handles it brilliantly - I am able to use my full processing power to get my work done.

I see that some GPUs advertise "448 cores". If I bought one of these would my c# app be able to utilise them? I mean without rewriting my code in any major way. Would the threads I start get taken up by the GPU cores instead of the CPU HyperThreads as is the case now?

FOLLOW ON QUESTION

Hi, I appreciate the answers I am getting - even if negative.

Is there any other hardware I should be thinking about (not too expensive) that would give me a large number of Cores, but would be able to run my c# code without a rewrite?

ManInMoon
  • 6,795
  • 15
  • 70
  • 133
  • possible duplicate of [Run C# code on GPU](http://stackoverflow.com/questions/4119876/run-c-sharp-code-on-gpu) – Olivier Jacot-Descombes Jan 24 '12 at 17:07
  • Btw., 448 cores is low end. Get adecent higher end card and you talk of thousands. abnd the possibility to lead 8-10 of those GPU's into a machine with the right board. 2 per card, 3-4 cards are doable without problems. – TomTom Jan 24 '12 at 17:08
  • All the answers are disappointing "no"s, but there is a bright side. The stuff they link to is very interesting. – Jon Hanna Jan 24 '12 at 17:14

3 Answers3

3

You'd need to rewrite your code really to make use of a gpu. These links might be useful:-

CUDA .NET - CUDA functionality through .NET apps.

CUDA Sharp - C# wrapper for nVidia Toolkit

These are based on the nVidia CUDA system so you'd need an nVidia card for this of course.

Davos555
  • 1,974
  • 15
  • 23
2

Heh... no. No way no how. Those "cores" aren't the same. To take advantage of any GPU computing, you need to write your computations in a very specific way. Try OpenCL maybe. But the answer to your question is no.


As for your edit, the only possible thing with few changes (depending on how you've currently structured it) is a processor. If you're not making general software, you could probably run 48 non-HT individual cores. Maybe that's not the bottleneck, though. You could increase your RAM to make everything generally faster to a certain point.

Ry-
  • 218,210
  • 55
  • 464
  • 476
  • Why do you mention 48 cores specifically? Is that some limit of cores for Windows? This is not general software - just for me. Also I could add as much RAM as I could afford. Is there some way to get a larger number of cores as you suggest? I am searching around for a way to get hundrds of cores really – ManInMoon Jan 25 '12 at 05:31
  • @ManInMoon: 48 cores specifically because I heard someone did it once. I don't know about limits. Have you considered distributed computing instead? ... what exactly *are* you computing? – Ry- Jan 25 '12 at 14:57
1

No. .Net threads will not automatically take advantage of GPU cores for processing. They are very different from normal processor cores. You would need to alter your program to take advantage of GPU processing.

JaredPar
  • 733,204
  • 149
  • 1,241
  • 1,454