CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
[SOT][Faster Guard] add InstanceCheckGuard
#69975
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][Faster Guard] add InstanceCheckGuard
#69975
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 12 out of 27 changed files in this pull request and generated no suggestions.
Files not reviewed (15)
- paddle/fluid/pybind/jit.cc: Language not supported
- paddle/fluid/pybind/sot/guards.cc: Language not supported
- paddle/fluid/pybind/sot/guards.h: Language not supported
- python/paddle/jit/sot/opcode_translator/executor/variables/container.py: Evaluated as low risk
- test/sot/test_enumerate.py: Evaluated as low risk
- test/sot/test_builtin_map.py: Evaluated as low risk
- test/sot/test_builtin_dispatch.py: Evaluated as low risk
- test/sot/test_builtin_range.py: Evaluated as low risk
- test/sot/test_dtype.py: Evaluated as low risk
- test/sot/test_04_list.py: Evaluated as low risk
- test/sot/test_12_for_loop.py: Evaluated as low risk
- test/sot/test_builtin_bool.py: Evaluated as low risk
- test/sot/test_05_dict.py: Evaluated as low risk
- test/sot/test_21_global.py: Evaluated as low risk
- test/sot/test_15_slice.py: Evaluated as low risk
Comments skipped due to low confidence (1)
python/paddle/jit/sot/opcode_translator/executor/variables/basic.py:1047
- The string should be "id(type({{}})) == id(type(slice))" to correctly match the type.
FasterStringifiedExpression("id(type({{}}) == id(type(slice))", paddle.framework.core.TypeMatchGuard(slice), [frame_value_tracer], frame_value_tracer.free_vars,)
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 12 out of 27 changed files in this pull request and generated 1 suggestion.
Files not reviewed (15)
- paddle/fluid/pybind/jit.cc: Language not supported
- paddle/fluid/pybind/sot/guards.cc: Language not supported
- paddle/fluid/pybind/sot/guards.h: Language not supported
- test/sot/test_18_tensor_method.py: Evaluated as low risk
- test/sot/test_04_list.py: Evaluated as low risk
- test/sot/test_12_for_loop.py: Evaluated as low risk
- test/sot/test_21_global.py: Evaluated as low risk
- test/sot/test_15_slice.py: Evaluated as low risk
- test/sot/test_dtype.py: Evaluated as low risk
- test/sot/test_builtin_dispatch.py: Evaluated as low risk
- test/sot/test_05_dict.py: Evaluated as low risk
- test/sot/test_builtin_map.py: Evaluated as low risk
- test/sot/test_builtin_bool.py: Evaluated as low risk
- test/sot/test_14_operators.py: Evaluated as low risk
- test/sot/test_07_unpack.py: Evaluated as low risk
python/paddle/jit/sot/opcode_translator/executor/variables/basic.py
Outdated
Show resolved
Hide resolved
…ic.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ard_ContainerVariable
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 5 out of 19 changed files in this pull request and generated no suggestions.
Files not reviewed (14)
- paddle/fluid/pybind/jit.cc: Language not supported
- paddle/fluid/pybind/sot/guards.cc: Language not supported
- paddle/fluid/pybind/sot/guards.h: Language not supported
- python/paddle/jit/sot/opcode_translator/executor/variables/container.py: Evaluated as low risk
- test/sot/test_05_dict.py: Evaluated as low risk
- test/sot/test_side_effects.py: Evaluated as low risk
- test/sot/test_dtype.py: Evaluated as low risk
- test/sot/test_builtin_dispatch.py: Evaluated as low risk
- test/sot/test_04_list.py: Evaluated as low risk
- test/sot/test_12_for_loop.py: Evaluated as low risk
- test/sot/test_builtin_bool.py: Evaluated as low risk
- test/sot/test_builtin_map.py: Evaluated as low risk
- test/sot/test_15_slice.py: Evaluated as low risk
- test/sot/test_14_operators.py: Evaluated as low risk
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.
frame_value_tracer.free_vars, | ||
) | ||
len_guard = StringifiedExpression( | ||
if self.get_py_type() is dict: |
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.
TODO: 后续考虑一种更好的方式来消除 if
InstanceCheckGuard
InstanceCheckGuard
PR Category
Execute Infrastructure
PR Types
Performance
Description
InstanceCheckGuard
ContainerVariable
TODO
test_sot_resnet.py
会出现TypeError: collections.OrderedDict is not a sequence
test_sot_export.py
assert 文件不存在(尝试用了test_instruction_translator_cache_context
还是不行)InstanceCheckGuard
暂时不支持isinstance(1, (int, bool))
的情况