From 3977ff01a3827765f3adb808d6a0d2933a726ee8 Mon Sep 17 00:00:00 2001 From: Yukio Siraichi Date: Fri, 15 Dec 2023 07:31:42 -0300 Subject: [PATCH] Remove branch on undefined variable. (#6072) --- benchmarks/experiment_runner.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/benchmarks/experiment_runner.py b/benchmarks/experiment_runner.py index 7a7888f94b2..eb76a883843 100644 --- a/benchmarks/experiment_runner.py +++ b/benchmarks/experiment_runner.py @@ -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