Skip to content

Commit c64ed1e

Browse files
oulgenfacebook-github-bot
authored andcommitted
Add logging for num_triton_bundles
Summary: X-link: pytorch/pytorch#139807 Adding logs for number of inductor cache triton bundles Reviewed By: masnesral Differential Revision: D65490826 fbshipit-source-id: f4c2d9009196c16e4b947ad0449483747b633251
1 parent 3d3b7bb commit c64ed1e

File tree

1 file changed

+6
-0
lines changed
  • userbenchmark/dynamo/dynamobench/_dynamo

1 file changed

+6
-0
lines changed

userbenchmark/dynamo/dynamobench/_dynamo/utils.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@
144144
lambda: collections.defaultdict(float)
145145
)
146146

147+
codecache_metrics: Counter[str] = collections.Counter()
148+
147149
timer_counter = itertools.count()
148150

149151

@@ -419,6 +421,9 @@ def dynamo_timed(
419421
remote_cache_time_saved_s=remote_cache_time_saved,
420422
structured_logging_overhead_s=structured_logging_overhead_s,
421423
is_forward=False, # is_forward
424+
num_triton_bundles=codecache_metrics.get(
425+
"num_triton_bundles", None
426+
),
422427
remote_fx_graph_cache_get_time_ms=to_int_ms(
423428
remote_fx_graph_cache_get_time
424429
),
@@ -899,6 +904,7 @@ class CompilationMetrics:
899904
specialize_float: Optional[bool] = None
900905
dynamo_config: Optional[str] = None
901906
is_forward: Optional[bool] = None
907+
num_triton_bundles: Optional[int] = None
902908
remote_fx_graph_cache_get_time_ms: Optional[int] = None
903909
remote_fx_graph_cache_put_time_ms: Optional[int] = None
904910
start_time_us: Optional[int] = None

0 commit comments

Comments
 (0)