Skip to content

Commit afbc4ce

Browse files
committed
Merge remote-tracking branch 'ups/develop' into mklml_funcs
2 parents 537f57a + 34e093a commit afbc4ce

File tree

86 files changed

+3126
-737
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+3126
-737
lines changed

CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ option(GLIDE_INSTALL "Download and install go dependencies " ON)
5757
option(USE_NNPACK "Compile PaddlePaddle with NNPACK library" OFF)
5858
option(WITH_DISTRIBUTE "Compile with grpc distributed support" OFF)
5959
option(USE_EIGEN_FOR_BLAS "Use matrix multiplication in Eigen" OFF)
60+
option(EIGEN_USE_THREADS "Compile with multi-threaded Eigen" OFF)
6061
option(WITH_ARM_FP16 "Use half precision support on armv8.2-a cpu" OFF)
62+
option(WITH_FAST_BUNDLE_TEST "Bundle tests that can be run in a single process together to reduce launch overhead" OFF)
63+
option(WITH_CONTRIB "Compile the third-party contributation" OFF)
6164

6265
# CMAKE_BUILD_TYPE
6366
if(NOT CMAKE_BUILD_TYPE)
@@ -202,7 +205,7 @@ endif(USE_NNPACK)
202205

203206
add_subdirectory(proto)
204207

205-
if(NOT MOBILE_INFERENCE)
208+
if(NOT MOBILE_INFERENCE AND NOT WITH_FLUID_ONLY)
206209
# "add_subdirectory(go)" should be placed after the following loine,
207210
# because it depends on paddle/optimizer.
208211
add_subdirectory(paddle/optimizer)
@@ -230,3 +233,7 @@ if(WITH_DOC)
230233
find_python_module(recommonmark REQUIRED)
231234
add_subdirectory(doc)
232235
endif()
236+
237+
if (WITH_CONTRIB)
238+
add_subdirectory(paddle/contrib)
239+
endif()

Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,3 @@ RUN echo 'root:root' | chpasswd
101101
RUN sed -ri 's/^PermitRootLogin\s+.*/PermitRootLogin yes/' /etc/ssh/sshd_config
102102
RUN sed -ri 's/UsePAM yes/#UsePAM yes/g' /etc/ssh/sshd_config
103103
EXPOSE 22
104-
105-
# development image default do build work
106-
CMD ["bash", "/paddle/paddle/scripts/docker/build.sh"]

Dockerfile.android

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,3 @@ RUN mkdir -p ${ANDROID_TOOLCHAINS_DIR} && \
4040
unzip -q android-ndk-r14b-linux-x86_64.zip && \
4141
mv android-ndk-r14b ${ANDROID_NDK_HOME} && \
4242
rm -rf /opt/android-ndk-tmp
43-
44-
CMD ["bash", "/paddle/paddle/scripts/docker/build_android.sh"]

benchmark/fluid/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,22 @@ Currently supported `--model` argument include:
2424

