"Hello, World" for a GPU

157 views
Skip to first unread message

Bob Smith

unread,
May 31, 2013, 5:20:37 PM5/31/13
to hbrob...@googlegroups.com
"Hello, World!" for a GPU is easier than you might think.
The following steps are all that is required for your first
GPU program. This is for a PC/nVidia/cuda. (I'll post again
when I have it for ARM/Mali/OpenCL.)

lspci | grep -i nvidia # nVidia specific for now
sudo apt-get install nvidia-cuda-toolkit nvidia-cuda-doc nvidia-cuda-dev
nvcc hello_gpu.cu -o hello -L/usr/lib/x86_64-linux-gnu/ -lcudart
./hello

On my system doing the apt-get caused a fairly large update
since there were quite a few unmet dependencies. If this
demo is of interest to you then you might be interested in
the Udacity class on parallel programming:
https://www.udacity.com/course/cs344


Bob
hello_gpu.cu

Bill Weiler

unread,
May 31, 2013, 7:58:33 PM5/31/13
to hbrob...@googlegroups.com
Bob,
        Really interesting. I checked out the code and am looking forward to the ARM/Mali code. I have been curious about the parallel capabilities of GPU's as well but haven't pursued it yet. Thanks for the info.

Bill W.






Bob

--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+unsubscribe@googlegroups.com.
To post to this group, send email to hbrob...@googlegroups.com.
Visit this group at http://groups.google.com/group/hbrobotics?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.



Reply all
Reply to author
Forward
0 new messages