Skip to content
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

fix matmul error when input's dim is 3 #36849

Merged
merged 1 commit into from
Oct 29, 2021
Merged

fix matmul error when input's dim is 3 #36849

merged 1 commit into from
Oct 29, 2021

Conversation

baoachun
Copy link
Contributor

@baoachun baoachun commented Oct 29, 2021

PR types

Bug fixes

PR changes

Others

Describe

op_teller修改原因:
1、out_dtype属性与reduce_all无关。该属性在ReduceOpMaker中定义为必填项,但业务模型现在有该属性为空的情况。
2、如果有out_dtype属性则只支持输入和输出为相同数据类型,也就是-1,tensorrt的IReduceLayer没有转换数据类型的功能;如果没有该属性,则默认相同,能进trt。

matmul修改原因:
1、当matmul的alpha属性小于1时会在后面加scale层,但是scale只支持静态shape输入维度大于2,动态shape输入维度大于3,否则输出的nbDims会为-1。
2、添加单测cover上述情况。

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

Copy link
Member

@shangzhizhou shangzhizhou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shangzhizhou shangzhizhou merged commit f6b4ed2 into PaddlePaddle:develop Oct 29, 2021
@baoachun baoachun deleted the fix_matmul_dim_error branch October 29, 2021 09:15
ghost pushed a commit to piotrekobi/Paddle that referenced this pull request Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants