-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Closed
Labels
oncall: profilerprofiler-related issues (cpu, gpu, kineto)profiler-related issues (cpu, gpu, kineto)
Description
🐛 Describe the bug
Title
Incorrect devices Parameter Type in benchmark_utilization Function Causes Profiling Errors
🐛 Describe the bug
Passing the devices parameter as a string (e.g., "cuda") instead of a list (e.g., ["cuda"]) in the benchmark_utilization function leads to unexpected behavior and errors during profiling.
Comment
A clear and concise description of what the bug is.
# Sample code to reproduce the problem
import torch
from torch.profiler import ProfilerActivity
def f(a):
return a.sum()
a = torch.rand(2**20, device="cuda")
utilization, mm_conv_utilization = benchmark_utilization(
f,
a,
"tmp",
trace_file_name="tmp_chrome_trace",
devices="cuda" # Incorrect type
)
### Versions
wget https://raw.githubusercontent.com/pytorch/pytorch/main/torch/utils/collect_env.py
cc @robieta @chaekit @aaronenyeshi @guotuofeng @guyang3532 @dzhulgakov @davidberard98 @briancoutinho @sraikund16 @sanriseMetadata
Metadata
Assignees
Labels
oncall: profilerprofiler-related issues (cpu, gpu, kineto)profiler-related issues (cpu, gpu, kineto)