-
Notifications
You must be signed in to change notification settings - Fork 25.7k
[dynamo] Deprecate enable_cpp_framelocals_guard_eval config variable - default: True #151008
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…once Flow in the function run_root_guard_manager depends on the value of the enable_cpp_framelocals_guard_eval config variable from the torch._dynamo.config file. Reading this variable each time is time consuming as it requires importing whole module. In order to do it only once, the local variable enable_cpp_framelocals_guard_eval is converted into a static one and is initialized with the value read from the config file. Local microbenchmark dynamo_guard_eval.py: - 931.9 us -> 553.7 us (3.10)
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/151008
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 Cancelled JobAs of commit 1de5ffa with merge base 4273e5d ( CANCELLED JOB - The following job was cancelled. Please retry:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@williamwen42 @jansel @anijain2305 |
|
@pytorchbot label "topic: not user facing" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We had a bunch of issues in the past involving loading modules statically, which is why I'm loading every time (cpython also caches these imports, so we're not actually doing the full import every time).
I also haven't received any complaints about this feature recently, so we could just deprecate this config.
…- default: True Reading the feature enabling param enable_cpp_framelocals_guard_eval at the CPP level is time consuming and slows down the operation of the dynamo as it is done every time the function using this param is called. Reading the value only once at init isn’t an option as it would disable the modification of this param at the runtime. Since this feature is enabled by default for some time and it doesn’t cause known issues, the enable_cpp_framelocals_guard_eval configuration param will be deprecated by this commit and its value is hardcoded to true.
|
Updated the PR with the patch deprecating the |
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: 1 jobs have failed, first few of them are: trunk / macos-py3-arm64 / build Details for Dev Infra teamRaised by workflow job |
|
@pytorchbot merge -i |
Merge startedYour change will be merged while ignoring the following 1 checks: trunk / macos-py3-arm64 / build Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
…- default: True (pytorch#151008) [dynamo] Deprecate enable_cpp_framelocals_guard_eval config variable - default: True Reading the feature enabling param `enable_cpp_framelocals_guard_eval `at the CPP level is time consuming and slows down the operation of the dynamo as it is done every time the function using this param is called. Reading the value only once at init isn’t an option as it would disable the modification of this param at the runtime. Since this feature is enabled by default for some time and it doesn’t cause known issues, the `enable_cpp_framelocals_guard_eval `configuration param will be deprecated by this commit and its value is hardcoded to true. Local microbenchmark dynamo_guard_eval.py: - 931.9 us -> 538.9 us (3.10) @williamwen42 @jansel @anijain2305 Pull Request resolved: pytorch#151008 Approved by: https://github.com/williamwen42
…- default: True (pytorch#151008) [dynamo] Deprecate enable_cpp_framelocals_guard_eval config variable - default: True Reading the feature enabling param `enable_cpp_framelocals_guard_eval `at the CPP level is time consuming and slows down the operation of the dynamo as it is done every time the function using this param is called. Reading the value only once at init isn’t an option as it would disable the modification of this param at the runtime. Since this feature is enabled by default for some time and it doesn’t cause known issues, the `enable_cpp_framelocals_guard_eval `configuration param will be deprecated by this commit and its value is hardcoded to true. Local microbenchmark dynamo_guard_eval.py: - 931.9 us -> 538.9 us (3.10) @williamwen42 @jansel @anijain2305 Pull Request resolved: pytorch#151008 Approved by: https://github.com/williamwen42
[dynamo] Deprecate enable_cpp_framelocals_guard_eval config variable - default: True
Reading the feature enabling param
enable_cpp_framelocals_guard_evalat the CPP level is time consuming and slows down the operation of the dynamo as it is done every time the function using this param is called. Reading the value only once at init isn’t an option as it would disable the modification of this param at the runtime. Since this feature is enabled by default for some time and it doesn’t cause known issues, theenable_cpp_framelocals_guard_evalconfiguration param will be deprecated by this commit and its value is hardcoded to true.Local microbenchmark dynamo_guard_eval.py:
@williamwen42 @jansel @anijain2305
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @chauhang @amjames