-
Notifications
You must be signed in to change notification settings - Fork 21.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move ShapeEnv config out of dynamo (#112933)
Previously there was a circular dependency between fx and dynamo that happened to work out since ShapeEnv didn't access the config at module init time. Pull Request resolved: #112933 Approved by: https://github.com/ezyang
- Loading branch information
1 parent
b4dbb02
commit 65ecb36
Showing
15 changed files
with
82 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import os | ||
import sys | ||
|
||
# [@compile_ignored: debug] Uses z3 for validating the guard optimizations transformations. | ||
translation_validation = ( | ||
os.environ.get("TORCHDYNAMO_TRANSLATION_VALIDATION", "0") == "1" | ||
) | ||
# Timeout (in milliseconds) for z3 finding a solution. | ||
# [@compile_ignored: debug] | ||
translation_validation_timeout = int( | ||
os.environ.get("TORCHDYNAMO_TRANSLATION_VALIDATION_TIMEOUT", "600000") | ||
) | ||
# Disables bisection for translation validation. | ||
# | ||
# Translation validation bisection is enabled by default, if translation validation | ||
# is also enabled. This should help finding guard simplification issues. However, | ||
# since validation uses Z3 for bisecting, it might take a lot of time. | ||
# | ||
# Set this configuration option so as to avoid bisecting. | ||
# [@compile_ignored: debug] | ||
translation_validation_no_bisect = ( | ||
os.environ.get("TORCHDYNAMO_TRANSLATION_NO_BISECT", "0") == "1" | ||
) | ||
# Checks whether replaying ShapeEnv events on a freshly constructed one yields | ||
# the a ShapeEnv with the same state. This should be used only in testing. | ||
check_shape_env_recorded_events = False | ||
|
||
|
||
# [@compile_ignored: debug] Show a warning for every specialization | ||
print_specializations = False | ||
|
||
# wraps (un)equalities with 'Not' class after recording the correct expression | ||
# in the FX graph. This should incorrectly construct the divisible and replacement | ||
# lists, and incorrectly issue guards. | ||
inject_EVALUATE_EXPR_flip_equality_TESTING_ONLY = False | ||
|
||
from torch.utils._config_module import install_config_module | ||
|
||
install_config_module(sys.modules[__name__]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters