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

[PTen] Adapt to inference api dir for pten #37415

Merged
merged 5 commits into from
Nov 23, 2021

Conversation

chenwhql
Copy link
Contributor

@chenwhql chenwhql commented Nov 22, 2021

PR types

Function optimization

PR changes

APIs

Describe

[PTen] Adapt to inference api dir for pten

  1. 这个PR解决pten原生include目录路径无法适配推理公开API路径的问题,pten的include路径是paddle/pten/***,对外公开头文件的时候也仍然按照这个路径公开,而推理公开的头文件路径统一为paddle/include/***,加上自定义算子在推理中目前整体是属于experimental功能,所以在推理中,pten头文件路径为 paddle/include/experimental/pten/***,本PR通过CMake在编译时将头文件的路径进行了更新
  2. PT_DECLARE_API相关的声明是为了将API符号引入paddle,避免被优化掉,但这些符号不需要暴露给用户,所以做了拆分

推理目前没有自定义算子的单测,因此本PR在推理的官方示例上进行了验证:

目前本地已验证通过,顺便对示例进行了一些细节的完善,见 PaddlePaddle/Paddle-Inference-Demo#191

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@chenwhql chenwhql merged commit 73f4601 into PaddlePaddle:develop Nov 23, 2021
Zjq9409 pushed a commit to Zjq9409/Paddle that referenced this pull request Dec 10, 2021
* adapt to inference api dir for pten

* fix conflit with develop

* fix test_egr_ds_eager_tensor compile failed
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.

2 participants