-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Add CPU time and MemCopy to the timeline. #8679
Conversation
std::string MemcpyKind(CUpti_ActivityMemcpyKind kind) { | ||
switch (kind) { | ||
case CUPTI_ACTIVITY_MEMCPY_KIND_HTOD: | ||
return "MEMCPYHtoD"; |
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 just HtoD
is ok? There are many duplicates MEMCPY
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.
Done
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 Added it back. User can search MEMCPY to find all copy.
@@ -15,12 +15,17 @@ limitations under the License. */ | |||
syntax = "proto2"; | |||
package paddle.platform.proto; | |||
|
|||
message MemCopy { optional uint64 bytes = 3; } |
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.
why start from 3?
event->set_start_ns(r.start_ns); | ||
event->set_end_ns(r.end_ns); | ||
event->set_stream_id(r.thread_id); | ||
event->set_device_id(-1); |
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.
use a const value to represent CPU instead of -1
, like
const kCpuDeviceId = -1;
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.
LGTM
No description provided.