How to profile a model with DLProf on pythorn ligthning? #12060
Unanswered
Johnsonms
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
Replies: 1 comment
-
@Johnsonms I've never tried this tool, so there might be extra work required, but simply calling nvtx.init(enable_function_stack=True)
with torch.autograd.profiler.emit_nvtx():
- train(args, model, device, train_loader, optimizer, epoch)
- test(model, device, test_loader)
- scheduler.step()
+ trainer.fit(model, data) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Guys:
As this docs https://docs.nvidia.com/deeplearning/frameworks/dlprof-user-guide/#profiling_pytorch_pyprof, we need to do the following to capture the traces, but I don't know where I can place "with torch.autograd.profiler.emit_nvtx():" and " nvtx.init(enable_function_stack=True)" in pytorch lightning:
The doc as follow:
Beta Was this translation helpful? Give feedback.
All reactions