Module view did not show up
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 992
- Forks
- 270
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 12
Description
I tried to profile the bevfusion model with below code (with_modules=True). After run the inference and started the tensorboard, the Module view did not show in the View drop list. The Overview, Operator, GPU kernel, Trace, and Memory view worked properly.
Can anyone help figure out what is wrong?
import mmcv
import torch
import torch.profiler
from datetime import datetime
def single_gpu_test(model, data_loader):
model.eval()
results = []
dataset = data_loader.dataset
prog_bar = mmcv.ProgressBar(len(dataset))
## dpan: add profiler to collect performance data
now = datetime.now()
date_time_string = now.strftime("%Y%m%d%H%M%S")
profiler_log = "/home/adlink/tensorboard/Profiler-" + date_time_string
prof = torch.profiler.profile(
schedule=torch.profiler.schedule(wait=1, warmup=5, active=3, repeat=2),
on_trace_ready=torch.profiler.tensorboard_trace_handler(profiler_log),
record_shapes=True,
profile_memory=True,
with_stack=True,
with_flops=True,
with_modules=True)
prof.start() ## dpan: profiler start
for data in data_loader:
with torch.no_grad():
result = model(return_loss=False, rescale=True, **data)
results.extend(result)
prof.step() ## dpan: Need to call this at the end of each step to notify profiler of steps' boundary
batch_size = len(result)
for _ in range(batch_size):
prog_bar.update()
return results
Python, Torch, and the plugin version:
(bevfusion_mit) adlink@Adlink-RTX3090:~/Downloads/Lidar_AI_Solution/CUDA-BEVFusion/bevfusion$ python --version
Python 3.8.16
(bevfusion_mit) adlink@Adlink-RTX3090:~/Downloads/Lidar_AI_Solution/CUDA-BEVFusion/bevfusion$ pip list | grep torch
pytorch-quantization 2.1.2
torch 1.10.1
torch-tb-profiler 0.4.1
torchaudio 0.10.1
torchinfo 1.8.0
torchpack 0.3.1
torchvision 0.11.2
(bevfusion_mit) adlink@Adlink-RTX3090:~/Downloads/Lidar_AI_Solution/CUDA-BEVFusion/bevfusion$
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the supplied torch.profiler.profile setup with Python 3.8.16, torch 1.10.1, and torch-tb-profiler 0.4.1, then inspect the generated TensorBoard trace and the View dropdown. Focus on the with_modules=True entry point and tensorboard_trace_handler output. Done means identifying why Module view is absent and documenting or validating a reproducible fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100