Skip to content

Commit

Permalink
disable contextlib in PT2 train pipeline (#2730)
Browse files Browse the repository at this point in the history
Summary:

    Pull Request resolved: #2596

# context
* more details in the [post](https://fb.workplace.com/groups/1075192433118967/permalink/1587079018596970/)
* disable contextlib with PT2

Differential Revision: D68480678
  • Loading branch information
TroyGarden authored and facebook-github-bot committed Feb 6, 2025
1 parent 9269e73 commit 9481e26
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions torchrec/distributed/train_pipeline/train_pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ def progress(self, dataloader_iter: Iterator[In]) -> Out:

# Mandatory dynamo configuration for Torchrec PT2 compilation
torch._dynamo.config.capture_scalar_outputs = True
torch._dynamo.config.enable_trace_contextlib = False
torch._dynamo.config.capture_dynamic_output_shape_ops = True
torch._dynamo.config.force_unspec_int_unbacked_size_like_on_torchrec_kjt = (
True
Expand Down

0 comments on commit 9481e26

Please sign in to comment.