Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions iree/turbine/kernel/boo/driver/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,8 +547,14 @@ def pause_and_collect_mem():
)
pause_and_collect_mem()
if prof is not None:
for device in devices:
torch.cuda.synchronize(device)
prof.step()

# Ensure all GPU work and profiler cleanup is complete before returning.
# Without this, subsequent profiling sessions may lose events.
pause_and_collect_mem()

if results is None:
results = ()
if isinstance(results, torch.Tensor):
Expand Down
Loading