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

[inference][trt]Upgrade expand cast nearestinterp for sd #48998

Conversation

zhangjun
Copy link
Contributor

PR types

Others

PR changes

Others

Describe

  • expand support expand_shapes_tensor input
  • nearest_interp support SizeTensor
  • cast support int64 to float transformation

@paddle-bot
Copy link

paddle-bot bot commented Dec 12, 2022

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

Copy link
Contributor

@xiaoxiaohehe001 xiaoxiaohehe001 left a comment

Choose a reason for hiding this comment

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

LGTM

nvinfer1::Dims stride;
stride.nbDims = nbDims_num;
stride.nbDims = shape_rank;
Copy link
Contributor

Choose a reason for hiding this comment

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

后续可以添加上expand的converter注册

@@ -34,6 +25,7 @@ class NearestInterpolateOpConverter : public OpConverter {

framework::OpDesc op_desc(op, nullptr);

auto inputs = op_desc.Inputs();
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.

这个变量有用到吗?

下个PR删掉

@@ -2295,7 +2288,8 @@ struct SimpleOpTypeSetTeller : public Teller {
}
}
#endif
if (!((in_dtype == 5 || in_dtype == 4 || in_dtype == 2) &&
if (!((in_dtype == 5 || in_dtype == 4 || in_dtype == 3 ||
Copy link
Contributor

Choose a reason for hiding this comment

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

后面把类似的写法改成 static_cast(PROTO_FLOAT) 类似的写法吧

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

@jiweibo jiweibo left a comment

Choose a reason for hiding this comment

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

LGTM

@zhangjun zhangjun merged commit 5defefd into PaddlePaddle:develop Jan 5, 2023
@zhangjun zhangjun deleted the upgrade-expand_cast_nearestinterp-for-sd branch March 20, 2023 09:32
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.

None yet

3 participants