Skip to content

Commit

Permalink
Open recompute flag
Browse files Browse the repository at this point in the history
  • Loading branch information
chen2016013 committed Nov 13, 2024
1 parent b2a43a7 commit ceed1ef
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions python/paddle/base/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,11 @@ def _enable_dist_prim_all():


def _enable_auto_recompute():
# NOTE(chenxi67): open recompute when cinn is enabled
from paddle.base.framework import in_cinn_mode

if in_cinn_mode():
return True
flag = os.getenv("FLAGS_enable_auto_recompute")
if flag and flag.lower() in ("1", "true"):
return True
Expand Down

0 comments on commit ceed1ef

Please sign in to comment.