Preview

Proceedings of the National Academy of Sciences of Belarus. Physics and Mathematics Series

Advanced search

Conditions for the existence of broadcast and spatial locality in computation threads

https://doi.org/10.29235/1561-2430-2022-58-3-292-299

Abstract

Graphics Processing Units (GPUs) are considered as the target computer for implementing parallel algorithms. The set of algorithm operations to be implemented on the GPU must be split into computation threads; the threads should be grouped into computation blocks that are performed atomically on stream processors. Threads of a single block are executed on a stream processor in parts-pools called warp; warp threads are executed simultaneously. The efficiency of the parallel algorithm depends on the way the data is stored in the GPU memory. If all warp threads request the same datum when executing the current operator, then it is desirable to place it in a shared or constant GPU memory; in this case, its distribution across the cores of the multiprocessor is actually realized by means of broadcast. If warp threads request data located close to the memory, then in this case there is a spatial locality of data, which makes it advisable to place this data in the GPU’s memory. The implementation of broadcast or spatial locality by placing data in a memory of the appropriate type allows one to significantly reduce traffic when exchanging data between the memory levels of the GPU. This paper formulates and proves the necessary and sufficient conditions under which it is possible to perform a broadcast or there is a spatial locality of data. The conditions are formulated in terms of functions that determine the use of array elements at occurrences in the algorithm operators and functions that define the information dependencies of the algorithm. The results of the work can be used to optimize parallel algorithms when they are implemented on the GPU.

About the Author

N. A. Likhoded
Belarusian State University
Belarus

Nikolai A. Likhoded – Dr. Sc. (Physics and Mathematics), Professor

4, Nezavisimosti Ave., 220030, Minsk



References

1. Likhoded N. A. Characterization of locality of the parallel implementations of imperfectly nested loops. Doklady Natsional’noi akademii nauk Belarus = Proceedings of the National Academy of Sciences of Belarus, 2010, vol. 54, no. 1, pp. 26–32 (in Russian).

2. Adutskevich N. A. Likhoded N. A., Sikorsky A. O. Parallelization of sequential programs: distribution of arrays among processors and structurization of communications. Cybernetics and System Analysis, 2012, vol. 48, no. 1, pp. 122–137. https:// doi.org/10.1007/s10559-012-9382-2

3. Likhoded N. A., Paliashchuk M. A. Method of ranking tiles size parameters of parallel algorithm. Doklady Natsional’noi akademii nauk Belarus = Proceedings of the National Academy of Sciences of Belarus, 2015, vol. 59, no. 4, pp. 25–33 (in Russian).

4. Likhoded N. A., Paliashchuk M. A. Estimate of locality of parallel algorithms implemented on GPUs. Vestnik YuzhnoUral’skogo gosudarstvennogo universiteta. Seriya: «Vychislitel’naya matematika i informatika» = Bulletin of the South Ural State University. Series: “Computational Mathematics and Software Engineering”, 2016, vol. 5, no. 3, pp. 96–111 (in Russian). https://doi.org/10.14529/cmse160307

5. Likhoded N. A., Paliashchuk M. A. Conditions for privatizing the elements of arrays by computing threads. Zhurnal Belorusskogo gosudarstvennogo universiteta. Matematika. Informatika = Journal of the Belarusian State University. Mathematics and Informatics, 2018, no. 3, pp. 59–67 (in Russian).

6. Voevodin V. V. Parallel Computing. Saint Petersburg, BKhV-Petersburg Publ., 2002. 608 p. (in Russian).

7. Bondhugula U., Baskaran M., Krishnamoorthy S., Ramanujam J., Rountev A., Sadayappan P. Automatic transformations for communication-minimized parallelization and locality optimization in the polyhedral model. Lecture Notes in Computer Science. (LNTCS, vol. 4959), 2008, pp. 132–146. https://doi.org/10.1007/978-3-540-78791-4_9

8. Xue J. Loop Tiling for Parallelism. (LNTCS, vol. 575). Springer Science & Business Media, 2000. 256 p. https://doi. org/10.1007/978-1-4615-4337-4

9. Venkataraman G., Sahni S., Mukhopadhyaya S. A blocked all-pairs shortest-paths algorithm. ACM Journal of Experimental Algorithmics, 2003, vol. 8, pp. 2.2-es. https://doi.org/10.1145/996546.996553

10. Lund B. D., Smith J. W. A multi-stage cuda kernel for floyd-warshall. Arxiv [Preprint], 2010. Available at: https://arxiv. org/abs/1001.4108. https://doi.org/10.48550/arXiv.1001.4108


Review

Views: 393


Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 License.


ISSN 1561-2430 (Print)
ISSN 2524-2415 (Online)