Skip to content
Open
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: 3 additions & 3 deletions src/kernelbench/timing.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def time_execution_with_cuda_event(
# Warm ups
for _ in range(num_warmup):
kernel_fn(*args)
torch.cuda.synchronize(device=device)
torch.cuda.synchronize(device=device)

# note this only release PyTorch’s CUDA caching allocator, not necessarily clearing device's L2 cache
torch.cuda.empty_cache()
Expand Down Expand Up @@ -465,7 +465,7 @@ def time_execution_with_host_time(
# Warm ups
for _ in range(num_warmup):
kernel_fn(*args)
torch.cuda.synchronize(device=device)
torch.cuda.synchronize(device=device)

print(f"[Profiling] Using device: {device} {torch.cuda.get_device_name(device)}, warm up {num_warmup}, trials {num_trials}")
elapsed_times = []
Expand Down Expand Up @@ -534,7 +534,7 @@ def time_execution_with_nsight_python(
# Warm ups
for _ in range(num_warmup):
kernel_fn(*args)
torch.cuda.synchronize(device=device)
torch.cuda.synchronize(device=device)

# Clear cache for cold start
torch.cuda.empty_cache()
Expand Down