You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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?
Python, Torch, and the plugin version:
The text was updated successfully, but these errors were encountered: