OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU
Announcements
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.
1663 Discussions

Barrier error, when using __local qualified memory

KI_JU_L_
Beginner
164 Views

 

"aftrer using barrier function the value in memory, which is qualified as __local, is changed."

 

 

I could narrow down the range.


The problem comes from using barrier when I read and write some data in memory(array), which is qualified as __local.


I didn't see there is some limitation  the memory area must be used as only reading or writing.

But it seems to be operated that there is the cache and when local memory is read, that is saved in cache and flush when I use barrier, which argument is  "CLK_LOCAL_MEM_FENCE"


The original descritption of "CLK_LOCAL_MEM_FENCE"is like below

CLK_LOCAL_MEM_FENCE: The barrier function
will either flush any variables stored in local memory or queue a memory fence to ensure
correct ordering of memory operations to local memory.

But I don't know this phonomina is from my mis-operation or potential bug.
Is there anyone who give some solution?

I attached another documents and new test kernel.

file names are "Barrier Error2.docx" and "BitonicSort_Kernels.cl" which is placed in Bitonic_APU.zip file.
and the function for testing is "TEST_BARRIER_0" in BitonicSort_Kernel.cl

0 Kudos
1 Reply
KI_JU_L_
Beginner
164 Views

 

Here is my environment

Processor : Intel i-5-2410M @2.3GHz

version of SDK : 2013 R3

and using Visual studio 2010

Reply