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

benchmark.py script suggests adding synchronization locks #54

Open
LPeng625 opened this issue Apr 28, 2023 · 0 comments
Open

benchmark.py script suggests adding synchronization locks #54

LPeng625 opened this issue Apr 28, 2023 · 0 comments

Comments

@LPeng625
Copy link

benchmark.py
It is recommended to add a synchronization lock for calculating fps. The code is as follows:
torch.cuda.synchronize()
tic = time.perf_counter()
model(inputs)
torch.cuda.synchronize()
toc = time.perf_counter()
total_time += toc - tic

thank you!

@LPeng625 LPeng625 reopened this Apr 28, 2023
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

No branches or pull requests

1 participant