Windows Kernel Programming using CUDA

Is it possible to write Windows kernel codes in conjunction with CUDA?

I would like to integrate some CUDA codes when developing some device drive in Windows.

If yes? How?

Thanks in advance.

:-(, no one replies

AFAIK currently it is not possible to use CUDA from Ring0 (at least if you don’t reverse engineer cuda.dll).

You could probably handle it by going through user space, the driver sends data to a user space service, this service uses CUDA to do the calculation work, then sends (or maps) the results back to the driver.
Heavy computation work shouldn’t be done in-kernel anyway.

I need to process data and feed them into another driver. As far as I know, switching between user mode and kernel mode is expensive.

Your proposal is similar to our current idea of implementation.

Thanks

I’m already using the method wumpus suggested. Move data to user-mode application, run a series of CUDA kernels and move data back to the driver.

Anyway, it’s a lot safer to run kernels in user mode. In terms of system reliability.