Skip to content

Commit 698698f

Browse files
authored
Merge branch 'develop' into fix_vlog
2 parents 87450b9 + abe2092 commit 698698f

32 files changed

+1649
-835
lines changed

cmake/external/mkldnn.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ IF(${CBLAS_PROVIDER} STREQUAL "MKLML")
4545
ELSE()
4646
MESSAGE(FATAL_ERROR "Should enable MKLML when build MKLDNN")
4747
ENDIF()
48-
SET(MKLDNN_FLAG "-Wno-error=strict-overflow -Wno-error=unused-result")
48+
SET(MKLDNN_FLAG "-Wno-error=strict-overflow -Wno-error=unused-result -Wno-error=array-bounds")
4949
SET(MKLDNN_FLAG "${MKLDNN_FLAG} -Wno-unused-result -Wno-unused-value")
5050
SET(MKLDNN_CFLAG "${CMAKE_C_FLAGS} ${MKLDNN_FLAG}")
5151
SET(MKLDNN_CXXFLAG "${CMAKE_CXX_FLAGS} ${MKLDNN_FLAG}")
@@ -54,7 +54,7 @@ ExternalProject_Add(
5454
${EXTERNAL_PROJECT_LOG_ARGS}
5555
DEPENDS ${MKLDNN_DEPENDS}
5656
GIT_REPOSITORY "https://github.com/01org/mkl-dnn.git"
57-
GIT_TAG "64e03a1939e0d526aa8e9f2e3f7dc0ad8d372944"
57+
GIT_TAG "21fb5f2af1dd14e132af4f1b79160977ee487818"
5858
PREFIX ${MKLDNN_SOURCES_DIR}
5959
UPDATE_COMMAND ""
6060
CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}

