You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the cudaLaunchKernel()'d kernel includes a call to printf(), it will print on the server. This is correct behavior as far as CUDA is concerned but makes using SCUDA a bit surprising since the client won't get an output the user is expecting.
The way that CUDA handles printf() today amounts to a special vprintf() function that CUDA hooks into and then it prints to a buffer on device, which is then output to stdout by libcuda. To get this working with SCUDA, we should try hijacking the PTX sent to cudaLaunchKernel() and intercept vprintf() with our own handler that does the same thing. Then, once the kernel run is complete, ship this buffer from the server to the client for printing.
If the
cudaLaunchKernel()
'd kernel includes a call toprintf()
, it will print on the server. This is correct behavior as far as CUDA is concerned but makes using SCUDA a bit surprising since the client won't get an output the user is expecting.The way that CUDA handles
printf()
today amounts to a specialvprintf()
function that CUDA hooks into and then it prints to a buffer on device, which is then output to stdout by libcuda. To get this working with SCUDA, we should try hijacking the PTX sent tocudaLaunchKernel()
and interceptvprintf()
with our own handler that does the same thing. Then, once the kernel run is complete, ship this buffer from the server to the client for printing.To observe the difference today, run https://github.com/NVIDIA/cuda-samples/tree/master/Samples/0_Introduction/simplePrintf with and without SCUDA.
The text was updated successfully, but these errors were encountered: