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:

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

Differential Revision: D50398167
  • Loading branch information
hlhtsang authored and facebook-github-bot committed Oct 18, 2023
1 parent abe5bfd commit 207ef73
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 207ef73

Please sign in to comment.