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

About the time test #1

Closed
kakaxi314 opened this issue Feb 9, 2019 · 2 comments
Closed

About the time test #1

kakaxi314 opened this issue Feb 9, 2019 · 2 comments

Comments

@kakaxi314
Copy link

I found you directly used time.time() to calculate time in your code.
However, it's not accurate in GPU mode.
torch.cuda.synchronize() should be added to get precise time.
From my test, the jit version is a little slower in fact?

@laggui
Copy link
Owner

laggui commented Feb 9, 2019

Yes, I just wanted to get a quick idea of the timings for testing purposes. But with your suggestion I will check this out using torch.cuda.synchronize() to get a more precise timing.

Thanks a lot for the suggestion! I'll get back to you with the updated results, as I am interested in comparing the timing performance between the two :)

@laggui
Copy link
Owner

laggui commented Feb 12, 2019

@kakaxi314 I just updated the repo and the results. My Torch Script model is, on average, very slightly faster (excluding the first forward pass). But honestly the difference is a lot more minimal than I would have hoped!

@laggui laggui closed this as completed Feb 12, 2019
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

2 participants