Skip to content

[NNAdapter][Ascend] Support transformer model#8594

Merged
hong19860320 merged 5 commits intoPaddlePaddle:developfrom
shentanyue:add_transformer
Mar 22, 2022
Merged

[NNAdapter][Ascend] Support transformer model#8594
hong19860320 merged 5 commits intoPaddlePaddle:developfrom
shentanyue:add_transformer

Conversation

@shentanyue
Copy link
Collaborator

No description provided.

@paddle-bot-old
Copy link

paddle-bot-old bot commented Mar 8, 2022

Thanks for your contribution!

final_shape.resize(shape_tensor_vct.size());
for (size_t i = 0; i < shape_tensor_vct.size(); i++) {
final_shape[i] = shape_tensor_vct[i]->data<int>()[0];
if (shape_tensor_vct[i]->dims().empty()) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个部分pengyang再看看

Copy link
Collaborator

Choose a reason for hiding this comment

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

是否有这种情况发生呢?理论上shape_tensor_vct中的tensor是不允许为空的,如果为空那么多半是模型的问题,尽量从模型上去解决比较好

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

这是transformer控制流模型出现的场景。确实会出现为空的情况。

@PaddlePaddle PaddlePaddle locked and limited conversation to collaborators Mar 17, 2022
@PaddlePaddle PaddlePaddle unlocked this conversation Mar 17, 2022
@PaddlePaddle PaddlePaddle locked and limited conversation to collaborators Mar 17, 2022
@PaddlePaddle PaddlePaddle unlocked this conversation Mar 17, 2022
Copy link
Collaborator

@hong19860320 hong19860320 left a comment

Choose a reason for hiding this comment

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

LGTM

@hong19860320 hong19860320 merged commit dbcee05 into PaddlePaddle:develop Mar 22, 2022
@shentanyue shentanyue deleted the add_transformer branch March 22, 2022 07:14
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