-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
【Hackathon 5th No.103】move fc to phi -part #58777
Conversation
move fc to phi try to fix bug
fc 的单测和带FLAG的单测均通过 |
👍,我来处理下CI和找同事reivew哈~ |
@@ -109,6 +109,16 @@ | |||
func : fast_where_xpu | |||
data_type : x | |||
|
|||
- op : fc | |||
args : (Tensor input, Tensor w, Tensor bias, int in_num_col_dims = 1, str activation_type = "", bool use_mkldnn = false, bool padding_weights = false, bool use_quantizer = false, str mkldnn_data_type = "float32", float scale_in = 1.0f, float[] scale_weights = {1.0f}, float scale_out = 1.0f, bool force_fp32_output = false) |
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.
Tensor input, Tensor w, Tensor bias, int in_num_col_dims = 1, 只保留这四个,其他全挪到extra里
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.
float[] scale_weights = {1.0f}
这个移到extra
里会报错[]
和{}
无法解析
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.
ok
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.
emm,全部移到extra里之后,算子的InferShape会对应不上,如果删掉其他在InferShape的参数属性,就不能对这些属性进行检查了。。。
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.
感觉是不能填入args中没有声明的属性
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.
如果解决不了,就先这样吧~
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.
paddle/phi/kernels/fc_kernel.h
Outdated
namespace phi { | ||
namespace fusion { | ||
template <typename T, typename Context> | ||
void FCKernel(const Context& dev_ctx, |
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.
fuse类算子不需要头文件声明
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
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 for CI-OP-Benchmark
hi同学,这个kernel的迁移到phi存在问题,需要提PR修复下哈,mkldnn相关的参数不需要写到yaml中,也不需要在kernel、infermata的签名中体现。 |
修复前后,与之前的验证方法一样哈 |
PR types
Others
PR changes
Others
Description
move fc to phi
#57262