[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

Notes on the OpenCl example

Any technical questions about the Epiphany chip and Parallella HW Platform.

Moderator: aolofsson

Notes on the OpenCl example

Postby aihaike » Mon Aug 11, 2014 5:12 am

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.
User avatar
aihaike
 
Posts: 31
Joined: Wed Aug 06, 2014 5:41 am
Location: Shanghai, China

Re: Notes on the OpenCl example

Postby 9600 » Mon Aug 11, 2014 4:23 pm

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
Andrew Back
User avatar
9600
 
Posts: 997
Joined: Mon Dec 17, 2012 3:25 am

Re: Notes on the OpenCl example

Postby bcxcube » Mon Aug 11, 2014 4:37 pm

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
User avatar
bcxcube
 
Posts: 7
Joined: Tue Jul 29, 2014 4:00 pm
Location: Nashua, NH

Re: Notes on the OpenCl example

Postby aihaike » Tue Aug 12, 2014 1:13 am

User avatar
aihaike
 
Posts: 31
Joined: Wed Aug 06, 2014 5:41 am
Location: Shanghai, China

Re: Notes on the OpenCl example

Postby tincman » Tue Aug 12, 2014 11:59 am

User avatar
tincman
 
Posts: 8
Joined: Mon Dec 17, 2012 3:30 am
Location: CO, US

Re: Notes on the OpenCl example

Postby dar » Tue Aug 12, 2014 1:03 pm

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.
Last edited by dar on Tue Aug 12, 2014 1:27 pm, edited 1 time in total.
dar
 
Posts: 90
Joined: Mon Dec 17, 2012 3:26 am

Re: Notes on the OpenCl example

Postby dar » Tue Aug 12, 2014 1:12 pm

dar
 
Posts: 90
Joined: Mon Dec 17, 2012 3:26 am

Re: Notes on the OpenCl example

Postby aihaike » Tue Aug 12, 2014 4:20 pm

@Dar,

Thank you so much for your replies.
That make things much more clear now.
User avatar
aihaike
 
Posts: 31
Joined: Wed Aug 06, 2014 5:41 am
Location: Shanghai, China


Return to Epiphany and Parallella Q & A

Who is online

Users browsing this forum: No registered users and 16 guests

cron