cuda 11 kernel doesn't run
问题 here is a demo.cu aiming to printf from the GPU device: #include "cuda_runtime.h" #include "device_launch_parameters.h" #include <stdio.h> __global__ void hello_cuda() { printf("hello from GPU\n"); } int main() { printf("hello from CPU\n"); hello_cuda <<<1, 1>>> (); cudaDeviceSynchronize(); cudaDeviceReset(); printf("bye bye from CPU\n"); return 0; } it compiles and runs: $ nvcc demo.cu $ ./a.out that's the output that I get: hello from CPU bye bye from CPU Q: why there is no printing result