Particle Swarm Optimization (PSO) is a stochastic technique for solving the optimization problem. Attempts have been made to shorten the computation times of PSO based algorithms with massive threads on GPUs (graphic processing units), where thread groups are formed to calculate the information of particles and the computed outputs for the particles are aggregated and analyzed to find the best solution. In particular, the reduction-based method is considered as a common approach to handle the data aggregation and analysis for the calculated particle information. Nevertheless, based on our analysis, the reduction-based method would suffer from excessive memory accesses and thread synchronization overheads. In this paper, we propose a novel algorithm to alleviate the above overheads with the atomic functions. The threads within a thread group update the calculated results atomically to the intra-group data queue conditionally, which prevents the frequent accesses to the memory as done by the parallel reduction operations. Furthermore, we develop an enhanced version of the algorithm to alleviate the synchronization barrier among the thread groups, which is achieved by allowing the thread groups to run asynchronously and updating to the global, lock-protected variables occasionally if necessary. Our experimental results show that our proposed algorithm running on the Nvidia GPU is about 200 times faster than the serial version executed by the Intel Xeon CPU. Moreover, the novel algorithm outperforms the state-of-the-art method (the parallel reduction approach) by a factor of 2.2.
翻译:粒子群优化(PSO)是一种用于求解优化问题的随机技术。前人曾尝试利用GPU(图形处理器)上的大量线程缩短基于PSO算法的计算时间,通过形成线程组来计算粒子信息,并对计算输出进行聚合与分析以寻找最优解。其中,基于归约的方法常被用于处理计算粒子信息的聚合与分析。然而,根据我们的分析,基于归约的方法会面临过多的内存访问和线程同步开销。本文提出一种新颖算法,利用原子函数缓解上述开销。线程组内的线程通过原子操作,有条件地将计算结果更新至组内数据队列,从而避免了并行归约操作中频繁的内存访问。此外,我们开发了该算法的增强版本,通过允许线程组异步运行,并仅在必要时偶尔更新受锁保护的全局变量,以缓解线程组间的同步屏障。实验结果表明,本文提出的算法在NVIDIA GPU上的运行速度比Intel Xeon CPU上的串行版本快约200倍,且相较于当前最先进的方法(并行归约方法)性能提升达2.2倍。