Forum Discussion
Altera_Forum
Honored Contributor
9 years agoHelp with porting a CUDA code to OpenCL
Hi everyone. I am porting a CUDA kernel to OpenCL kernel to execute it on a FPGA (Stratix V). The code looks very similar so it shouldn't be a problem except that this FPGA board supports only O...
Altera_Forum
Honored Contributor
9 years agoIf you are using num_compute_units to replicate the kernel, and your accesses are random in a way that two different work-items from different work-groups might try to read/write the same memory location, then yes, this is certainly possible. Without num_compue_units, this shouldn't happen unless there is some race condition in the kernel itself (i.e. incorrect code which would also give incorrect results on CPU/GPU).