CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
[SOT][3.13] split certain LOAD_ATTR
in 3.13+ & replace get_items
and flatten_items
withflatten_inner_vars
,while replacing special cases with inheritance & remove method_name attribute in MethodVariable
#70927
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][3.13] split certain LOAD_ATTR
in 3.13+ & replace get_items
and flatten_items
withflatten_inner_vars
,while replacing special cases with inheritance & remove method_name attribute in MethodVariable
#70927
Conversation
LOAD_ATTR
in 3.12+ & replace get_items
and flatten_items
with get_inner_vars
and flatten_inner_vars
LOAD_ATTR
in 3.12+ & replace get_items
and flatten_items
with get_inner_vars
and flatten_inner_vars
,while replacing special cases with inheritance
LOAD_ATTR
in 3.12+ & replace get_items
and flatten_items
with get_inner_vars
and flatten_inner_vars
,while replacing special cases with inheritanceLOAD_ATTR
in 3.12+ & replace get_items
and flatten_items
with get_inner_vars
and flatten_inner_vars
,while replacing special cases with inheritance
python/paddle/jit/sot/opcode_translator/executor/variables/container.py
Outdated
Show resolved
Hide resolved
python/paddle/jit/sot/opcode_translator/executor/opcode_executor.py
Outdated
Show resolved
Hide resolved
python/paddle/jit/sot/opcode_translator/instruction_utils/instruction_utils.py
Outdated
Show resolved
Hide resolved
python/paddle/jit/sot/opcode_translator/instruction_utils/instruction_utils.py
Outdated
Show resolved
Hide resolved
python/paddle/jit/sot/opcode_translator/instruction_utils/instruction_utils.py
Show resolved
Hide resolved
python/paddle/jit/sot/opcode_translator/instruction_utils/instruction_utils.py
Outdated
Show resolved
Hide resolved
LOAD_ATTR
in 3.12+ & replace get_items
and flatten_items
with get_inner_vars
and flatten_inner_vars
,while replacing special cases with inheritanceLOAD_ATTR
in 3.13+ & replace get_items
and flatten_items
with get_inner_vars
and flatten_inner_vars
,while replacing special cases with inheritance
LOAD_ATTR
in 3.13+ & replace get_items
and flatten_items
with get_inner_vars
and flatten_inner_vars
,while replacing special cases with inheritanceLOAD_ATTR
in 3.13+ & replace get_items
and flatten_items
withflatten_inner_vars
,while replacing special cases with inheritance
python/paddle/jit/sot/opcode_translator/executor/variables/basic.py
Outdated
Show resolved
Hide resolved
python/paddle/jit/sot/opcode_translator/executor/variables/iter.py
Outdated
Show resolved
Hide resolved
python/paddle/jit/sot/opcode_translator/executor/variables/iter.py
Outdated
Show resolved
Hide resolved
LOAD_ATTR
in 3.13+ & replace get_items
and flatten_items
withflatten_inner_vars
,while replacing special cases with inheritanceLOAD_ATTR
in 3.13+ & replace get_items
and flatten_items
withflatten_inner_vars
,while replacing special cases with inheritance & remove method_name attribute in MethodVariable
python/paddle/jit/sot/opcode_translator/executor/opcode_executor.py
Outdated
Show resolved
Hide resolved
问题 case 不应该只写在 PR 描述里,应该确保写在单测里,这样我们才能确保后续不会因为遇到相同问题造成回归,只要通过 CI 就能保证没有大问题 而如果 CI 检测不出来,合入之后的天级别、周级别 CE 才检测出来的话,反馈周期长,且会在 develop 影响大量下游场景,在修复完成前都会影响相关模型监控以及相关同学的开发,无论是对于自己负责的模块还是下游模块都会有影响 另一方面,相关 case 写在 CI 里我们才能放心进行代码重构,CI 过了就能拦截 90% 的问题,但如果 CI 单测体系不完备的话,今天刚修的 bug,过几个月再重构代码基本就忘掉了(团队开发更是如此),那没有单测覆盖到的逻辑就可能因此漏掉,后续还要再修一遍,浪费大量人力 这个 case 写在 |
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 Category
Execute Infrastructure
PR Types
Bug fixes
Description
修复Bug
问题case:
在
MIN_GRAPH_SIZE
超过该子图size
的时候,连续两次执行forward
函数会出现缺少位置参数的错误。在test/sot/test_min_graph_size.py中添加了针对此问题的新测试
test_layer_multiple_times
原因
我们生成的字节码中,
LOAD_ATTR
的最低位是1,交给python
执行的时候,在第二次执行时,将原本load
一个method
+NULL
的行为改为了load
一个function
+NULL
,导致函数执行时找不到self
.bug fix
在3.13+中,手动把最低一位为1的
LOAD_ATTR
拆分为LOAD_ATTR
+PUSH_NULL
的组合经过确认,虽然3.12就引入了通过最低位来标志
LOAD_ATTR
执行路径的方式,但是3.12不会出现该问题。get_items
&flatten_items
->flatten_inner_vars
规范接口名称,并且把原来的特判改成了继承。
PCard-66972