[QPL] move metadata logging to markerEnd for model run QPL (#65451)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/65451
This diff moved metadata logging from marker start to marker end. This should improve perf because we can skip metadata logging when mark is not sampled (using isMarkerOn)
Test Plan:
Verified metadata are logged: https://fburl.com/scuba/qpl_metrics/pytorch_employee/armjgtyw
https://fburl.com/scuba/qpl_metrics/pytorch_employee/zz36zkr1
Reviewed By: xcheng16
Differential Revision: D31105548
fbshipit-source-id: 0eafaaefecb7e230021616e397e548a2fd2b92e9