Skip to content

Commit 7834b4a

Browse files
committed
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into dev_op_tensor_support
2 parents 7c55e08 + 3300a53 commit 7834b4a

21 files changed

+375
-236
lines changed

.travis.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,6 @@ script:
2727
# 43min timeout
2828
paddle/scripts/paddle_docker_build.sh ${JOB}
2929
if [ $? -eq 0 ] || [ $? -eq 142 ]; then true; else exit 1; fi;
30-
- |
31-
if [[ "$JOB" != "doc" ]]; then exit 0; fi;
32-
# For document only
33-
if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then exit 0; fi;
34-
if [[ "$TRAVIS_BRANCH" != "develop" && ! "$TRAVIS_BRANCH" =~ ^v|release/[[:digit:]]+\.[[:digit:]]+(\.[[:digit:]]+)?(-\S*)?$ ]]; then exit 0; fi;
35-
export DEPLOY_DOCS_SH=https://raw.githubusercontent.com/PaddlePaddle/PaddlePaddle.org/master/scripts/deploy/deploy_docs.sh
36-
export DOCS_DIR=`pwd`
37-
cd ..
38-
curl $DEPLOY_DOCS_SH | bash -s $CONTENT_DEC_PASSWD $TRAVIS_BRANCH $DOCS_DIR $DOCS_DIR/build/doc/
3930
notifications:
4031
email:
4132
on_success: change

