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

add tile_grad composite rule #53141

Merged
merged 2 commits into from
Apr 22, 2023
Merged

add tile_grad composite rule #53141

merged 2 commits into from
Apr 22, 2023

Conversation

ccrrong
Copy link
Contributor

@ccrrong ccrrong commented Apr 20, 2023

PR types

Others

PR changes

Others

Description

add tile_grad composite rule
孟子恒同学原先的pr #52609

@paddle-bot
Copy link

paddle-bot bot commented Apr 20, 2023

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

Copy link
Contributor

@xiaoguoguo626807 xiaoguoguo626807 left a comment

Choose a reason for hiding this comment

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

将之前的pr链接在这个pr下面吧

@ccrrong
Copy link
Contributor Author

ccrrong commented Apr 21, 2023

将之前的pr链接在这个pr下面吧

已加

if (out_grad_shape[i] == -1) {
out_grad_shape[i] = x_shape[i] * repeat_times_data[i];
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

为什么out_grad_shape会出现 -1?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

输入x和repeat_times的维度不一致,会出现-1

} else {
int diff = repeat_times_data.size() - x_shape.size();
x_shape.insert(x_shape.begin(), diff, 1);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

repeat_times的大小在什么情况下大于x的size?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

class TestTileOpRank2Expanding(TestTileOpRank1):
def init_data(self):
self.ori_shape = [120]
self.repeat_times = [2, 2]
会有这种case

Copy link
Contributor

@xiaoguoguo626807 xiaoguoguo626807 left a comment

Choose a reason for hiding this comment

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

LGTM for rules

@heavengate heavengate merged commit f424162 into PaddlePaddle:develop Apr 22, 2023
lijialin03 pushed a commit to lijialin03/Paddle that referenced this pull request Apr 25, 2023
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.

3 participants