Thread: I need a help
View Single Post
  #1 (permalink)  
Old August 16th, 2016, 05:40 PM
Yasien Yasien is offline
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2016
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default I need a help

I'm a new user of linux. I installed the CUDA C driver. I run the executable file of the sample bandwidth test and it worked well. But when I tried to run the executable file of this code :
#include <stdio.h>
__global__ void helloFromGPU (void)
{
printf("Hello World from GPU!\n");
}
int main(void)
{
// hello from cpu
printf("Hello World from CPU!\n");
helloFromGPU <<<1, 10>>>();
cudaDeviceReset();
return 0;
}
I got :
$ ./code_1
Hello World from CPU!

and the device code doesn't show the expected result of repeating the string 10 times.
Reply With Quote