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

[cherry-pick] Inference add type check in copy_from_cpu #36552

Merged
merged 1 commit into from
Oct 20, 2021

Conversation

jiweibo
Copy link
Contributor

@jiweibo jiweibo commented Oct 19, 2021

PR types

Others

PR changes

Others

Describe

cherry-pick #36429

1、copy_from_cpu只支持Numpy ndarray的输入,增加类型检查

pybind的copy_from_cpu接口,改名为copy_from_cpu_bindinference/__init__.py中重写copy_from_cpu加上类型检查调用copy_from_cpu_bind

将检查加入到python测的原因是:如果在C++测进行转换,会有py::objectpy::array转换的开销
2、解决trt6中批量set动态shape时,无效参数会报出大量warning的问题
3、增加GetTrtCompileVersionGetTrtRuntimeVersion接口,用于获取trt版本信息

Copy link
Contributor

@TCChenlong TCChenlong left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@Superjomn Superjomn left a comment

Choose a reason for hiding this comment

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

LGTM

@Superjomn Superjomn merged commit b5404f0 into PaddlePaddle:release/2.2 Oct 20, 2021
@jiweibo jiweibo deleted the release/2.2 branch October 20, 2021 12:28
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.

4 participants