Skip to content

Commit ea7dc9c

Browse files
committed
Merge remote-tracking branch 'ups/develop' into fea/jitkernel
test=develop
2 parents 2513b2c + d3f5047 commit ea7dc9c

File tree

115 files changed

+2996
-4616
lines changed

Some content is hidden

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

115 files changed

+2996
-4616
lines changed

Dockerfile

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ COPY ./paddle/scripts/docker/root/ /root/
2424

2525
RUN apt-get update && \
2626
apt-get install -y --allow-downgrades patchelf \
27+
python3 python3-dev python3-pip \
2728
git python-pip python-dev python-opencv openssh-server bison \
2829
libnccl2=2.1.2-1+cuda8.0 libnccl-dev=2.1.2-1+cuda8.0 \
2930
wget unzip unrar tar xz-utils bzip2 gzip coreutils ntp \
@@ -70,24 +71,33 @@ RUN localedef -i en_US -f UTF-8 en_US.UTF-8
7071
# specify sphinx version as 1.5.6 and remove -U option for [pip install -U
7172
# sphinx-rtd-theme] since -U option will cause sphinx being updated to newest
7273
# version(1.7.1 for now), which causes building documentation failed.
73-
RUN easy_install -U pip && \
74+
RUN pip3 install -U wheel && \
75+
pip3 install -U docopt PyYAML sphinx==1.5.6 && \
76+
pip3 install sphinx-rtd-theme==0.1.9 recommonmark && \
77+
easy_install -U pip && \
7478
pip install -U wheel && \
7579
pip install -U docopt PyYAML sphinx==1.5.6 && \
7680
pip install sphinx-rtd-theme==0.1.9 recommonmark
7781

78-
RUN pip install pre-commit 'ipython==5.3.0' && \
82+
RUN pip3 install pre-commit 'ipython==5.3.0' && \
83+
pip3 install 'ipykernel==4.6.0' 'jupyter==1.0.0' && \
84+
pip3 install opencv-python && \
85+
pip install pre-commit 'ipython==5.3.0' && \
7986
pip install 'ipykernel==4.6.0' 'jupyter==1.0.0' && \
8087
pip install opencv-python
8188

8289
#For docstring checker
90+
RUN pip3 install pylint pytest astroid isort
8391
RUN pip install pylint pytest astroid isort LinkChecker
8492

8593
COPY ./python/requirements.txt /root/
94+
RUN pip3 install -r /root/requirements.txt
8695
RUN pip install -r /root/requirements.txt
8796

8897
# To fix https://github.com/PaddlePaddle/Paddle/issues/1954, we use
8998
# the solution in https://urllib3.readthedocs.io/en/latest/user-guide.html#ssl-py2
9099
RUN apt-get install -y libssl-dev libffi-dev
100+
RUN pip3 install certifi urllib3[secure]
91101
RUN pip install certifi urllib3[secure]
92102

93103

cmake/cblas.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ set(OPENBLAS_LIB_SEARCH_PATHS
4040
/usr/local/opt/openblas/lib)
4141

