File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -643,6 +643,7 @@ def run_node(self, n: torch.fx.Node):
643
643
# We need to restore this metric count later, so save it in a separate variable
644
644
dynamo_extract_graph_helper_metric_count = metrics .counter_value (
645
645
'DynamoExtractCompiledGraph' )
646
+ uncached_compile_metric_count = metrics .counter_value ('UncachedCompile' )
646
647
647
648
metrics .clear_counters ()
648
649
result = super ().run_node (n )
@@ -681,6 +682,8 @@ def all_tensors_on_xla_device(value):
681
682
# Restore this metric counter
682
683
torch_xla ._XLAC ._xla_increment_counter (
683
684
'DynamoExtractCompiledGraph' , dynamo_extract_graph_helper_metric_count )
685
+ torch_xla ._XLAC ._xla_increment_counter ('UncachedCompile' ,
686
+ uncached_compile_metric_count )
684
687
685
688
return result
686
689
@@ -725,6 +728,7 @@ def allow_cpu_device(self, node: torch.fx.Node):
725
728
726
729
def extract_compiled_graph (xla_model : torch .fx .GraphModule , xla_args ):
727
730
torch_xla ._XLAC ._xla_increment_counter ('DynamoExtractCompiledGraph' , 1 )
731
+ torch_xla ._XLAC ._xla_increment_counter ('UncachedCompile' , 1 )
728
732
729
733
with torch_xla .experimental .eager_mode_context (False ):
730
734
return extract_compiled_graph_helper (xla_model , xla_args )
You can’t perform that action at this time.
0 commit comments