Autor: |
Peng Xu, Ming-Yan Sun, Yin-Jun Gao, Tai-Jiao Du, Jin-Ming Hu, Jun-Jie Zhang |
Jazyk: |
angličtina |
Rok vydání: |
2022 |
Předmět: |
|
Zdroj: |
Array, Vol 16, Iss , Pp 100261- (2022) |
Druh dokumentu: |
article |
ISSN: |
2590-0056 |
DOI: |
10.1016/j.array.2022.100261 |
Popis: |
Graphic Processing Units (GPUs) are becoming popular in computational physics. Seeing the increasing trend of using GPUs in the physics community, we provide a comparison of the two major packages Numba and CuPy for GPU coding in Python language. We have discussed the influence of the data amount and data type on the performance of the GPU code. The data transferring time from GPU to CPU and its influence on the total execution time has also been analyzed. We find that when the grid numbers reaches 107, Numba will be faster than CuPy. Meanwhile, there is no noticeable difference in the data transmission speed between Numba and CuPy. Setting the data types as single-precision in Numba programs can improve the computation time by at least 20%. |
Databáze: |
Directory of Open Access Journals |
Externí odkaz: |
|