Just moved from 9.1 to 9.2 and printf from global doesn’t seem to work anymore.
here is the test code
#include <stdio.h>
#define N 8
#define TPB 4
__global__ void hello()
{
const int i = blockIdx.x*blockDim.x + threadIdx.x;
printf("\ni = %d", i);
}
int main()
{
hello<<<N/TPB, TPB>>>();
return 0;
}
Same for the following one no output
#include <stdio.h>
#include <assert.h>
#include <cuda.h>
#include <cuda_runtime.h>
__global__ void test(){
printf("Hi");
}
int main( int argc, char** argv )
{
test<<<1,1>>>();
cudaDeviceSynchronize();
return 0;
}
My bad, I should have read the install guide…Neglegted to update driver 390 during install
Install driver 396.24 and now it now it works like a charm