fix: Ensure CUPTI flushes events before stopping CPU profiler; update timestamp handling to use microseconds

This commit is contained in:
Littlefisher
2025-10-27 20:05:45 -07:00
parent 05ca05aa7c
commit f5ee20e333
2 changed files with 118 additions and 42 deletions

View File

@@ -184,6 +184,10 @@ class GPUPerf:
print(f"Error running command: {e}", file=sys.stderr)
return_code = 1
finally:
# Give CUPTI time to flush remaining buffered events
# CUPTI may continue recording events after target exits
time.sleep(0.5)
# Stop CPU profiler if running
self.stop_cpu_profiler()