Cuda dll

Hi, I’m writing a little library that is supposed to work as a simple wrapper around some CUDA functions I use often, but I’m not sure if my idea of the final library is viable:

  • CUDA project DLL
  • Client project is a regular C++ console app
  • The user can define their own .cu files, which will be compiled correctly

I’m not sure if this is viable, so one of my secondary ideas is just writing a header only library, where the user just copies over the source files, and uses their own CUDA VS project.

Thanks in advance.

That sounds like a typical use-case for NVRTC. You can find documentation on NVRTC as well as sample codes, as well as many questions about it on various forums.

You can also find with a bit of searching, writeups on how to build a CUDA DLL on windows. here is an example. There are others.

1 Like

perfect, I think NVRTC was what I was looking for. Thanks

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.