Skip to content

Commit

Permalink
Add new Macro to count ops and time lazy tracing (#112679)
Browse files Browse the repository at this point in the history
Fixes #ISSUE_NUMBER

Pull Request resolved: #112679
Approved by: https://github.com/alanwaketan
  • Loading branch information
JackCaoG authored and pytorchmergebot committed Nov 4, 2023
1 parent 075cb6b commit 042445b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions torch/csrc/lazy/core/metrics.h
Original file line number Diff line number Diff line change
Expand Up @@ -278,5 +278,9 @@ class TORCH_API TimedSection {
new torch::lazy::Metric(name, torch::lazy::MetricFnTime); \
torch::lazy::TimedSection timed_section(timed_metric)

#define TORCH_LAZY_FN_COUNTER_TIMED_TRACING(ns) \
TORCH_LAZY_FN_COUNTER(ns); \
TORCH_LAZY_TIMED("LazyTracing")

} // namespace lazy
} // namespace torch

0 comments on commit 042445b

Please sign in to comment.