I've written the following code
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include <stdio.h>
#include<iostream>
using namespace std;
__global__ void hello()
{
printf("Hello");
}
int main()
{
hello<<<1, 7>>>();
cudaDeviceSynchronize();
return 0;
}
The code compiles with nvcc -o test test.cu
and generates a warning nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
I go ahead with the execution ./test
and there is no output at all.
Is there any error in the code? Thanks