CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
[SOT] Add dispatch for min/max(*args)
and add paddle.geometric
to paddle API list
#69746
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] Add dispatch for min/max(*args)
and add paddle.geometric
to paddle API list
#69746
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
@Dispatcher.register_decorator(max) | ||
def dispatch_max_star_args(*args: VariableBase): | ||
if not args: | ||
raise TypeError("max expected 1 arguments, got 0") |
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.
raise TypeError("max expected 1 arguments, got 0") | |
raise TypeError("max expected at least 1 arguments, got 0") |
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 补全的是全的
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 4 out of 4 changed files in this pull request and generated 2 suggestions.
Comments skipped due to low confidence (1)
python/paddle/jit/sot/opcode_translator/executor/variables/container.py:413
- The error message should be 'min() arg is an empty sequence' instead of 'max() arg is an empty sequence'.
raise ValueError("min() arg is an empty sequence")
@Dispatcher.register_decorator(max) | ||
def dispatch_max_star_args(*args: VariableBase): | ||
if not args: | ||
raise TypeError("max expected 1 arguments, got 0") |
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.
The error message "max expected 1 arguments, got 0" is misleading because max
can accept more than one argument. It should be "max expected at least 1 argument, got 0".
raise TypeError("max expected 1 arguments, got 0") | |
raise TypeError("max expected at least 1 argument, got 0") |
Copilot uses AI. Check for mistakes.
@Dispatcher.register_decorator(min) | ||
def dispatch_min_star_args(*args: VariableBase): | ||
if not args: | ||
raise TypeError("min expected 1 arguments, got 0") |
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.
The error message "min expected 1 arguments, got 0" is misleading because min
can accept more than one argument. It should be "min expected at least 1 argument, got 0".
raise TypeError("min expected 1 arguments, got 0") | |
raise TypeError("min expected at least 1 argument, got 0") |
Copilot uses AI. Check for mistakes.
min/max(*args)
and add paddle.geometric
to paddle API listmin/max(*args)
and add paddle.geometric
to paddle API list
min/max(*args)
and add paddle.geometric
to paddle API listmin/max(*args)
and add paddle.geometric
to paddle API list
PR Category
Execute Infrastructure
PR Types
Performance
Description
min/max(*args)
形式的 dispatch,避免打断paddle.geometric
模块添加到组网模块,避免模拟到_C_ops
层导致打断PCard-66972