金陆
2014-03-16 04:50:30 UTC
I am using an old PC with an old GPU card(GeForce 9800 GT).
As you may know, 9800 does not support "printf" function in device code. However, Nvidia supplies cuPrintf. In CU file, it can be used like following. The situation is how can I use "cudaPrintfInit, cudaPrintfDisplay and cudaPrintfEnd" in Python code?
Thanks
[cu starts]
#include "cuPrintf.cu"
__global__ void my_kernel()
{
cuPrintf("x=%u, y=%u, offset=%u\t", x, y, offset);
}
int main()
{
cudaPrintfInit();
my_kernel<<<...>>>();
cudaPrintfDisplay(stdout, true);
cudaPrintfEnd();
}
[cu ends]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.tiker.net/pipermail/pycuda/attachments/20140316/ce75e8d0/attachment.html>
As you may know, 9800 does not support "printf" function in device code. However, Nvidia supplies cuPrintf. In CU file, it can be used like following. The situation is how can I use "cudaPrintfInit, cudaPrintfDisplay and cudaPrintfEnd" in Python code?
Thanks
[cu starts]
#include "cuPrintf.cu"
__global__ void my_kernel()
{
cuPrintf("x=%u, y=%u, offset=%u\t", x, y, offset);
}
int main()
{
cudaPrintfInit();
my_kernel<<<...>>>();
cudaPrintfDisplay(stdout, true);
cudaPrintfEnd();
}
[cu ends]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.tiker.net/pipermail/pycuda/attachments/20140316/ce75e8d0/attachment.html>