AnsweredAssumed Answered

Opencl kernel local memory

Question asked by shubh809 on Jul 30, 2019

OpenCL provides local memory similar to shared memory in cuda. In cuda we have to use volatile with shared memory , because If you don't declare a shared array as volatile, then the compiler is free to optimize locations in shared memory by locating them in registers. But it will be problem if threads communicate between each other. My question is do we have to follow same approach(of using volatile) in opencl kernel also and if yes how should I do it?

Outcomes