[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/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 - Notes on the OpenCl example
Page 1 of 1

Notes on the OpenCl example

PostPosted: Mon Aug 11, 2014 5:12 am
by aihaike
Hey,

The OpenCL example runs on my board but I'm wondering why only root can see the epiphany device.
I added a function that print informations of the device in used and it turns out that CL_DEVICE_MAX_COMPUTE_UNITS returns 1 for both the processor and coprocessor.
Can you please tell me why?
To me using OpenCl on the board only require specific library and that any OpenCl code is likely able to run on it.
Am I right here?
Thanks,

Éric.

Re: Notes on the OpenCl example

PostPosted: Mon Aug 11, 2014 4:23 pm
by 9600
The reason you need to be root is that the currently supported interface is /dev/mem. However, there is a driver in development that provides access via /dev/epiphany, which is much safer to set more relaxed permissions on, e.g. via udev. If you build the eSDK from git HEAD it will expect this new interface, and if you wanted to experiment with it I believe there is a (but don't expect this to be fully tested).

Regards,

Andrew

Re: Notes on the OpenCl example

PostPosted: Mon Aug 11, 2014 4:37 pm
by bcxcube
Andrew,

You are correct - the branch "bcxcube_epiphany_driver" of the parallella-linux-adi repository contains the Epiphany driver. The sources at HEAD of the epiphany-sdk repository require the Epiphany driver (these sources use the epiphany driver for memory mapping rather than the /dev/mem driver).

Note that if you use the SDK modules from HEAD, you will need to use a kernel built from the bcxcube_epiphany_driver branch which includes the Epiphany driver by default.

Regards,
Ben

Re: Notes on the OpenCl example

PostPosted: Tue Aug 12, 2014 1:13 am
by aihaike

Re: Notes on the OpenCl example

PostPosted: Tue Aug 12, 2014 11:59 am
by tincman

Re: Notes on the OpenCl example

PostPosted: Tue Aug 12, 2014 1:03 pm
by dar
I checked and max compute units is set to 1. This is an error. Its easy to fix, and I will have this done.

-DAR

Edit: Ok, its early here ... I checked the device info parameter code, and in fact this is correct and is set to 1 for a reason. In OpenCL-speak the Epiphany processor should be viewed as a single compute unit supporting a max workgroup size of 16. The definition of CL_DEVICE_MAX_COMPUTE_UNITS is imprecise outside of the GPUs that inspired it. This is the best interpretation (1 x 16) to help programmers target the device efficiently. For optimal performance you should use OpenCL to launch 16 parallel threads and have each thread perform 1/16th of the work for your problem. This is different from a GPU where you are taught to launch thousands of threads - GPUs are massively multithreaded architectures, a non-hyper-threaded multi-core CPU is not. So you must use a different work distribution model for performance.

Re: Notes on the OpenCl example

PostPosted: Tue Aug 12, 2014 1:12 pm
by dar

Re: Notes on the OpenCl example

PostPosted: Tue Aug 12, 2014 4:20 pm
by aihaike
@Dar,

Thank you so much for your replies.
That make things much more clear now.