gpgpu-sim / gpgpu-sim_distribution

GPGPU-Sim provides a detailed simulation model of contemporary NVIDIA GPUs running CUDA and/or OpenCL workloads. It includes support for features such as TensorCores and CUDA Dynamic Parallelism as well as a performance visualization tool, AerialVisoin, and an integrated energy model, GPUWattch.
Other
1.13k stars 511 forks source link

Resolve GCC Warning and Address Potential Bug in Checkpoint Functionality #279

Open LAhmos opened 1 year ago

LAhmos commented 1 year ago

https://github.com/gpgpu-sim/gpgpu-sim_distribution/blob/90ec3399763d7c8512cfe7dc193473086c38ca38/src/cuda-sim/instructions.cc#LL198C40-L198C40

@aamodt @deval281shah We are currently working on minimizing the number of gcc warnings in gpgpusim. During our review, we encountered a specific line of code where the contents of a register are being dumped. However, the problem we encountered is that the union used in this line has the potential to hold data larger than an unsigned long long. which might lead to issues when the checkpoint is used.

To address this issue, we believe it would be beneficial to modify the code and adopt a similar approach to the print_reg function in the ptx_sim.cc file of the gpgpu-sim_distribution repository. You can find the relevant code snippet at this link: https://github.com/gpgpu-sim/gpgpu-sim_distribution/blob/90ec3399763d7c8512cfe7dc193473086c38ca38/src/cuda-sim/ptx_sim.cc#L331.