Forum Discussion
Altera_Forum
Honored Contributor
8 years agoI am not sure what you mean by "allow for 2*num_compute_units". Using more compute units is supposed to increase performance by allowing more compute units to run in parallel. e.g., if you have 10 work-groups in your code, and each work groups takes x seconds to be processed with one compute unit, your total run time will be 10x; however, with two compute units, assuming that you have enough off-chip memory bandwidth, your run time will be reduced to ~5x.
You do not necessarily need to avoid thread-id-dependent branches; in many cases this is the only solution. That warning from the compiler is supposed to be informative, this is not something that you absolutely need to fix. It might not even result in much of a performance degradation.