-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[Prim] Filter tensor type for int_array and scalar input in composite rule #51208
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
Actually, tensor type for int_arrary and scalar is not legacy type, it just not suitable for composite for now. We may find a way to limit this during dy2st process |
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.
Add a unit test to check if it can raise error correctly
raise ValueError( | ||
f'No value found for {arg_name} of {arg_type} type for operator {op.type}.' | ||
) | ||
for item in ("tensor_name", "tensor_name"): |
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.
why?
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.
it's a typo. Fixed.
c7b1108
to
848f6e7
Compare
848f6e7
to
2a78275
Compare
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.
LGTM
PR types
Bug fixes
PR changes
Others
Describe
Tensor type for int_array and scalar input will cause dynamic shape in static mode, but composite rule does not support currently.
As for arg "shape" of int_array type. It may be one of [list/tuple of int, tensor]. The former is widely used actually, while the latter is rarely used and will cause dynamic shape in static mode which needs extra unnecessary process. Thus, it would be better to filter it in composite rules.