Skip to content

Commit

Permalink
Add Metadata for Annotation (#1031)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #1031

We recently extended annotations for on-demand to the end of a profile if the annotation does not finish by then. This is useful to know where the tracing ended. However, it is hard to tell when looking to see if the annotation ended as the trace ended or if the annotation ended because of the tracing ended. We add this extra metadata to deliniate this

Reviewed By: sanrise

Differential Revision: D68864115

fbshipit-source-id: 6e5e36f3f50fba3ffe0f12478140e8f240b0188e
  • Loading branch information
sraikund16 authored and facebook-github-bot committed Jan 30, 2025
1 parent 09e10ad commit daa5648
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libkineto/src/CuptiActivityProfiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,9 @@ void CuptiActivityProfiler::processCpuTrace(
if (act->type() == ActivityType::USER_ANNOTATION &&
act->duration() <= 0) {
act->endTime = captureWindowEndTime_;
act->addMetadata("finished", "false");
} else {
act->addMetadata("finished", "true");
}
logger.handleActivity(*act);
}
Expand Down

0 comments on commit daa5648

Please sign in to comment.