@article{oai:ipsj.ixsq.nii.ac.jp:00231991, author = {Junyu, Lin and Akimasa, Morihata and Junyu, Lin and Akimasa, Morihata}, issue = {1}, journal = {情報処理学会論文誌プログラミング(PRO)}, month = {Jan}, note = {CUDA is a parallel programming framework for GPU developed by Nvidia. In parallel programming, a data race will occur when different threads access the same memory at the same time, and at least one of the threads performs a write operation. we can fix data race by changing one of these conditions. A common approach is a serialization of the operations, which avoids simultaneous accesses in return for the loss of parallelism. We are developing a system to fix data races in CUDA by letting threads access different memories. It collects the necessary information using the off-the-shelf concurrency bug detection tool and then inserts codes to use thread-local caches instead of the shared memory. When threads differently modify their caches, it is unclear which value should be written back to the shared memory. To solve this issue, the system lets programmers write an assert() statement to express their requirement for values in the shared memory. We evaluated our system with several examples and demonstrated its ability to fix data races that existing serialization-based methods cannot., CUDA is a parallel programming framework for GPU developed by Nvidia. In parallel programming, a data race will occur when different threads access the same memory at the same time, and at least one of the threads performs a write operation. we can fix data race by changing one of these conditions. A common approach is a serialization of the operations, which avoids simultaneous accesses in return for the loss of parallelism. We are developing a system to fix data races in CUDA by letting threads access different memories. It collects the necessary information using the off-the-shelf concurrency bug detection tool and then inserts codes to use thread-local caches instead of the shared memory. When threads differently modify their caches, it is unclear which value should be written back to the shared memory. To solve this issue, the system lets programmers write an assert() statement to express their requirement for values in the shared memory. We evaluated our system with several examples and demonstrated its ability to fix data races that existing serialization-based methods cannot.}, pages = {16--16}, title = {Automatically Fixing Data Races in CUDA Programs by Building Thread-local Cache}, volume = {17}, year = {2024} }