-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
[SOT] Cleanup legacy flags and policies #71279
[SOT] Cleanup legacy flags and policies #71279
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
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.
Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
python/paddle/jit/sot/translate.py:97
- [nitpick] The renaming from 'impl_sot' to 'impl' results in a generic function name that may reduce clarity regarding its role in handling symbolic translation. Consider a more descriptive name such as 'translated_function'.
def impl(*args: P.args, **kwargs: P.kwargs) -> R:
test/sot/test_sot_cost_model.py:1
- [nitpick] The removal of this test file may reduce the coverage for cost model functionality. Please verify that the critical behaviors are adequately covered in other test suites.
# Removed entire test file
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.
PR Overview
This PR cleans up legacy flags and policies in the PaddleSOT code by removing deprecated environment variables, state management, and legacy code paths.
- Removed legacy state logic in symbolic translation (including StepState, impl_sot, and related branches)
- Eliminated outdated environment variables and cost model guards (ENV_COST_MODEL, ENV_CLEAN_CODE, and associated functions)
- Renamed comparison operator mappings and removed is_clean_code checks from code generation functions
Reviewed Changes
File | Description |
---|---|
python/paddle/jit/sot/translate.py | Removed legacy dynamic mode logic and simplified symbolic translation function |
python/paddle/jit/sot/utils/envs.py | Removed legacy environment variable declarations and cost model guard |
python/paddle/jit/sot/utils/utils.py | Cleaned up legacy cost model logic and state management in StepInfo and StepInfoManager |
python/paddle/jit/sot/opcode_translator/executor/opcode_executor.py | Renamed and updated comparison operator mapping for clarity |
python/paddle/jit/sot/opcode_translator/executor/pycode_generator.py | Removed conditional checks using the legacy is_clean_code flag |
python/paddle/jit/sot/utils/init.py | Updated module exports by removing deprecated flags |
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (7)
python/paddle/jit/sot/translate.py:98
- [nitpick] Renaming 'impl_sot' to 'impl' may reduce clarity regarding its role; consider either adopting a more descriptive name or updating documentation to reflect this change.
def impl(*args: P.args, **kwargs: P.kwargs) -> R:
python/paddle/jit/sot/utils/envs.py:27
- Removal of the ENV_COST_MODEL flag requires verifying that no remaining code depends on its behavior.
ENV_COST_MODEL = BooleanEnvironmentVariable("COST_MODEL", False)
python/paddle/jit/sot/utils/envs.py:30
- Removal of the ENV_CLEAN_CODE flag mandates a check that all code paths previously controlled by this flag have been fully refactored.
ENV_CLEAN_CODE = BooleanEnvironmentVariable("CLEAN_CODE", False)
python/paddle/jit/sot/utils/utils.py:403
- The extensive removal of legacy cost model logic and state management in StepInfo (and its use in StepInfoManager) should be verified to ensure that no external modules still depend on the removed functionality.
class StepInfo:
python/paddle/jit/sot/opcode_translator/executor/opcode_executor.py:115
- [nitpick] Renaming the operator mapping from SUPPORT_COMPARE_OP to COMPARE_OP_NAME_TO_FN enhances clarity; ensure that all references to the old name have been updated accordingly.
COMPARE_OP_NAME_TO_FN = {
python/paddle/jit/sot/opcode_translator/executor/pycode_generator.py:516
- The removal of the is_clean_code check in the eval frame enabling/disabling functions changes their behavior; confirm that this change is intentional and that tests cover the new logic.
if is_clean_code():
python/paddle/jit/sot/utils/init.py:14
- Removal of legacy flag exports from the module init requires ensuring that no external code depends on these now-deprecated public APIs.
from .envs import (
PR Category
Execute Infrastructure
PR Types
Devs
Description
清理过时的 flags 和策略
PCard-66972