Skip to content

Commit 3654e1e

Browse files
committed
Merge branch 'develop' into ProtoDataProvider
2 parents b7cb956 + 7c3ec22 commit 3654e1e

File tree

17 files changed

+323
-168
lines changed

17 files changed

+323
-168
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,3 @@ cmake_install.cmake
2828
paddle/.timestamp
2929
python/paddlepaddle.egg-info/
3030
paddle/pybind/pybind.h
31-
python/paddle/v2/framework/tests/tmp/*

cmake/external/openblas.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ IF(NOT ${CBLAS_FOUND})
9898
ENDIF()
9999
INSTALL(CODE "execute_process(
100100
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CBLAS_INSTALL_DIR}/lib
101-
destination ${CMAKE_INSTALL_PREFIX}/${TMP_INSTALL_DIR}
101+
${CMAKE_INSTALL_PREFIX}/${TMP_INSTALL_DIR}
102102
)"
103103
)
104104
INSTALL(CODE "MESSAGE(STATUS \"Installing: \"

paddle/framework/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ py_proto_compile(framework_py_proto SRCS framework.proto)
3838
add_custom_target(framework_py_proto_init ALL COMMAND ${CMAKE_COMMAND} -E touch __init__.py)
3939
add_dependencies(framework_py_proto framework_py_proto_init)
4040
add_custom_command(TARGET framework_py_proto POST_BUILD
41-
COMMAND ${CMAKE_COMMAND} -E make_directory ${PADDLE_SOURCE_DIR}/python/paddle/v2/framework/proto
42-
COMMAND cp *.py ${PADDLE_SOURCE_DIR}/python/paddle/v2/framework/proto/
43-
COMMENT "Copy generated python proto into directory paddle/v2/framework/proto."
41+
COMMAND ${CMAKE_COMMAND} -E make_directory ${PADDLE_SOURCE_DIR}/python/paddle/v2/fluid/proto
42+
COMMAND cp *.py ${PADDLE_SOURCE_DIR}/python/paddle/v2/fluid/proto/
43+
COMMENT "Copy generated python proto into directory paddle/v2/fluid/proto."
4444
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
4545

4646
cc_library(backward SRCS backward.cc DEPS net_op)

paddle/gserver/layers/ROIPoolLayer.cpp

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,9 @@ void ROIPoolLayer::forward(PassType passType) {
100100
size_t roiEndH = round(bottomROIs[4] * spatialScale_);
101101
CHECK_GE(roiBatchIdx, 0UL);
102102
CHECK_LT(roiBatchIdx, batchSize);
103-
size_t roiHeight = std::max(roiEndH - roiStartH + 1, 1UL);
104-
size_t roiWidth = std::max(roiEndW - roiStartW + 1, 1UL);
103+
size_t roiHeight =
104+
std::max(roiEndH - roiStartH + 1, static_cast<size_t>(1));
105+
size_t roiWidth = std::max(roiEndW - roiStartW + 1, static_cast<size_t>(1));
105106
real binSizeH =
106107
static_cast<real>(roiHeight) / static_cast<real>(pooledHeight_);
107108
real binSizeW =
@@ -114,10 +115,14 @@ void ROIPoolLayer::forward(PassType passType) {
114115
size_t wstart = static_cast<size_t>(std::floor(pw * binSizeW));
115116
size_t hend = static_cast<size_t>(std::ceil((ph + 1) * binSizeH));
116117
size_t wend = static_cast<size_t>(std::ceil((pw + 1) * binSizeW));
117-
hstart = std::min(std::max(hstart + roiStartH, 0UL), height_);
118-
wstart = std::min(std::max(wstart + roiStartW, 0UL), width_);
119-
hend = std::min(std::max(hend + roiStartH, 0UL), height_);
120-
wend = std::min(std::max(wend + roiStartW, 0UL), width_);
118+
hstart = std::min(
119+
std::max(hstart + roiStartH, static_cast<size_t>(0)), height_);
120+
wstart = std::min(
121+
std::max(wstart + roiStartW, static_cast<size_t>(0)), width_);
122+
hend = std::min(std::max(hend + roiStartH, static_cast<size_t>(0)),
123+
height_);
124+
wend = std::min(std::max(wend + roiStartW, static_cast<size_t>(0)),
125+
width_);
121126

122127
bool isEmpty = (hend <= hstart) || (wend <= wstart);
123128
size_t poolIndex = ph * pooledWidth_ + pw;

paddle/operators/elementwise_add_op.cu

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,13 @@ namespace ops = paddle::operators;
1919

2020
REGISTER_OP_GPU_KERNEL(
2121
elementwise_add,
22-
ops::ElementwiseAddKernel<paddle::platform::GPUPlace, float>);
22+
ops::ElementwiseAddKernel<paddle::platform::GPUPlace, float>,
23+
ops::ElementwiseAddKernel<paddle::platform::GPUPlace, double>,
24+
ops::ElementwiseAddKernel<paddle::platform::GPUPlace, int>,
25+
ops::ElementwiseAddKernel<paddle::platform::GPUPlace, int64_t>);
2326
REGISTER_OP_GPU_KERNEL(
2427
elementwise_add_grad,
25-
ops::ElementwiseAddGradKernel<paddle::platform::GPUPlace, float>);
28+
ops::ElementwiseAddGradKernel<paddle::platform::GPUPlace, float>,
29+
ops::ElementwiseAddGradKernel<paddle::platform::GPUPlace, double>,
30+
ops::ElementwiseAddGradKernel<paddle::platform::GPUPlace, int>,
31+
ops::ElementwiseAddGradKernel<paddle::platform::GPUPlace, int64_t>);

paddle/operators/elementwise_div_op.cu

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,13 @@ namespace ops = paddle::operators;
1919

2020
REGISTER_OP_GPU_KERNEL(
2121
elementwise_div,
22-
ops::ElementwiseDivKernel<paddle::platform::GPUPlace, float>);
22+
ops::ElementwiseDivKernel<paddle::platform::GPUPlace, float>,
23+
ops::ElementwiseDivKernel<paddle::platform::GPUPlace, double>,
24+
ops::ElementwiseDivKernel<paddle::platform::GPUPlace, int>,
25+
ops::ElementwiseDivKernel<paddle::platform::GPUPlace, int64_t>);
2326
REGISTER_OP_GPU_KERNEL(
2427
elementwise_div_grad,
25-
ops::ElementwiseDivGradKernel<paddle::platform::GPUPlace, float>);
28+
ops::ElementwiseDivGradKernel<paddle::platform::GPUPlace, float>,
29+
ops::ElementwiseDivGradKernel<paddle::platform::GPUPlace, double>,
30+
ops::ElementwiseDivGradKernel<paddle::platform::GPUPlace, int>,
31+
ops::ElementwiseDivGradKernel<paddle::platform::GPUPlace, int64_t>);

paddle/operators/elementwise_mul_op.cu

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,12 @@ namespace ops = paddle::operators;
2020
REGISTER_OP_GPU_KERNEL(
2121
elementwise_mul,
2222
ops::ElementwiseMulKernel<paddle::platform::GPUPlace, float>,
23-
ops::ElementwiseMulKernel<paddle::platform::GPUPlace, double>);
23+
ops::ElementwiseMulKernel<paddle::platform::GPUPlace, double>,
24+
ops::ElementwiseMulKernel<paddle::platform::GPUPlace, int>,
25+
ops::ElementwiseMulKernel<paddle::platform::GPUPlace, int64_t>);
2426
REGISTER_OP_GPU_KERNEL(
2527
elementwise_mul_grad,
2628
ops::ElementwiseMulGradKernel<paddle::platform::GPUPlace, float>,
27-
ops::ElementwiseMulGradKernel<paddle::platform::GPUPlace, double>);
29+
ops::ElementwiseMulGradKernel<paddle::platform::GPUPlace, double>,
30+
ops::ElementwiseMulGradKernel<paddle::platform::GPUPlace, int>,
31+
ops::ElementwiseMulGradKernel<paddle::platform::GPUPlace, int64_t>);

paddle/operators/elementwise_sub_op.cu

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,13 @@ namespace ops = paddle::operators;
1919

2020
REGISTER_OP_GPU_KERNEL(
2121
elementwise_sub,
22-
ops::ElementwiseSubKernel<paddle::platform::GPUPlace, float>);
22+
ops::ElementwiseSubKernel<paddle::platform::GPUPlace, float>,
23+
ops::ElementwiseSubKernel<paddle::platform::GPUPlace, double>,
24+
ops::ElementwiseSubKernel<paddle::platform::GPUPlace, int>,
25+
ops::ElementwiseSubKernel<paddle::platform::GPUPlace, int64_t>);
2326
REGISTER_OP_GPU_KERNEL(
2427
elementwise_sub_grad,
25-
ops::ElementwiseSubGradKernel<paddle::platform::GPUPlace, float>);
28+
ops::ElementwiseSubGradKernel<paddle::platform::GPUPlace, float>,
29+
ops::ElementwiseSubGradKernel<paddle::platform::GPUPlace, double>,
30+
ops::ElementwiseSubGradKernel<paddle::platform::GPUPlace, int>,
31+
ops::ElementwiseSubGradKernel<paddle::platform::GPUPlace, int64_t>);

paddle/scripts/deb/postinst

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)