An optimization method for reusing graphic processing unit(GPU)data is proposed based on the dynamic spanning tree to solve the problem that the reusing process with manual optimization is complicated and compilation overhead in optimization is expensive. The proposed method is transparent to programmers with simplicity and effectiveness. The approach abstracts the executed accesses of GPU tasks as leaf nodes of a spanning tree
and uses the tree to dynamically manage the access information. Then the identification and optimization for the data reusing is realized by searching and managing the tree. The complex and challenging data reuse analysis is not required since invoking the run-time library is sufficient to reduce the CPU-GPU data transfers. Experiments show that the proposed optimization method can eliminate redundant CPU-GPU data transfers in non-reuse CPU-GPU application programs and can achieve a speedup as large as 3 to 10 times over the original execution. Moreover
the additional cost is just less than 5% of the execution time of the program adopting the proposed optimization.
关键词
Keywords
references
YANG Xuejun, LIAO Xiangke, LU Kai, et al. The TianHe-1A supercomputer: its hardware and software [J]. Journal of Computer Science and Technology, 2011, 26(3): 344-351.
ZHU Xiaoqian, LIU Xin, MENG Xiangfei, et al. Performance analysis and optimization of gyrokinetic torodial code on TH-1A supercomputer [C]∥Proceedings of 2nd International Conference on Electrical and Control Engineering. Piscataway, NJ, USA: IEEE, 2011: 6027-6031.
FENG Xiaowen, JIN Hai, ZHENG Ran, et al. Optimization of sparse matrix-vector multiplication with variant CSR on GPUs [C]∥Proceedings of 17th IEEE International Conference on Parallel and Distributed Systems(ICPADS). Piscataway, NJ, USA: IEEE, 2011: 165-172.
WU Haicheng, DIAMOS G, Wang Jin, et al. Optimizing data warehousing applications for GPUs using kernel fusion/fission [C]∥Proceedings of IEEE 26th International Parallel and Distributed Processing Symposium, Workshops PhD Forum(IPDPSW). Piscataway, NJ, USA: IEEE, 2011: 2433-2442.
WOLF M E, LAM M S. A loop transformation theory and an algorithm to maximize parallelism [J]. IEEE Trans on Parallel Distrib Syst, 1991, 2(4): 452-471.
WOLF M E, LAM M S. A data locality optimizing algorithm [C]∥Proceedings of the ACM SIGPLAN'91 Conference on Programming Language Design and Implementation(PLDI). Washington, DC, USA: ACM, 1991: 30-44.
SMITH M D, RAMSEY N, HOLLOWAY G H. A generalized algorithm for graph-coloring register allocation [C]∥Proceedings of the ACM SIGPLAN 2004 Conference on Programming Language Design and Implementation(PLDI). Washington, DC, USA: ACM, 2004: 277-288.
WOLFE M. Implementing the PGI accelerator model [C]∥Proceedings of the 3rd Workshop on General-Purpose Computation on Graphics Processing Units(GPGPU). Washington, DC, USA: ACM, 2010: 43-50.
HAN T D, ABDELRAHMAN T S. hiCUDA: high-level GPGPU programming [J]. IEEE Trans on Parallel Distrib Syst, 2011, 22(1): 78-90.
WOLFE M. Optimizing data movement in the PGI accelerator programming model [EB/OL]. [2012-06-09]. http:∥www.pgroup.com/lit/articles/insider/v3n1a1.htm.
FENG Guofu, DONG Xiaoshe, HU Bing, et al. A MPI parallel programming model for CBEA based on hybrid memory access technology [J]. Chinese Journal of Computers, 2008, 31(11): 1965-1974.
IOSEVICH V, SCHUSTER A. A comparison of sequential consistency with home-based lazy release consistency for software distributed shared memory [C]∥Proceedings of 18th Annual ACM International Conference on Supercomputing(ICS). Washington, DC, USA: ACM, 2004: 306-315.
NAS Parallel Benchmarks Team. Problem sizes and parameters in NAS Parallel Benchmarks [EB/OL]. [2012-06-11]. http:∥www.nas.nasa.gov/publications/npb_problem_sizes.html.
YARROW M, KUSZMAUL C. NPB2.3-FT Benchmark-C+CUDA [EB/OL]. [2012-06-11]. http:∥hpc gpu.codeplex.com/releases/view/34770.
ZHANG Bao, DONG Xiaoshe, BAI Xiuxiu et al. Profiling based optimization method for CPU-GPU heterogeneous parallel processing systems [J]. Journal of Xi'an Jiaotong University, 2012, 46(2): 17-23.