[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Parallella Community • View topic - OpenCL Example and tutorial

OpenCL Example and tutorial

Moderator: dar

OpenCL Example and tutorial

Postby dkhenry » Mon Dec 17, 2012 9:42 pm

What is the go to OpenCL example for the Parallella.? Also can we use OpenCL in the SDK ?
dkhenry
 
Posts: 1
Joined: Mon Dec 17, 2012 3:26 am

Re: OpenCL Example and tutorial

Postby cordite » Mon Dec 17, 2012 10:10 pm

Could you change the title so it seems to be more of a question more than a statement that this thread is one?
cordite
 
Posts: 8
Joined: Mon Dec 17, 2012 3:26 am

Re: OpenCL Example and tutorial

Postby jar » Tue Dec 18, 2012 4:41 am

Take a look at the example that demonstrates some of the OpenCL kernel extensions that have been implemented to support the Epiphany architecture.

Also, there are many
User avatar
jar
 
Posts: 295
Joined: Mon Dec 17, 2012 3:27 am

Re: OpenCL Example and tutorial

Postby dar » Wed Dec 19, 2012 11:55 pm

Attachments
mandelbrot-E16G.jpg
mandelbrot-E16G.jpg (106.1 KiB) Viewed 40134 times
dar
 
Posts: 90
Joined: Mon Dec 17, 2012 3:26 am

Re: OpenCL Example and tutorial

Postby Dade » Thu Dec 20, 2012 9:55 am

, , , ,
User avatar
Dade
 
Posts: 26
Joined: Sun Dec 16, 2012 8:59 pm

Re: OpenCL Example and tutorial

Postby dar » Sat Dec 22, 2012 4:07 am

The kernel is certainly not optimized, but maybe 10-15 min of thought was given to making the kernel match with Epiphany to get decent performance. Have not run this on ARM. It was faster than CPU used with the earlier eval kit.

Your question raises a good point that programmers new to OpenCL (and in general perhaps) should be aware of - being able to express an algorithm in a common API does not mean that the precise form of your code will run well (or even work) on different hardware platforms. This is a bit of a fantasy. Code is portable across GPUs to the extent they have similar architectural features, and we begin to believe the fantasy sometimes. Performant code must be tuned for a given architecture.

With respect to the Mandelbrot kernel, you are correct, it was designed to write back a line to DRAM. There are other factors less obvious. Epiphany cores are more like a CPU than a GPU, i.e., its not SIMD or SIMT even though it can support both models. Its not a multi-threaded architecture, the cores are scalar, and it has a memory architecture different from a GPU. This impacts the code you write. For example, with a GPU you try to keep thousands of threads "in flight" and you have to pay attention to certain memory alignment rules between threads. With Epiphany I believe you gain nothing by keeping more threads in flight than the number of physical cores, and the memory rules are different.

The intent is to eventually provide a programming "best practices" guide for Parallella to help explain some of these things by example.
dar
 
Posts: 90
Joined: Mon Dec 17, 2012 3:26 am

Re: OpenCL Example and tutorial

Postby Gedece » Sat Dec 22, 2012 11:43 am

That "Best Practices" guide sounds interesting, please post an announcement once it becomes available, it will help a lot of us to understand things better.
User avatar
Gedece
 
Posts: 23
Joined: Mon Dec 17, 2012 3:18 am
Location: Buenos Aires, Argentina

Re: OpenCL Example and tutorial

Postby Transcendental » Sat Dec 22, 2012 11:37 pm

User avatar
Transcendental
 
Posts: 49
Joined: Mon Dec 17, 2012 1:41 am

Re: OpenCL Example and tutorial

Postby Lord_Rafa » Tue May 14, 2013 1:36 am

Hello,

I need help, I was trying to run this example but I got this error:

coprthr-1.5.0-RC1 (Marathon)
out: e_open(): mmap failure.
out: e_alloc(): mmap failure.
[15439] clmesg ERROR: device.c(257): e_alloc returned 1
[15439] clmesg info: cmdsched.c(88): cmdqx0: run
[15439] clmesg info: cmdsched.c(88): cmdqx0: run
Segmentation fault

first I compiled with clcc the opencl code to get a .o file and after I compiled and linked with gcc
Lord_Rafa
 
Posts: 3
Joined: Tue May 14, 2013 1:34 am

Re: OpenCL Example and tutorial

Postby ysapir » Tue May 14, 2013 6:18 am

mmap() failure usually (but not necessarily) means that you are not running as superuser.
User avatar
ysapir
 
Posts: 393
Joined: Tue Dec 11, 2012 7:05 pm

Next

Return to OpenCL

Who is online

Users browsing this forum: No registered users and 6 guests

cron