Skip to content

Conversation

lcy-seso
Copy link
Contributor

@lcy-seso lcy-seso commented Sep 5, 2017

  1. 之前部分代码段没有设置格式,所以没有启用高亮。
  2. 编译方式发生变化。
  3. CMakeLists.txt 一部分是按照 *_op.cc 这样的命名方式来添加源码,按照自己理解修改了一些。


下面命令可以编译:

无需修改[paddle/operators/CMakeLists.txt](https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/operators/CMakeLists.txt)文件,`paddle/operators` 目录下新增的 `*_op.cc` 文件会被自动加入编译。
Copy link
Contributor

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自动加入编译。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done. thank you.



### 编译和执行
### 编译和执行
Copy link
Contributor

@qingqing01 qingqing01 Sep 5, 2017

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,需要编译整个工程。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

Copy link
Contributor

@luotao1 luotao1 left a comment

Choose a reason for hiding this comment

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

LGTM

@lcy-seso lcy-seso merged commit c107512 into PaddlePaddle:develop Sep 6, 2017
@lcy-seso lcy-seso deleted the update_doc branch September 6, 2017 11:03
heavengate pushed a commit to heavengate/Paddle that referenced this pull request Aug 16, 2021
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.

3 participants