0

I've developed an asp.net core 1.1 application that does some pretty intensive data processing. I'd like to:

  1. GPU-accelerate the data processing (preferably opencl over cuda because my development laptop doesn't have an nvidia gpu but that's not a show stopper)
  2. Off-load the data processing to another server so the web server doesn't get bogged down crunching data.
  3. Stick with C# language and avoid C++/C if at all possible.
  4. Run everything on linux boxes/VMs

All the data required to perform the analysis is stored in a PostgreSQL database (I use npgsql to access it) but the results of the computation are kept in memory. The application outputs dynamically created tiles that get added as a Bing map layer so if I do #2 (off-load data processing) it would also need to handle web requests for tiles because I want that part to be GPU accelerated as well.

Is there a recommended direction for accomplishing this? I looked at Cudafy.Net, but it's not compatible with .Net Core 1.1 (or 1.0 from what I can tell as well). So I think asp.net on linux using Mono might be the best course of action? I really don't know.. I'm just a hack of a programmer.

Update:

Item 1 and 3 is possible. Create an ASP.NET Core Web Application targeting .NET Framework and add Cudafy.NET via NuGet. Install your CUDA/OpenCL driver of choice.

First half of 4 is possible as I successfully ran an OpenCL test on a Ubuntu VM using the AMD APP SDK 3.0. However, the latter half is problematic as it appears very difficult to access the GPU from a VM (need PCI-Passthrough). The AMD driver uses the CPU when there is no GPU available so at least I had CPU-acceleration. I guess I would be better off not trying to virtualize the GPU-accelerated app when I figure out how to do Item 2.

madgrizzle
  • 21
  • 6
  • have you tried downloading the Cudafy source code and converting to .Net Core? Not a small task I know. – mcmillab Mar 15 '17 at 05:51
  • I briefly contemplated that but then came back to earth once I realized that it was really well outside my capabilities.. I stuck with Mono as it works. However, I did switch over to managedCuda since it turns out that I'm fairly comfortable writing in C and it wasn't very hard to incorporate it into the C# project. The managedCuda wiki gave a good example of how to do it. It also gave me access to Cuda 8 and eliminated a lot of issues I had with trying to run a version of Cuda compatible with Cudafy. It all sort of just worked without any problems. – madgrizzle Apr 04 '17 at 12:10
  • Cudafy works with Mono, and it runs OpenCL too – mcmillab Apr 05 '17 at 20:18

0 Answers0