paddle/fluid/API.spec

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,10 @@ paddle.fluid.layers.label_smooth ArgSpec(args=['label', 'prior_dist', 'epsilon',
118118
paddle.fluid.layers.roi_pool ArgSpec(args=['input', 'rois', 'pooled_height', 'pooled_width', 'spatial_scale'], varargs=None, keywords=None, defaults=(1, 1, 1.0))
119119
paddle.fluid.layers.roi_align ArgSpec(args=['input', 'rois', 'pooled_height', 'pooled_width', 'spatial_scale', 'sampling_ratio', 'name'], varargs=None, keywords=None, defaults=(1, 1, 1.0, -1, None))
120120
paddle.fluid.layers.dice_loss ArgSpec(args=['input', 'label', 'epsilon'], varargs=None, keywords=None, defaults=(1e-05,))
121-
paddle.fluid.layers.image_resize ArgSpec(args=['input', 'out_shape', 'scale', 'name', 'resample'], varargs=None, keywords=None, defaults=(None, None, None, 'BILINEAR'))
121+
paddle.fluid.layers.image_resize ArgSpec(args=['input', 'out_shape', 'scale', 'name', 'resample', 'actual_shape'], varargs=None, keywords=None, defaults=(None, None, None, 'BILINEAR', None))
122122
paddle.fluid.layers.image_resize_short ArgSpec(args=['input', 'out_short_len', 'resample'], varargs=None, keywords=None, defaults=('BILINEAR',))
123-
paddle.fluid.layers.resize_bilinear ArgSpec(args=['input', 'out_shape', 'scale', 'name'], varargs=None, keywords=None, defaults=(None, None, None))
123+
paddle.fluid.layers.resize_bilinear ArgSpec(args=['input', 'out_shape', 'scale', 'name', 'actual_shape'], varargs=None, keywords=None, defaults=(None, None, None, None))
124+
paddle.fluid.layers.resize_nearest ArgSpec(args=['input', 'out_shape', 'scale', 'name', 'actual_shape'], varargs=None, keywords=None, defaults=(None, None, None, None))
124125
paddle.fluid.layers.gather ArgSpec(args=['input', 'index'], varargs=None, keywords=None, defaults=None)
125126
paddle.fluid.layers.scatter ArgSpec(args=['input', 'index', 'updates', 'name'], varargs=None, keywords=None, defaults=(None,))
126127
paddle.fluid.layers.sequence_scatter ArgSpec(args=['input', 'index', 'updates', 'name'], varargs=None, keywords=None, defaults=(None,))

paddle/fluid/inference/analysis/analyzer.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ Analyzer::Analyzer() { Register("manager1", new DfgPassManagerImpl); }
101101

102102
void Analyzer::Run(Argument* argument) {
103103
std::vector<std::string> passes;
104+
passes.push_back("graph_viz_pass"); // add graphviz for debug.
104105
#ifdef PADDLE_WITH_MKLDNN
105106
if (use_mkldnn_) {
106107
VLOG(30) << "Adding MKL-DNN placement pass";
@@ -110,13 +111,13 @@ void Analyzer::Run(Argument* argument) {
110111
// infer_clean_graph_pass should be the first default pass
111112
// after mkldnn_placement_pass.
112113
passes.push_back("infer_clean_graph_pass");
114+
passes.push_back("graph_viz_pass"); // add graphviz for debug.
113115
for (auto& pass : ir_passes_) {
114116
if (!disabled_ir_passes_.count(pass)) {
115117
passes.push_back(pass);
116118
passes.push_back("graph_viz_pass"); // add graphviz for debug.
117119
}
118120
}
119-
passes.push_back("graph_viz_pass");
120121
argument->Set(kFluidToIrPassesAttr, new std::vector<std::string>(passes));
121122

122123
for (auto& x : data_) {

paddle/fluid/inference/api/analysis_predictor.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
// limitations under the License.
1414

1515
#pragma once
16+
#include <algorithm>
17+
#include <map>
1618
#include <string>
1719
#include <vector>
1820
#include "paddle/fluid/framework/naive_executor.h"

paddle/fluid/inference/io.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ void ReadBinaryFile(const std::string& filename, std::string* contents) {
5959
bool IsPersistable(const framework::VarDesc* var) {
6060
if (var->Persistable() &&
6161
var->GetType() != framework::proto::VarType::FEED_MINIBATCH &&
62-
var->GetType() != framework::proto::VarType::FETCH_LIST) {
62+
var->GetType() != framework::proto::VarType::FETCH_LIST &&
63+
var->GetType() != framework::proto::VarType::RAW) {
6364
return true;
6465
}
6566
return false;

paddle/fluid/inference/tensorrt/engine.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class TensorRTEngine : public EngineBase {
134134
std::unordered_map<std::string /*name*/, std::unique_ptr<framework::Tensor>>
135135
weight_map;
136136

137-
// TODO: (NHZLX)
137+
// TODO(NHZLX)
138138
// In the normal case, the paddle-trt exists bug when runing the googlenet.
139139
// When there are more than two convolutions of 1 * 1 with the same input, the
140140
// paddle-tensorrt will do the merging optimization, which fuse those conv

paddle/fluid/operators/add_position_encoding_op.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,10 @@ class AddPositionEncodingKernel : public framework::OpKernel<T> {
6666
x_lod.empty() ? max_seq_len : x_lod[0][i + 1] - x_lod[0][i];
6767
for (int j = 0; j < max_length; ++j) {
6868
for (int k = 0; k < half_size; ++k) {
69-
const double val = (half_size > 1)
70-
? j / pow(10000.0, double(k) / (half_size - 1))
71-
: j / 10000.0;
69+
const double val =
70+
(half_size > 1)
71+
? j / pow(10000.0, static_cast<double>(k) / (half_size - 1))
72+
: j / 10000.0;
7273
dst_ptr[k] = src_ptr[k] * alpha + sin(val) * beta;
7374
dst_ptr[half_size + k] =
7475
src_ptr[half_size + k] * alpha + cos(val) * beta;

paddle/fluid/operators/bilinear_interp_op.cu

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

0 commit comments

Comments
 (0)