Skip to content

Commit

Permalink
Remove branch on undefined variable. (#6072)
Browse files Browse the repository at this point in the history
  • Loading branch information
ysiraichi authored and bhavya01 committed Apr 22, 2024
1 parent c1be0ce commit 3977ff0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions benchmarks/experiment_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,7 @@ def collect_profile_to_metrics(self, prof, metrics):
if evt.device_type == DeviceType.CPU:
# in legacy profiler, kernel info is stored in cpu events
if evt.is_legacy:
if not use_device:
total_cuda_time += evt.self_cuda_time_total
total_cuda_time += evt.self_cuda_time_total
elif evt.device_type == DeviceType.CUDA:
# in kineto profiler, there're events with the correct device type (e.g. CUDA)
total_cuda_time += evt.self_cuda_time_total
Expand Down

0 comments on commit 3977ff0

Please sign in to comment.