cuPrintf allows you to to add printf-equivalent cuPrintf calls to your CUDA C code.
The cuPrintf package includes two source files: cuPrintf.cuh and cuPrintf.cu. Drop these files into your source directory or your include path and start making calls to cuPrintf in your CUDA C code.
This sample code works on all CUDA-enabled GPUs but works significantly better on GPUs with SM arch 1.1 and later, so always build your code with “-arch=sm_11” or higher if possible.
The cuPrintf code works with CUDA 2.3 or newer, and is supported on all platforms on which the CUDA Toolkit is supported.
If you are not already a member of the GPU Computing Registered Developer program, apply here.
I’ve applied several times, and I was even a speaker at the NVIDIA Developer Conference, and I still haven’t gotten any notification about how or where to log in. Am I missing something?
I assume (?) this is different from the “normal” NVIDIA Developer Site, partners.nvidia.com (which I do have a login to). That site doesn’t seem to have any CUDA stuff.
Even though I have been working with GPU for approx 1 year now… I was not a developer… but I thought of giving it a try yesterday… but when I go and try to register the link just gives me an error
"ERROR: 503 on a blank white page "
Is the web link broken ? I want to use this CUPRINTF function… so any help would be really helpful…
I decided to give cuPrintf a try the other day and found a bug. After wasting my time raising a bug report, Nvidia quickly closed it off without checking because cuPrintf is an unsupported tool.
Synopsis: cuPrintf (source in cuprintf_2.3_5105025.zip from Nvidia Online Dev site) does not output after calling cudaPrintfDisplay more than once per session
Description: I found a bug in function cudaPrintfDisplay. If you only issue cudaPrintfInit() and cudaPrintfEnd() once per application session (as instructed by the notes) and attempt to use cudaPrintfDisplay multiple times, the first call to cudaPrintfDisplay will work fine, but all subsequent calls display nothing to the screen/stdout. The cudaPrintfDisplay function wasn’t getting the start of its circular queue correctly.
To fix, change line 797 in cuPrintf.cu
From:
cudaMemcpy(&magic, printfbuf_device, sizeof(unsigned short), cudaMemcpyDeviceToHost);
to:
cudaMemcpy(&magic, printfbuf_start, sizeof(unsigned short), cudaMemcpyDeviceToHost);