Combining CUDA runtime static and dynamic libraries?

Hi all,

I hope I chose the correct forum, if not, feel free to relocate / redirect me …

I am on Windows and I am consuming some third party dlls compiled with --cudart shared, so cudart*.dll must accompany the third party dll to work. Now, in the process in which I use these dlls I plan to use CUDA as well, can I dare to use the default --cudart static? With other words, is combining dynamic and static CUDA runtime libraries in one process safe or not?



Ok, even my second question remained without any comments or help, but I have come to a conclusion now, so sharing it here.

Short answer to my question: don’t do it. While it initially seemed to work ok, some weird and random memory corruption problems were happening which went away when using either --cudart shared or --cudart static for all libraries in one process and avoiding any combination of both modes.