Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a benchmarking + profiling example to the mila docs #247

Open
2 of 7 tasks
lebrice opened this issue Jun 26, 2024 · 0 comments
Open
2 of 7 tasks

Add a benchmarking + profiling example to the mila docs #247

lebrice opened this issue Jun 26, 2024 · 0 comments

Comments

@lebrice
Copy link
Contributor

lebrice commented Jun 26, 2024

  • Create a new example based on the code of the Wandb example
  • Modify the code to use the ImageNet dataset instead of cifar10 (ask @lebrice for the optimized imagenet recipe for the Mila cluster)
  • Demonstrate how to diagnose whether the dataloading is the bottleneck in the code (compare throughput with/without training)
  • Once we know that the dataloading is not the bottleneck anymore, show the user how to see the GPU utilization metrics from the wandb run page (the GPU utilization would ideally be pretty low here)
  • ...
  • show how to use the pytorch profiler to find a (perhaps artifical) bottleneck in the model code. For example, by making a part of the code use much more VRAM than is required, or perform needless copies, etc. just to demonstrate the idea)
    • The tutorial should instruct people on how to visually inspect the pytorch profiler output window to identify the bottleneck. Ask @obilaniu for some tips on how to do this as needed.
  • Show how the output of the profiler changes once this last bottleneck is fixed. Give hints as to how to keep identifying the next bottleneck, and potential avenues for further optimization (for example using something like torch.compile, or more workers, multiple GPUs, etc.)
  • Create a WandB report showing the metrics before/during/after this optimization/profiling process.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant