-
Notifications
You must be signed in to change notification settings - Fork 5.9k
update the doc for how to write the operators. #3873
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
Conversation
doc/howto/dev/new_op_cn.md
Outdated
|
||
下面命令可以编译: | ||
|
||
无需修改[paddle/operators/CMakeLists.txt](https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/operators/CMakeLists.txt)文件,`paddle/operators` 目录下新增的 `*_op.cc` 文件会被自动加入编译。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果是DEPS的op,需要改cmakelists.txt。不过cmake这块还在修改和完善,这里先这样写着也可以。或者说明一下:没有DEPS的op自动加入编译。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done. thank you.
doc/howto/dev/new_op_cn.md
Outdated
|
||
|
||
### 编译和执行 | ||
### 编译和执行 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
下面308行,能否帮忙改成:
编译时需要打开WITH_TESTING
, 即 cmake paddle_dir -DWITH_TESTING=ON
,请注意,运行单测时的需要编译整个工程,不同于上述Op的编译测试,编译成功之后执行单测命令为:
主要是为了和Op里的编译测试区分开,上述Op里编译,可以只编译单独的一个文件,方便测试。 这里Python测试需要生成core.so,需要编译整个工程。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Uh oh!
There was an error while loading. Please reload this page.