diff --git a/src/c_api/c_api_symbolic.cc b/src/c_api/c_api_symbolic.cc index a847b7409f6b..31816a71987e 100644 --- a/src/c_api/c_api_symbolic.cc +++ b/src/c_api/c_api_symbolic.cc @@ -1402,17 +1402,17 @@ int MXOptimizeForBackend(SymbolHandle sym_handle, // create the input shape, dtype and stype maps std::unordered_map input_shape_map(num_input_shapes); - for (int i = 0; i < num_input_shapes; ++i) { + for (uint32_t i = 0; i < num_input_shapes; ++i) { input_shape_map.emplace(input_shape_names[i], mxnet::TShape(input_shape_data + input_shape_idx[i], input_shape_data + input_shape_idx[i+1])); } std::unordered_map input_dtype_map(num_input_dtypes); - for (int i = 0; i < num_input_dtypes; ++i) { + for (uint32_t i = 0; i < num_input_dtypes; ++i) { input_dtype_map.emplace(input_dtype_names[i], input_dtypes[i]); } std::unordered_map input_stype_map(num_input_stypes); - for (int i = 0; i < num_input_stypes; ++i) { + for (uint32_t i = 0; i < num_input_stypes; ++i) { input_stype_map.emplace(input_stype_names[i], input_stypes[i]); }