From d0ac5a6e12d6952c3c0e44e89fb26a64da96993e Mon Sep 17 00:00:00 2001 From: Youwei Song Date: Wed, 11 Sep 2019 21:14:51 +0800 Subject: [PATCH] fix new_op build folder, test=develop (#1128) --- doc/fluid/advanced_usage/development/new_op/new_op.md | 4 ++-- doc/fluid/advanced_usage/development/new_op/new_op_en.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/fluid/advanced_usage/development/new_op/new_op.md b/doc/fluid/advanced_usage/development/new_op/new_op.md index f6053f416..cf8106360 100644 --- a/doc/fluid/advanced_usage/development/new_op/new_op.md +++ b/doc/fluid/advanced_usage/development/new_op/new_op.md @@ -466,7 +466,7 @@ framework::OpKernelType ConvOp::GetExpectedKernelType( ### 编译 -运行下面命令可以进行编译: +在`build/paddle/fluid/operators`目录下,运行下面命令可以进行编译: ``` make mul_op @@ -559,7 +559,7 @@ Op单元测试继承自`OpTest`。各项具体的单元测试在`TestMulOp`里 `python/paddle/fluid/tests/unittests/` 目录下新增的 `test_*.py` 单元测试会被自动加入工程进行编译。 -请注意,**不同于Op的编译测试,运行单元测试测时需要编译整个工程**,并且编译时需要打开`WITH_TESTING`, 即`cmake -DWITH_TESTING=ON ..`。编译成功后,执行下面的命令来运行单元测试: +请注意,**运行单元测试测时需要编译整个工程**,并且编译时需要打开`WITH_TESTING`, 即`cmake -DWITH_TESTING=ON ..`。编译成功后,执行下面的命令来运行单元测试: ```bash make test ARGS="-R test_mul_op -V" diff --git a/doc/fluid/advanced_usage/development/new_op/new_op_en.md b/doc/fluid/advanced_usage/development/new_op/new_op_en.md index 0c3795b78..eab7b50c7 100644 --- a/doc/fluid/advanced_usage/development/new_op/new_op_en.md +++ b/doc/fluid/advanced_usage/development/new_op/new_op_en.md @@ -267,7 +267,7 @@ The definition of its corresponding backward operator, if applicable, is similar ### Compilation -Run the following commands to compile. +In folder `build/paddle/fluid/operators`, run the following commands to compile. ``` make mul_op @@ -357,7 +357,7 @@ In the backward operator test: Any new unit testing file of the format `test_*.py` added to the directory `python/paddle/fluid/tests/unittests/` is automatically added to the project to compile. -Note that **unlike the compile test for Ops, running unit tests requires compiling the entire project** and requires compiling with flag `WITH_TESTING` on i.e. `cmake paddle_dir -DWITH_TESTING=ON`. +Note that **running unit tests requires compiling the entire project** and requires compiling with flag `WITH_TESTING` on i.e. `cmake paddle_dir -DWITH_TESTING=ON`. After successfully compiling the project, run the following command to run unit tests: -- GitLab