Skip to content

[CustomOP Polish Headerfile] Delete inference headerfile change #5736

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

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions docs/guides/custom_op/new_cpp_op_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -1617,18 +1617,6 @@ static.save_inference_model(path, [image], [out], exe)

基于本机制编写的自定义算子,也能够在 `PaddlePaddle` 推理场景中使用,仍然基于前述示例介绍使用流程,这里基于 `relu_cuda.cc` 和 `relu_cuda.cu` 介绍。

### 源码改动

由于训练和推理接口管理上存在一些差别,自定义算子 `relu_cuda.cc` 源码中的引入的头文件需要替换一下:

`#include "paddle/extension.h"`

改为

`#include "paddle/include/experimental/ext_all.h"`

其他地方不需要做改动。

### 算子与推理库联合编译

编写推理的测试程序,其中需要使用前述验证过程中存储的 inference model,目录为 `custom_relu_dynamic/net` 或者 `custom_relu_static/net` ,下面通过示例介绍使用流程,该示例需要准备的文件包括:
Expand Down