Skip to content

Commit

Permalink
Don't skip_torchrec when using torchrec PT2 pipeline (pytorch#2298)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: pytorch#2298

We introduced `torch._dynamo.config.skip_torchrec` to control whether tracing into torchrec paths. PT2 pipeline is mainly used for torchrec PT2 compilation, so it should set `skip_torchrec` to False by default

Reviewed By: IvanKobzarev

Differential Revision: D61219995
  • Loading branch information
Microve authored and facebook-github-bot committed Aug 16, 2024
1 parent c3d8c5b commit 8e52908
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 @@ -248,6 +248,7 @@ def progress(self, dataloader_iter: Iterator[In]) -> Out:
torch._dynamo.config.force_unspec_int_unbacked_size_like_on_torchrec_kjt = (
True
)
torch._dynamo.config.skip_torchrec = False

# Importing only before compilation to not slow-done train_pipelines import
torch.ops.import_module("fbgemm_gpu.sparse_ops")
Expand Down

0 comments on commit 8e52908

Please sign in to comment.