4242
find_path(OPENBLAS_INC_DIR NAMES cblas.h
43-
PATHS ${OPENBLAS_INCLUDE_SEARCH_PATHS})
43+
PATHS ${OPENBLAS_INCLUDE_SEARCH_PATHS} NO_DEFAULT_PATH)
4444
find_path(OPENBLAS_LAPACKE_INC_DIR NAMES lapacke.h
4545
PATHS ${OPENBLAS_INCLUDE_SEARCH_PATHS})
4646
find_library(OPENBLAS_LIB NAMES openblas

cmake/external/openblas.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ IF(NOT ${CBLAS_FOUND})
2727

2828
SET(CBLAS_SOURCES_DIR ${THIRD_PARTY_PATH}/openblas)
2929
SET(CBLAS_INSTALL_DIR ${THIRD_PARTY_PATH}/install/openblas)
30-
SET(CBLAS_INCLUDE_DIR "${CBLAS_INSTALL_DIR}/include" CACHE PATH "openblas include directory." FORCE)
30+
SET(CBLAS_INC_DIR "${CBLAS_INSTALL_DIR}/include" CACHE PATH "openblas include directory." FORCE)
3131

3232
SET(CBLAS_LIBRARIES
3333
"${CBLAS_INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}openblas${CMAKE_STATIC_LIBRARY_SUFFIX}"
@@ -96,7 +96,7 @@ IF(NOT ${CBLAS_FOUND})
9696
ENDIF(NOT WIN32)
9797
SET(CBLAS_PROVIDER openblas)
9898
IF(WITH_C_API)
99-
INSTALL(DIRECTORY ${CBLAS_INCLUDE_DIR} DESTINATION third_party/openblas)
99+
INSTALL(DIRECTORY ${CBLAS_INC_DIR} DESTINATION third_party/openblas)
100100
# Because libopenblas.a is a symbolic link of another library, thus need to
101101
# install the whole directory.
102102
IF(ANDROID)
@@ -117,8 +117,8 @@ IF(NOT ${CBLAS_FOUND})
117117
ENDIF(NOT ${CBLAS_FOUND})
118118

119119
MESSAGE(STATUS "BLAS library: ${CBLAS_LIBRARIES}")
120-
MESSAGE(STATUS "BLAS Include: ${CBLAS_INCLUDE_DIR}")
121-
INCLUDE_DIRECTORIES(${CBLAS_INCLUDE_DIR})
120+
MESSAGE(STATUS "BLAS Include: ${CBLAS_INC_DIR}")
121+
INCLUDE_DIRECTORIES(${CBLAS_INC_DIR})
122122

123123
# FIXME(gangliao): generate cblas target to track all high performance
124124
# linear algebra libraries for cc_library(xxx SRCS xxx.c DEPS cblas)

paddle/fluid/API.spec

Lines changed: 31 additions & 31 deletions
Large diffs are not rendered by default.

paddle/fluid/framework/CMakeLists.txt

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
# windows treat symbolic file as a real file, which is different with unix
23
# We create a hidden file and compile it instead of origin source file.
34
function(windows_symbolic TARGET)
@@ -9,11 +10,23 @@ function(windows_symbolic TARGET)
910
if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${src}.cc OR NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${src}.cu)
1011
message(FATAL " ${src}.cc and ${src}.cu must exsits, and ${src}.cu must be symbolic file.")
1112
endif()
12-
add_custom_command(OUTPUT .${src}.cu
13+
14+
# only copy the xx.cu to .xx.cu when the content are modified
15+
set(copy_flag 1)
16+
if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.${src}.cu)
17+
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/${src}.cc SOURCE_STR)
18+
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/.${src}.cu TARGET_STR)
19+
if (SOURCE_STR STREQUAL TARGET_STR)
20+
set(copy_flag 0)
21+
endif()
22+
endif()
23+
if (copy_flag)
24+
add_custom_command(OUTPUT .${src}.cu
1325
COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_CURRENT_SOURCE_DIR}/.${src}.cu
1426
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/${src}.cc" "${CMAKE_CURRENT_SOURCE_DIR}/.${src}.cu"
1527
COMMENT "create hidden file of ${src}.cu")
16-
add_custom_target(${TARGET} ALL DEPENDS .${src}.cu)
28+
endif(copy_flag)
29+
add_custom_target(${TARGET} ALL DEPENDS .${src}.cu)
1730
endforeach()
1831
endfunction()
1932

@@ -81,6 +94,8 @@ nv_test(data_device_transform_test SRCS data_device_transform_test.cu
8194

8295
if(WITH_GPU)
8396
if (WIN32)
97+
# windows treat symbolic file as a real file, which is different with unix
98+
# We create a hidden file and compile it instead of origin source file.
8499
windows_symbolic(hidden_file SRCS data_type_transform.cu)
85100
nv_library(data_type_transform SRCS .data_type_transform.cu DEPS tensor)
86101
add_dependencies(data_type_transform hidden_file)
@@ -149,7 +164,7 @@ if(WITH_DISTRIBUTE)
149164
set_source_files_properties(executor.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
150165
else()
151166
cc_library(executor SRCS executor.cc DEPS op_registry device_context scope framework_proto glog lod_rank_table feed_fetch_method graph_to_program_pass)
152-
cc_test(test_naive_executor SRCS naive_executor_test.cc DEPS naive_executor op_registry device_context scope framework_proto glog lod_rank_table feed_fetch_method graph_to_program_pass elementwise_add_op)
167+
cc_test(test_naive_executor SRCS naive_executor_test.cc DEPS naive_executor elementwise_add_op)
153168
endif()
154169

155170
if (NOT WIN32)
@@ -169,15 +184,8 @@ cc_test(selected_rows_test SRCS selected_rows_test.cc DEPS selected_rows)
169184
cc_test(op_kernel_type_test SRCS op_kernel_type_test.cc DEPS place device_context framework_proto)
170185
cc_test(cow_ptr_tests SRCS details/cow_ptr_test.cc)
171186

172-
# cc_test(channel_test SRCS channel_test.cc)
173187
cc_test(tuple_test SRCS tuple_test.cc )
174188

175189
if (NOT WIN32)
176190
cc_test(rw_lock_test SRCS rw_lock_test.cc)
177191
endif (NOT WIN32)
178-
179-
# disable test temporarily.
180-
# TODO https://github.com/PaddlePaddle/Paddle/issues/11971
181-
# cc_test(concurrency_test SRCS concurrency_test.cc DEPS go_op channel_close_op channel_create_op
182-
# channel_send_op channel_recv_op sum_op select_op elementwise_add_op compare_op
183-
# conditional_block_op while_op assign_op print_op executor proto_desc)

0 commit comments

Comments
 (0)