hello,
I am trying to run via termianl a simple program:
include <stdio.h>
__global__ void hello_world_kernel()
{
printf("Hello GPU World!\n");
}
int main()
{
hello_world_kernel <<<1,8>>>();
cudaDeviceReset();
}
but getting always :
nvcc testme.cu -o hello_gpu
./testme.cu
and it’s outputing always:
./testme.cu: line 3: syntax error near unexpected token (' ./testme.cu: line 3:
global void hello_world_kernel()’
nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Fri_Dec_17_18:16:03_PST_2021
Cuda compilation tools, release 11.6, V11.6.55
Build cuda_11.6.r11.6/compiler.30794723_0
from nvidia-smi:
NVIDIA-SMI 510.108.03 Driver Version: 510.108.03 CUDA Version: 11.6
I am using conda, I have installed successfully the cuda, because I can run in GPU the tensorflow