CUDA/OpenCL acceleration in asp.net core application

1.8k views Asked by At

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.

0

There are 0 answers