ネスト構造を含むGPUプログラムのデータ構造最適化
亘輝 伊藤 · Institutional Repositories DataBase (IRDB) · 2024
GPUs, processors developed for graphics processing, are suitable for highly parallel processing due to their many built-in cores and are in high demand in many fields, such as particle simulation and AI. However, since memory access is often a bottleneck, optimization of memory access is effective in improving program performance. In general, real programs use not only simple arrays and structures but also complex data structures that combine them. At this time, even if the content is the same, if the data structure differs, the memory access efficiency changes, which also affects the execution speed. For relatively simple data structures, such as arrays of structures (SoA) and structures of arrays (AoS), research has been conducted to perform mutual conversion or to determine the one with higher execution efficiency through static analysis. However, they have not been able to deal with multi-stage nested structures that nest multiple levels, such as including structures as members of a structure. This study aims to generalize conventional methods to improve the execution efficiency of programs containing multistage nested structures. In a multistage nested structure, there are many data structures such as SoA and AoS that are equivalent in content but have different layouts in memory, and it is difficult to manually derive all of them. When a data structure is changed, the code that accesses the structure must also be changed, which is also complicated to do manually. In this paper, we propose a method for automatically generating equivalent programs for programs containing multi-stage nested structures. Specifically, all equivalent data structures are generated, and the access codes are automatically changed to correspond to each data structure. We implemented the proposed method and evaluated it on a program containing a multi-stage nested structure, and found that it generated all equivalent data structures and correctly changed the access codes foreach of them. The speedup ratio of the generated programs compared to the original version was calculated, and it was found to be at most 1.42 times faster than the original version, indicating that the generation of equivalent programs by this method is effective in speeding up the programs.
Cited by 0 works.