3

Do the parallel-for in .net 4.0 takes privilege of GPU computing automatically? Or I have to configure with some drivers so that it uses GPU.

Gulshan
  • 2,973
  • 5
  • 31
  • 44

3 Answers3

5

No, PFX doesn't do that for you. Take a look at Microsoft Accelerator to run some code on a GPU. I recommend in particular Tomas Petricek's series of articles on F# and Accelerator.

Also watch the gpu branch of LinqOptimizer.

Mauricio Scheffer
  • 96,120
  • 20
  • 187
  • 273
1

If you want to take advantage of GPU parallelism for .NET, try the open soure Brahma library, noting that in its current incarnation is .NET 3.5. It's LINQ-able, just not 4.0 parallel LINQ-able.

Tim Trout
  • 1,052
  • 13
  • 20
  • I updated the link to go to the SourceForge host page. The project appears to be pretty dormant, though. – Tim Trout Jun 15 '15 at 17:40
0

Parallel.For does not use the GPU in your graphics card. It uses threads, multiple cores and hyperthreading to achieve its goals. There are no drivers available that will allow Parallel.For to make use of the GPU.

The only technology that I know of that allows you to parallelize work in the GPU (other than graphical processing work) is CUDA.

Robert Harvey
  • 168,684
  • 43
  • 314
  • 475