Skip to content

Commit

Permalink
check if prefetch_pipeline is None or False (pytorch#1450)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: pytorch#1450

The flag prefetch_pipeline can be None. So we can't only check if it's False.

Reviewed By: YLGH

Differential Revision: D50398167

fbshipit-source-id: f2a6f897e499bbd6a99d8cc7f98ebd65d590ca12
  • Loading branch information
henrylhtsang authored and facebook-github-bot committed Oct 18, 2023
1 parent abe5bfd commit 2d595ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torchrec/distributed/planner/shard_estimators.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def estimate(
else False
)
# TODO: remove after deprecating fused_params in sharder
if prefetch_pipeline is False:
if not prefetch_pipeline:
prefetch_pipeline = (
sharder.fused_params.get("prefetch_pipeline", False)
if hasattr(sharder, "fused_params") and sharder.fused_params
Expand Down

0 comments on commit 2d595ea

Please sign in to comment.