-
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
[Tensor Operants & Prim] Tensor arithmetic operants support right scalar type #50563
[Tensor Operants & Prim] Tensor arithmetic operants support right scalar type #50563
Conversation
… support_add_minus_divide
… support_add_minus_divide
… support_scalar_type
… support_scalar_type
你的PR提交成功,感谢你对开源项目的贡献! |
… support_scalar_type
… support_scalar_type
2d26e3a
to
04dbf27
Compare
'fill_constant', | ||
'elementwise_mul', | ||
'fill_constant', | ||
'elementwise_add', | ||
'elementwise_mul', |
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.
这里是不重复了?
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.
此处表示的是算子的调用顺序,并未重复
Here represents the order of calling operators.
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.
one comment
- add | ||
- subtract | ||
- multiply | ||
- divide | ||
- unsqueeze | ||
- pow |
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.
maybe we don't need this?
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 函数,可以直接调用 + 运算符。
但是重载后的 + 操作,实际依赖的还是 add 函数,因此需要保留这几项,自动生成 add 函数的声明。
Although users could invoke the +
operant directly without calling the add
function, in fact, the overloaded +
operant relies on the add
function. Hence, we need to keep these items to generate an add
declaration automatically.
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
New features
PR changes
Others
Describe
本 PR 工作项点:
Items of this PR:
Tensor +-*/ Scalar