2525
* Run the following command to start a benchmark job locally:
2626
```bash
27-
python fluid_benchmark.py --model mnist --parallel 1 --device GPU --with_test
27+
python fluid_benchmark.py --model mnist --device GPU
2828
```
2929
You can choose to use GPU/CPU training. With GPU training, you can specify
30-
`--parallel 1` to run multi GPU training.
30+
`--gpus <gpu_num>` to run multi GPU training.
3131
* Run distributed training with parameter servers:
3232
* start parameter servers:
3333
```bash
34-
PADDLE_TRAINING_ROLE=PSERVER PADDLE_PSERVER_PORT=7164 PADDLE_PSERVER_IPS=127.0.0.1 PADDLE_TRAINERS=1 PADDLE_CURRENT_IP=127.0.0.1 PADDLE_TRAINER_ID=0 python fluid_benchmark.py --model mnist --parallel 0 --device GPU --update_method pserver
34+
PADDLE_TRAINING_ROLE=PSERVER PADDLE_PSERVER_PORT=7164 PADDLE_PSERVER_IPS=127.0.0.1 PADDLE_TRAINERS=1 PADDLE_CURRENT_IP=127.0.0.1 PADDLE_TRAINER_ID=0 python fluid_benchmark.py --model mnist --device GPU --update_method pserver
3535
```
3636
* start trainers:
3737
```bash
38-
PADDLE_TRAINING_ROLE=PSERVER PADDLE_PSERVER_PORT=7164 PADDLE_PSERVER_IPS=127.0.0.1 PADDLE_TRAINERS=1 PADDLE_CURRENT_IP=127.0.0.1 PADDLE_TRAINER_ID=0 python fluid_benchmark.py --model mnist --parallel 0 --device GPU --update_method pserver
38+
PADDLE_TRAINING_ROLE=TRAINER PADDLE_PSERVER_PORT=7164 PADDLE_PSERVER_IPS=127.0.0.1 PADDLE_TRAINERS=1 PADDLE_CURRENT_IP=127.0.0.1 PADDLE_TRAINER_ID=0 python fluid_benchmark.py --model mnist --device GPU --update_method pserver
3939
```
4040
* Run distributed training using NCCL2
4141
```bash
42-
PADDLE_PSERVER_PORT=7164 PADDLE_TRAINER_IPS=192.168.0.2,192.168.0.3 PADDLE_CURRENT_IP=127.0.0.1 PADDLE_TRAINER_ID=0 python fluid_benchmark.py --model mnist --parallel 0 --device GPU --update_method nccl2
42+
PADDLE_PSERVER_PORT=7164 PADDLE_TRAINER_IPS=192.168.0.2,192.168.0.3 PADDLE_CURRENT_IP=127.0.0.1 PADDLE_TRAINER_ID=0 python fluid_benchmark.py --model mnist --device GPU --update_method nccl2
4343
```
4444

4545
## Run Distributed Benchmark on Kubernetes Cluster
@@ -48,7 +48,7 @@ We provide a script `kube_gen_job.py` to generate Kubernetes yaml files to submi
4848
distributed benchmark jobs to your cluster. To generate a job yaml, just run:
4949

5050
```bash
51-
python kube_gen_job.py --jobname myjob --pscpu 4 --cpu 8 --gpu 8 --psmemory 20 --memory 40 --pservers 4 --trainers 4 --entry "python fluid_benchmark.py --model mnist --parallel 1 --device GPU --update_method pserver --with_test" --disttype pserver
51+
python kube_gen_job.py --jobname myjob --pscpu 4 --cpu 8 --gpu 8 --psmemory 20 --memory 40 --pservers 4 --trainers 4 --entry "python fluid_benchmark.py --model mnist --parallel 1 --device GPU --update_method pserver " --disttype pserver
5252
```
5353

5454
Then the yaml files are generated under directory `myjob`, you can run:

cmake/configure.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ if(USE_EIGEN_FOR_BLAS)
4141
add_definitions(-DPADDLE_USE_EIGEN_FOR_BLAS)
4242
endif(USE_EIGEN_FOR_BLAS)
4343

44+
if(EIGEN_USE_THREADS)
45+
add_definitions(-DEIGEN_USE_THREADS)
46+
endif(EIGEN_USE_THREADS)
47+
4448
if(NOT WITH_PROFILER)
4549
add_definitions(-DPADDLE_DISABLE_PROFILER)
4650
endif(NOT WITH_PROFILER)

cmake/external/protobuf.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ FUNCTION(build_protobuf TARGET_NAME BUILD_FOR_HOST)
212212
${CMAKE_COMMAND} ${PROTOBUF_SOURCES_DIR}/src/${TARGET_NAME}/cmake
213213
${OPTIONAL_ARGS}
214214
-Dprotobuf_BUILD_TESTS=OFF
215+
-DCMAKE_SKIP_RPATH=ON
215216
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
216217
-DCMAKE_BUILD_TYPE=${THIRD_PARTY_BUILD_TYPE}
217218
-DCMAKE_INSTALL_PREFIX=${PROTOBUF_INSTALL_DIR}

doc/fluid/api/layers.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,9 +1003,9 @@ dice_loss
10031003
.. autofunction:: paddle.fluid.layers.dice_loss
10041004
:noindex:
10051005

1006-
bilinear_interp
1006+
upsampling_bilinear2d
10071007
____
10081008

1009-
.. autofunction:: paddle.fluid.layers.bilinear_interp
1009+
.. autofunction:: paddle.fluid.layers.upsampling_bilinear2d
10101010
:noindex:
10111011

0 commit comments

Comments
 (0)