Skip to content
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] Simplify the logic for setting VariableBase's debug_name #71251

Merged
merged 4 commits into from
Feb 28, 2025

Conversation

GoldenStain
Copy link
Contributor

@GoldenStain GoldenStain commented Feb 24, 2025

PR Category

User Experience

PR Types

Improvements

Description

如果一个debug_name没有有价值的内容,那我们就舍弃它。

PCard-66972

Copy link

paddle-bot bot commented Feb 24, 2025

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@GoldenStain GoldenStain changed the title [SOT][3.13] Modify the logic for setting VariableBase's debug_name [SOT] Modify the logic for setting VariableBase's debug_name Feb 24, 2025
@SigureMo SigureMo requested a review from Copilot February 27, 2025 02:49

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

This PR refactors the logic for setting VariableBase's debug_name to automatically infer a value from the tracker instead of accepting an explicit debug_name parameter. Key changes include:

  • Removal of the debug_name parameter and its explicit assignment in the from_value functions.
  • Introduction of infer_debug_name_from_tracker to generate debug names based on tracker type.
  • Removal of explicit debug_name updates within OpcodeExecutor and adjustments to related tests.

Reviewed Changes

File Description
python/paddle/jit/sot/opcode_translator/executor/variables/base.py Refactored debug_name initialization and removed the debug_name parameter.
python/paddle/jit/sot/opcode_translator/executor/function_graph.py Updated from_value call to no longer pass debug_name.
python/paddle/jit/sot/opcode_translator/executor/variables/basic.py Removed redundant debug_name property in favor of the new mechanism.
python/paddle/jit/sot/opcode_translator/executor/opcode_executor.py Removed explicit assignments of debug_name to rely on the inferred value.

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

Copy link
Member

@SigureMo SigureMo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTMeow 🐾

@SigureMo SigureMo changed the title [SOT] Modify the logic for setting VariableBase's debug_name [SOT] Simplify the logic for setting VariableBase's debug_name Feb 27, 2025
@SigureMo SigureMo changed the title [SOT] Simplify the logic for setting VariableBase's debug_name [SOT] Simplify the logic for setting VariableBase's debug_name Feb 28, 2025
@SigureMo SigureMo merged commit 69e1e21 into PaddlePaddle:develop Feb 28, 2025
34 checks passed
Enigmatisms pushed a commit to Enigmatisms/Paddle that referenced this pull request Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants