[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 - read/write other core local memory from OpenCL kernel

read/write other core local memory from OpenCL kernel

Moderator: dar

read/write other core local memory from OpenCL kernel

Postby djm » Fri Sep 19, 2014 7:45 pm

Are there any special functions I can use to read/write other core's local memory from OpenCL kernel code, or do I need to build the other core addresses manually? How can I determine the row/col id from the id returned by get_global_id()?
djm
 
Posts: 11
Joined: Mon Sep 15, 2014 5:08 am

Re: read/write other core local memory from OpenCL kernel

Postby dar » Fri Sep 19, 2014 8:24 pm

There are, or rather were, but I need to re-validate them. I am working on a project where I happen to need to
do this so I can get back to you with a more clear answer soon. FYI here is the API that once worked on an earlier prototype platform - I will just list the calls and maybe you can read between the lines since they are designed to support exactly what you are trying to do. I do not want to post the full API spec until I can re-validate since I do not want to post something that people cannot actually use.

typedef threadspec_t;

// get thread handle based on OpenCL local ID
threadspec_t get_thread( int dim, unsigned int* ltid );

// copy contents of array into same array of another thread
void* memsync( void* ptr, size_t n, threadspec_t thrs, int flags );

// copy contents of array to a different array of another thread
void* memsend( void* src, size_t n, threadspec_t thrs, int flags );

// receive contents of an array from another thread
void* memrecv( void* dst, size_t n, threadspec_t thrs, int flags );

memsend/memrecv must be paired.
dar
 
Posts: 90
Joined: Mon Dec 17, 2012 3:26 am

Re: read/write other core local memory from OpenCL kernel

Postby djm » Fri Sep 19, 2014 10:18 pm

Awesome! Thanks again for your quick, detailed response. Looking forward to this capability!

djm
djm
 
Posts: 11
Joined: Mon Sep 15, 2014 5:08 am

Re: read/write other core local memory from OpenCL kernel

Postby djm » Sun Sep 21, 2014 1:33 am

djm
 
Posts: 11
Joined: Mon Sep 15, 2014 5:08 am

Re: read/write other core local memory from OpenCL kernel

Postby dar » Sun Sep 21, 2014 3:34 am

Try adding a barrier after the loop that initializes the local memory but before you attempt to write into other core's memory.

See if you get same results.
dar
 
Posts: 90
Joined: Mon Dec 17, 2012 3:26 am

Re: read/write other core local memory from OpenCL kernel

Postby djm » Sun Sep 21, 2014 5:49 am

Yes, that works perfectly. I should have seen that. Thanks very much!
djm
 
Posts: 11
Joined: Mon Sep 15, 2014 5:08 am

Re: read/write other core local memory from OpenCL kernel

Postby nickoppen » Wed Oct 15, 2014 12:18 pm

Hi djm,

Could you post the working version of the code, please? I'm yet to get my head around this inter-core data passing.

nick
Sharing is what makes the internet Great!
User avatar
nickoppen
 
Posts: 266
Joined: Mon Dec 17, 2012 3:21 am
Location: Sydney NSW, Australia

Re: read/write other core local memory from OpenCL kernel

Postby djm » Thu Oct 16, 2014 12:39 am

djm
 
Posts: 11
Joined: Mon Sep 15, 2014 5:08 am

Re: read/write other core local memory from OpenCL kernel

Postby nickoppen » Fri Oct 17, 2014 9:03 am

Thanks.
Sharing is what makes the internet Great!
User avatar
nickoppen
 
Posts: 266
Joined: Mon Dec 17, 2012 3:21 am
Location: Sydney NSW, Australia


Return to OpenCL

Who is online

Users browsing this forum: No registered users and 6 guests