Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix inaccurate timing with time.time() by using CUDA events for bette… #50

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Phoenix8215
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant