pytorch / pytorch/pytorch

When augment_with_fx_traces=True but the user has misconfigured the FX config, raise an error

Open
#169,797 0 comments 0 reactions 1 assignee Claimed by @yushangdi View on GitHub
module: fx oncall: profiler triaged
Dominant language
Python
Stars
103k
Forks
29.6k
PR merge metrics
PR metrics pending

Description

### 🐛 Describe the bug

If you dump memory profile with augment_with_fx_traces=True but you don't set torch.fx.experimental._config.enrich_profiler_metadata (or better yet, you accidentally use the dead dynamo version of the config), you will just silently not get any augmentation. This is bad, we should say something if this occurs. I think probably the most appropriate place to give the info is in the memory viz itself; in particular, when we detect a legacy FX filename in the trace (e.g., `eval_with_key`) we should display some help text saying how to get augmented information. The memory profile should also say if augment_with_fx_traces was set so we correctly report if you need to pass that info or not. Also... maybe we should just default augment_with_fx_traces True, if there isn't a reason not to?

cc @robieta @chaekit @guotuofeng @guyang3532 @dzhulgakov @davidberard98 @briancoutinho @sraikund16 @sanrise @mwootton @EikanWang @jgong5 @wenzhe-nrv @yushangdi

### Versions

main

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.