Skip to content

[CINN]Add InferSymbolicShape for tensor_to_array #69069

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

Merged
merged 9 commits into from
Nov 27, 2024

Conversation

ooooo-create
Copy link
Contributor

@ooooo-create ooooo-create commented Oct 30, 2024

PR Category

CINN

PR Types

Others

Description

  • Add InferSymbolicShape for tensor_to_array
  • Add InferSymbolicShape for select_output,PIR 下不支持,无需实现

Copy link

paddle-bot bot commented Oct 30, 2024

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

@paddle-bot paddle-bot bot added the contributor External developers label Oct 30, 2024
@ooooo-create ooooo-create changed the title test [CINN]Add InferSymbolicShape for tensor_to_array Oct 30, 2024
@ooooo-create ooooo-create changed the title [CINN]Add InferSymbolicShape for tensor_to_array [CINN]Add InferSymbolicShape for tensor_to_array && select_output Oct 31, 2024
@gongshaotian gongshaotian self-assigned this Oct 31, 2024
Copy link

paddle-ci-bot bot commented Nov 9, 2024

Sorry to inform you that 3393252's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.

this->attributes().at("use_stack").dyn_cast<pir::BoolAttribute>().data();
const auto &x_shape_or_data =
infer_context->GetShapeOrDataForValue(x())
.dyn_cast<symbol::RankedTensorArrayShapeOrDataDimExprs>();
Copy link
Contributor

@gongshaotian gongshaotian Nov 25, 2024

Choose a reason for hiding this comment

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

语义上看 TensorToArrayOp 的输入参数应该是TensorShapeOrDataDimExprs吧

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image
第一个输入是 RankedTensorArrayShapeOrDataDimExprs

Copy link
Contributor

Choose a reason for hiding this comment

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

好的

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的梯度

@ooooo-create ooooo-create changed the title [CINN]Add InferSymbolicShape for tensor_to_array && select_output [CINN]Add InferSymbolicShape for tensor_to_array Nov 26, 2024
const auto &x_shape_or_data =
infer_context->GetShapeOrDataForValue(x())
.dyn_cast<symbol::RankedTensorArrayShapeOrDataDimExprs>();
infer_context->SetShapeOrDataForValue(x_grad(), x_shape_or_data);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

tensor_to_array 只有一个输出
图片

Copy link
Contributor

@gongshaotian gongshaotian left a comment

Choose a reason for hiding this comment

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

LGTM

@Hongqing-work Hongqing-work merged commit 8cdf2c1 into PaddlePaddle:develop Nov 27, 2024
27 of 28 checks passed
@ooooo-create ooooo-create deleted the testest branch March 8, 2025 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants