cuPrintf released to registered developers

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.

Where is the link to download? Thanks.

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.

I also had problems with the application coming through. I would pm one of the active nvidia people on the cuda forums to see if they can help.

Must’ve been someone listening, because within hours of my posting here I got my app approved. Thanks, whoever you were! :-)

Sound is good, especially in debuging case, I can observe some variables easily without wait until kernel finishes.

However, I would like to understand the mechanism of cuPrintf(). Does it copies datas from global memory back to host memory and displays it?

Moreover, if cuPrintf() was released I also need cuScanf() as well. :rolleyes:

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…

Thanks…

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);

Could anybody give a link to download cuprintf?

Thanks very much

You did it!!!

I’ve been trying to figure this out for days.

Thank you so much for posting this solution!

Chris

I can now close my previous request for help:

http://forums.nvidia.com/index.php?showtopic=201924&view=findpost&p=1246209&hl=&fromsearch=1

The above bug with compute level 1.x cuPrintf.cu is still in CUDA 6.0
The good news is that psr’s fix still works.
Apply it as before to line 838

Bill
http://www.cs.ucl.ac.uk/staff/W.Langdon/

Wait, does printf() not work for you guys in your kernel code? It’s been working fine for me…

Even with CUDA 6.0 and sm_13 cuPrintf only works the first time the
kernel is run. On subsequent calls the printf buffer appears to be empty.
Bill