Hi @okankop 🥰
In the current code, the timing of the model's forward pass is measured using time.time(). However, this method is not accurate for measuring GPU operations, as it does not account for GPU-specific delays or synchronization.
I have replaced the time.time() approach with the more accurate torch.cuda.Event timing method. CUDA events are specifically designed for high-precision timing on GPUs and can provide more reliable measurements of GPU operations.
I appreciate your time and effort in reviewing this PR. Thank you!
Hi @okankop 🥰 In the current code, the timing of the model's forward pass is measured using time.time(). However, this method is not accurate for measuring GPU operations, as it does not account for GPU-specific delays or synchronization.
I have replaced the time.time() approach with the more accurate torch.cuda.Event timing method. CUDA events are specifically designed for high-precision timing on GPUs and can provide more reliable measurements of GPU operations.
I appreciate your time and effort in reviewing this PR. Thank you!