-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[NNAdapter][Ascend] Support transformer model #8594
[NNAdapter][Ascend] Support transformer model #8594
Conversation
Thanks for your contribution! |
@@ -35,7 +35,15 @@ bool ReshapeOp::InferShapeImpl() const { | |||
if (shape_tensor_vct.size() > 0) { | |||
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()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个部分pengyang再看看
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是否有这种情况发生呢?理论上shape_tensor_vct中的tensor是不允许为空的,如果为空那么多半是模型的问题,尽量从模型上去解决比较好
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这是transformer控制流模型出现的场景。确实会出现为空的情况。
0c5b07b
to
f8517cf
Compare
f8517cf
to
96888c2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.