Altera_Forum
Honored Contributor
7 years agoLimiting the number of threads on NDRange kernels
Hi,
Is there a way to limit the number of simultaneous executing threads for a ndrange kernel?? My NDRange kernel has a high thread capacity (127 simultaneous threads) and uses local memories. I suspect that the high number of threads is one of the causes that makes local memories being replicated several times (as the report says). Is there an "elegant" way of limiting the number of concurrent (pipelined) threads so that the compiler reduces the memory usage?? Now, the compiler crazily replicates hardware as mad (event to more than 2000% as reported by the early estimator). My current work-around is to introduce a barrier at the end of the outer-loop iteration. It does not reduce the "thead capacity" reported by the early estimator, but it effectively reduces the memory replication factor. Best Regards