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

[CustomOp] Add cpp_extension zh doc #3292

Merged
merged 13 commits into from
Feb 24, 2021

Conversation

Aurelius84
Copy link
Collaborator

@Aurelius84 Aurelius84 commented Feb 24, 2021

新增自定义OP的 cpp_extension目录的中文文档, en doc: PaddlePaddle/Paddle#31187

image

image

image

image

image

image

@CLAassistant
Copy link

CLAassistant commented Feb 24, 2021

CLA assistant check
All committers have signed the CLA.

@paddle-bot-old
Copy link

Thanks for your contribution!

Polish doc

polish doc

fix sample code
- **extra_include_paths** (list[str], 可选): 用于指定编译 cpp 或 cuda 源文件时,额外的头文件搜索目录。默认情况下,Paddle 框架相关头文件所在目录 ``site-packages/paddle/include`` 已被隐式地包含。
- **build_directory** (str, 可选): 用于指定存放生成动态链接库的目录。若为 None, 则会使用环境变量 ``PADDLE_EXTENSION_DIR`` 的值作为默认的存放目录。可使用 :ref:`cn_api_paddle_utils_cpp_extension_get_build_directory` 接口查看当前的目录设置。
- **interpreter** (str, 可选): 用于指定执行即时编译所需要的解释器的路径,支持别名和完整路径,默认值为 ``python`` 。若用户本地包含多个版本的 python 环境,需要确保默认的 ``python`` 命令与当前解释器一致,否则需要指定此参数。如当前为 python3.7 环境,可设置此参数为 ``'python3.7'`` 。
- **verbose** (str, 可选): 用于指定是否需要输出编译过程中的日志信息
Copy link
Collaborator

Choose a reason for hiding this comment

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

默认值

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks, done

@@ -18,6 +18,11 @@ paddle.utils 目录下包含飞桨框架工具类的API。具体如下:
:header: "API名称", "API功能"
:widths: 10, 30

" :ref:`load <cn_api_paddle_utils_cpp_extension_load>` ", "飞桨框架一键编译自定义OP、自动生成和返回Python API的接口"
Copy link
Collaborator

Choose a reason for hiding this comment

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

在第8行前加一列吧 叫 自定义OP相关API,然后把这5个API归为一类,这样会好一点,写法可以参考工具类相关API

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks, Done

Copy link
Collaborator

@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

@Aurelius84 Aurelius84 merged commit 656e343 into PaddlePaddle:develop Feb 24, 2021
Aurelius84 added a commit to Aurelius84/docs that referenced this pull request Apr 6, 2021
TCChenlong pushed a commit that referenced this pull request Apr 6, 2021
* [CustomOp] Add cpp_extension zh doc (#3292)

* add cpp_extension doc

* [CustomOp]Remove interpreter argument (#3315)
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.

5 participants