Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Yinghai Lu committed Jun 23, 2019
1 parent e933e5c commit d923923
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/runtime/graph/graph_runtime.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<size_t>(data_ref->data) % kAllocAlignment == 0);
if (shape.size() == data_ref->ndim) {
if (shape.size() == static_cast<size_t>(data_ref->ndim)) {
for (auto i = 0; i < data_ref->ndim; ++i) {
CHECK_EQ(shape[i], data_ref->shape[i]);
}
Expand Down Expand Up @@ -316,7 +316,7 @@ void GraphRuntime::SetupStorage() {
storage_pool_[storage_id].CreateView(attrs_.shape[i], vtype[i]);
dltensor_entry_[i] = std::make_shared<DLTensor>(*(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<DLTensor>(*(data_entry_[i].operator->()));
Expand Down

0 comments on commit d923923

Please sign in to comment.