Historically, the GPU device code is compiled alongside the application with offline tools such as . In this case, the GPU device code is managed internally to the CUDA runtime. You can then launch kernels using and the CUDA runtime ensures that the invoked kernel is launched. However, in some cases, GPU device code needs to be dynamically compiled and loaded. This post shows a way to…
]]>Most CUDA developers are familiar with the API and its counterparts for loading a module containing device code into a CUDA context. In most cases, you want to load identical device code on all devices. This requires loading device code into each CUDA context explicitly. Moreover, libraries and frameworks that do not control context creation and destruction must keep track of them to explicitly…
]]>