Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[RUNTIME] Add device specific timers #7472
[RUNTIME] Add device specific timers #7472
Changes from 13 commits
3ff15d6
7fa2c75
32f020f
132e6fa
a78bd68
86c3786
0f04bf6
e339606
e2b3617
3a3ec38
b764f53
5f69c8d
a37bf4a
b34847c
15f8a7d
580d671
4559634
88577cc
718556e
0e2a4f4
78c8d14
2702ed3
71df7c9
83d711f
a12bd7d
9a401fc
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe include a comment that this calls TVMSynchronize under the hood (I think?)? and update the declaration below too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does not call TVMSynchronize under the hood. Only the
DefaultTimer
does that.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider remove these member functions.
Given we already have timer->Stop() and timer->SyncAndGetElapsedNanos() to avoid one level of indirection.
This is also the approaches we use in latest added objects
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like including these methods as they document the timer interface.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these methods are also presented in the node and documentations are there as well. Removing the methods indirection would make the code more consistent with the reference usage of the rest of the codebase.
It also reduces the confusion of two possible ways to do the same thing.
Adding a link \sa link, as well as code examples in the Timer class would resolved the usage problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I based all of this off of how
Pass
does things. And it takes this same approach.The API here is
Timer
notTimerNode
. These methods are the interface. Having these convenience methods also provides autocompletion for people who rely on it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make static on Timer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think its ok to leave it as a separate function.