Skip to content

[CINN]add ShapeOrDataDimExpr represent for TensorArray type #65956

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

Conversation

Hongqing-work
Copy link
Contributor

@Hongqing-work Hongqing-work commented Jul 11, 2024

PR Category

CINN

PR Types

Improvements

Description

Pcard-67164
This PR add ShapeOrDataDimExpr represent for TensorArray type.

Design note

TensorArray can append tensors dynamically during the execution of a computation graph, so we can't get a static Shape represenation of TensorArray. However, we can still record the shape of one element tensor as a hint, which can already provide some useful information for subsequent processing, since the elements in TensorArray most likely have the same rank and certain dimensions may have equal constraints.

Copy link

paddle-bot bot commented Jul 11, 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.

zyfncg
zyfncg previously approved these changes Jul 12, 2024
@@ -89,6 +94,10 @@ std::ostream& operator<<(std::ostream& stream,
}
}
},
[&](const RankedTensorArrayShapeOrDataDimExprs& tensor_array_shape_data) {
stream << "TensorArray with first item shape"
Copy link
Contributor

Choose a reason for hiding this comment

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

first item 的概念应该已经没了

Copy link
Contributor Author

Choose a reason for hiding this comment

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

收到,下一个PR把这里的打印规范一下

Copy link
Contributor

@yuanlehome yuanlehome 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 pir/include/*

@Hongqing-work Hongqing-work merged commit 8de8736 into PaddlePaddle:develop Jul 12, 2024
30 of 32 checks passed
lixcli pushed a commit to lixcli/Paddle that referenced this pull request Jul 22, 2024
…ddle#65956)

* [CINN]add ShapeOrDataDimExpr represent for TensorArray type

* change name

* fix some print info
@Hongqing-work Hongqing-work deleted the add-shape-for-tensor-array branch September 5, 2024 08:25
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