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 Dec 15, 2023
1 parent 4103eb6 commit c3e341c
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 c3e341c

Please sign in to comment.