Skip to content

Commit cb70721

Browse files
wujingyuet-viKaelanDt
authored
Record last_trace_cache_stop when miss the cache (Lightning-AI#2675)
Co-authored-by: Thomas Viehmann <[email protected]> Co-authored-by: KaelanDt <[email protected]>
1 parent 02cae54 commit cb70721

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

thunder/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,7 @@ def get_computation_and_inputs(*args, **kwargs):
729729

730730
# Updates cache statistics
731731
cs.cache_hits += 1
732+
cs.last_trace_cache_stop = time.perf_counter_ns()
732733
cs.last_traces = comp_traces
733734
cs.last_interpreted_instructions = None
734735
cs.last_interpreter_log = None
@@ -759,6 +760,7 @@ def get_computation_and_inputs(*args, **kwargs):
759760

760761
# Updates cache statistics
761762
cs.cache_hits += 1
763+
cs.last_trace_cache_stop = time.perf_counter_ns()
762764
cs.last_traces = comp_traces
763765
cs.last_interpreted_instructions = None
764766
cs.last_interpreter_log = None

0 commit comments

Comments
 (0)