I am trying to run the cuda's printf example:
#include <stdio.h>
__global__ void helloCUDA(float f)
{
printf("Hello thread %d, f=%f\n", threadIdx.x, f);
}
int main()
{
helloCUDA<<<1, 5>>>(1.2345f);
cudaDeviceReset();
return 0;
}
It's being compiled with
nvcc test.cu -o test
I tried to run the program
./test
however, the program printf nothing,and display nothing. My NVidia card is M2070, and I have cuda9.0 installed.
Comments
Post a Comment