Skip to content

Commit 55ecd6d

Browse files
authored
Merge pull request #5797 from luotao1/fix_warning
fix some warning with MKLDNN related codes and etc
2 parents 95de6f5 + 67fa0de commit 55ecd6d

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

paddle/gserver/layers/MKLDNNLayer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class MKLDNNLayer : public Layer {
3636
protected:
3737
// batch size
3838
int bs_;
39-
// they sizes are always from the first input layer
39+
// their sizes are always from the first input layer
4040
// input image channel, height and width
4141
int ic_, ih_, iw_;
4242
// output image channel, height and width

paddle/gserver/tests/test_MKLDNN.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ TEST(MKLDNNLayer, AddtoLayer) {
315315

316316
static void getMKLDNNConcatConfig(TestConfig& cfg,
317317
const std::vector<testImageDesc>& inputs) {
318-
CHECK_GE(inputs.size(), 2) << "at least two inputs";
318+
CHECK_GE(inputs.size(), 2UL) << "at least two inputs";
319319
int oc = inputs[0].ic;
320320
for (size_t i = 1; i < inputs.size(); ++i) {
321321
CHECK_EQ(inputs[i].bs, inputs[0].bs);

paddle/operators/beam_search_op.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ bool BeamSearch::NextItemSet(std::vector<BeamSearch::Item> *items) {
139139
items->reserve(framework::product(ids.dims()));
140140
for (size_t offset = abs_lod[lod_level_][sent_offset_];
141141
offset < abs_lod[lod_level_][sent_offset_ + 1]; offset++) {
142-
for (int d = 0; d < instance_dim; d++) {
142+
for (size_t d = 0; d < instance_dim; d++) {
143143
const size_t dim_offset = offset * instance_dim + d;
144144
items->emplace_back(offset, ids_data[dim_offset],
145145
scores_data[dim_offset]);

paddle/trainer/Trainer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ void Trainer::init(const std::shared_ptr<TrainerConfigHelper>& config,
138138
}
139139

140140
if (FLAGS_use_mkldnn) {
141-
CHECK_EQ(FLAGS_trainer_count, 1UL) << "MKLDNN only need 1 trainer";
141+
CHECK_EQ(FLAGS_trainer_count, 1) << "MKLDNN only need 1 trainer";
142142
}
143143

144144
if (testing) {

0 commit comments

Comments
 (0)