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

[CINN] Support inferSymbolicShape for cf.tuple_pop and cf.tuple_push #70723

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

gongshaotian
Copy link
Contributor

@gongshaotian gongshaotian commented Jan 8, 2025

PR Category

CINN

PR Types

New features

Description

Pcard-67164
Before solution: #70565
Support cf.tuple_pop, cf.tuple_push, cf.stack_create:

  1. In stack_create op, set in_let and out_let to the same and meaningless shape as the match key
  2. Infer the shape of cf.tuple_pop by adding a grad cache interface for cf.tuple_push
  3. Mark cf.tuple_pop as a special cached op to avoid using static shape
  4. Execute delete_assert_op_pass and infer_symbolic_shape_pass before reduce_as_sum_pass
  5. In infer mode, the infer_symbolic_shape_pass should not be executed

Copy link

paddle-bot bot commented Jan 8, 2025

你的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.

zyfncg
zyfncg previously approved these changes Jan 8, 2025
@gongshaotian gongshaotian deleted the add_tuple_push_grad branch January 21, 2025 07:08
@gongshaotian gongshaotian restored the add_tuple_push_grad branch January 21, 2025 07:09
@gongshaotian gongshaotian changed the title [CINN] Infer the shape of cf.tuple_pop by adding a grad cache interface for cf.tuple_push [CINN] Support inferSymbolicShape in cf.tuple_pop and cf.tuple_push Jan 21, 2025
@gongshaotian gongshaotian changed the title [CINN] Support inferSymbolicShape in cf.tuple_pop and cf.tuple_push [CINN] Support inferSymbolicShape for cf.tuple_pop and cf.tuple_push Jan 21, 2025
@Hongqing-work
Copy link
Contributor

这里cache data的问题有解决吗

@gongshaotian
Copy link
Contributor Author

这里cache data的问题有解决吗

解决了,直接cache了shape data

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.

4 participants