From d9239233f211b47cd83872459c3788b9a6d03b51 Mon Sep 17 00:00:00 2001 From: Yinghai Lu Date: Sat, 22 Jun 2019 21:13:00 -0700 Subject: [PATCH] lint --- src/runtime/graph/graph_runtime.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/graph/graph_runtime.cc b/src/runtime/graph/graph_runtime.cc index 0b2a19c0f230f..29f10d593fe64 100644 --- a/src/runtime/graph/graph_runtime.cc +++ b/src/runtime/graph/graph_runtime.cc @@ -123,7 +123,7 @@ void GraphRuntime::SetInputZeroCopy(int index, DLTensor* data_ref) { // check the consistency of input shape CHECK_EQ(GetDataAlignment(*shared), GetDataAlignment(*data_ref)); CHECK(reinterpret_cast(data_ref->data) % kAllocAlignment == 0); - if (shape.size() == data_ref->ndim) { + if (shape.size() == static_cast(data_ref->ndim)) { for (auto i = 0; i < data_ref->ndim; ++i) { CHECK_EQ(shape[i], data_ref->shape[i]); } @@ -316,7 +316,7 @@ void GraphRuntime::SetupStorage() { storage_pool_[storage_id].CreateView(attrs_.shape[i], vtype[i]); dltensor_entry_[i] = std::make_shared(*(data_entry_[i].operator->())); dltensor_entry_shapes_[i].resize(dltensor_entry_[i]->ndim); - for (auto j = 0; j < dltensor_entry_shapes_[i].size(); ++j) { + for (size_t j = 0; j < dltensor_entry_shapes_[i].size(); ++j) { dltensor_entry_shapes_[i][j] = dltensor_entry_[i]->shape[j]; } std::make_shared(*(data_entry_[i].operator->()));