cmake/generic.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ function(cc_test TARGET_NAME)
265265
if (${cc_test_SERIAL})
266266
set_property(TEST ${TARGET_NAME} PROPERTY RUN_SERIAL 1)
267267
set_property(TEST ${TARGET_NAME} PROPERTY ENVIRONMENT FLAGS_init_allocated_mem=true)
268+
set_property(TEST ${TARGET_NAME} PROPERTY ENVIRONMENT FLAGS_cudnn_deterministic=true)
268269
endif()
269270
endif()
270271
endfunction(cc_test)
@@ -330,6 +331,7 @@ function(nv_test TARGET_NAME)
330331
if (nv_test_SERIAL)
331332
set_property(TEST ${TARGET_NAME} PROPERTY RUN_SERIAL 1)
332333
set_property(TEST ${TARGET_NAME} PROPERTY ENVIRONMENT FLAGS_init_allocated_mem=true)
334+
set_property(TEST ${TARGET_NAME} PROPERTY ENVIRONMENT FLAGS_cudnn_deterministic=true)
333335
endif()
334336
endif()
335337
endfunction(nv_test)
@@ -577,7 +579,8 @@ function(py_test TARGET_NAME)
577579
set(multiValueArgs SRCS DEPS ARGS ENVS)
578580
cmake_parse_arguments(py_test "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
579581
add_test(NAME ${TARGET_NAME}
580-
COMMAND env FLAGS_init_allocated_mem=true PYTHONPATH=${PADDLE_BINARY_DIR}/python ${py_test_ENVS}
582+
COMMAND env FLAGS_init_allocated_mem=true FLAGS_cudnn_deterministic=true
583+
PYTHONPATH=${PADDLE_BINARY_DIR}/python ${py_test_ENVS}
581584
${PYTHON_EXECUTABLE} -u ${py_test_SRCS} ${py_test_ARGS}
582585
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
583586
endif()

paddle/fluid/framework/operator.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ void OperatorBase::Run(const Scope& scope, const platform::Place& place) {
136136
platform::SetDeviceId(dev_id);
137137
#endif
138138
}
139+
platform::DeviceContextPool& pool = platform::DeviceContextPool::Instance();
140+
platform::RecordEvent record_event(Type(), pool.Get(place));
139141
RunImpl(scope, place);
140142
VLOG(10) << "+ " << DebugStringEx(&scope);
141143
}
@@ -639,9 +641,6 @@ void OperatorWithKernel::RunImpl(const Scope& scope,
639641
platform::DeviceContextPool& pool = platform::DeviceContextPool::Instance();
640642
auto* dev_ctx = pool.Get(place);
641643

642-
// For profiling, don't move out of this function because that will result
643-
// in the failure of multi-GPU profiling.
644-
platform::RecordEvent record_event(Type(), dev_ctx);
645644
// check if op[type] has kernel registered.
646645
auto& all_op_kernels = AllOpKernels();
647646
auto kernels_iter = all_op_kernels.find(type_);

paddle/fluid/inference/api/CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,10 @@ if (WITH_ANAKIN) # only needed in CI
7474
target_link_libraries(inference_anakin_api anakin anakin_saber_common)
7575
target_link_libraries(inference_anakin_api_shared anakin anakin_saber_common)
7676
if (WITH_TESTING)
77-
cc_test(inference_anakin_test SRCS api_anakin_engine_tester.cc
78-
ARGS --model=${ANAKIN_INSTALL_DIR}/mobilenet_v2.anakin.bin
79-
DEPS inference_anakin_api_shared)
80-
target_compile_options(inference_anakin_test BEFORE PUBLIC ${ANAKIN_COMPILE_EXTRA_FLAGS})
77+
# this test is unstable, disable it first.
78+
#cc_test(inference_anakin_test SRCS api_anakin_engine_tester.cc
79+
#ARGS --model=${ANAKIN_INSTALL_DIR}/mobilenet_v2.anakin.bin
80+
#DEPS inference_anakin_api_shared)
81+
#target_compile_options(inference_anakin_test BEFORE PUBLIC ${ANAKIN_COMPILE_EXTRA_FLAGS})
8182
endif(WITH_TESTING)
8283
endif()

paddle/fluid/operators/feed_op.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ class FeedOp : public framework::OperatorBase {
3131
const platform::Place &place) const override {
3232
// get device context from pool
3333
auto *dev_ctx = platform::DeviceContextPool::Instance().Get(place);
34-
platform::RecordEvent record_event(Type(), dev_ctx);
3534

3635
auto feed_var_name = Input("X");
3736
auto *feed_var = scope.FindVar(feed_var_name);

paddle/fluid/operators/fetch_barrier_op.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,6 @@ class FetchBarrierOp : public framework::OperatorBase {
3636
void RunImpl(const framework::Scope& scope,
3737
const platform::Place& place) const override {
3838
std::vector<std::string> eps = Attr<std::vector<std::string>>("endpoints");
39-
40-
platform::DeviceContextPool& pool = platform::DeviceContextPool::Instance();
41-
auto& ctx = *pool.Get(place);
42-
// For profiling
43-
platform::RecordEvent record_event(Type(), &ctx);
44-
4539
distributed::RPCClient* rpc_client =
4640
distributed::RPCClient::GetInstance<RPCCLIENT_T>();
4741

paddle/fluid/operators/fetch_op.cc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ class FetchOp : public framework::OperatorBase {
3030
private:
3131
void RunImpl(const framework::Scope &scope,
3232
const platform::Place &place) const override {
33-
platform::DeviceContextPool &pool = platform::DeviceContextPool::Instance();
34-
platform::RecordEvent record_event(Type(), pool.Get(place));
35-
3633
auto fetch_var_name = Input("X");
3734
auto *fetch_var = scope.FindVar(fetch_var_name);
3835
PADDLE_ENFORCE(fetch_var != nullptr,

paddle/fluid/operators/load_op.cc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ class LoadOp : public framework::OperatorBase {
3131
private:
3232
void RunImpl(const framework::Scope &scope,
3333
const platform::Place &place) const override {
34-
auto *dev_ctx = platform::DeviceContextPool::Instance().Get(place);
35-
platform::RecordEvent record_event(Type(), dev_ctx);
36-
3734
// FIXME(yuyang18): We save variable to local file now, but we should change
3835
// it to save an output stream.
3936
auto filename = Attr<std::string>("file_path");

paddle/fluid/operators/recv_op.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ class RecvOp : public framework::OperatorBase {
4040

4141
platform::DeviceContextPool& pool = platform::DeviceContextPool::Instance();
4242
auto& ctx = *pool.Get(place);
43-
// For profiling
44-
platform::RecordEvent record_event(Type(), &ctx);
4543

4644
distributed::RPCClient* rpc_client =
4745
distributed::RPCClient::GetInstance<RPCCLIENT_T>();

paddle/fluid/operators/send_barrier_op.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@ class SendBarrierOp : public framework::OperatorBase {
3939
std::vector<std::string> eps = Attr<std::vector<std::string>>("endpoints");
4040
bool sync_mode = Attr<bool>("sync_mode");
4141

42-
platform::DeviceContextPool& pool = platform::DeviceContextPool::Instance();
43-
auto& ctx = *pool.Get(place);
44-
// For profiling
45-
platform::RecordEvent record_event(Type(), &ctx);
46-
4742
distributed::RPCClient* rpc_client =
4843
distributed::RPCClient::GetInstance<RPCCLIENT_T>();
4944

0 commit comments

Comments
 (0)