Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
okdshin committed Oct 9, 2018
1 parent 6c9c64c commit 4d5ba18
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ namespace menoh_impl {
std::pair<std::string, std::unique_ptr<context>>> const&
context_list,
logger_handle logger) {
static_cast<void>(output_profile_table); // maybe unused
auto first_node_index = current_index;
std::vector<procedure> procedure_list;

Expand Down
6 changes: 3 additions & 3 deletions test/backend.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ namespace menoh {
menoh::model_data model_data;
model_data.add_new_node("Add");
std::vector<std::pair<std::string, std::string>> inputs;
for(int32_t i = 0; i < input_filename_list.size(); ++i) {
for(unsigned int i = 0; i < input_filename_list.size(); ++i) {
auto const& filename = input_filename_list.at(i);
inputs.push_back({"input" + std::to_string(i), filename});
}
Expand Down Expand Up @@ -123,7 +123,7 @@ namespace menoh {
model_data.add_new_node("Concat");
model_data.add_attribute_int_to_current_node("axis", axis);
std::vector<std::pair<std::string, std::string>> inputs;
for(int32_t i = 0; i < input_filename_list.size(); ++i) {
for(unsigned int i = 0; i < input_filename_list.size(); ++i) {
auto const& filename = input_filename_list.at(i);
inputs.push_back({"input" + std::to_string(i), filename});
}
Expand Down Expand Up @@ -228,7 +228,7 @@ namespace menoh {
menoh::model_data model_data;
model_data.add_new_node("Sum");
std::vector<std::pair<std::string, std::string>> inputs;
for(int32_t i = 0; i < input_filename_list.size(); ++i) {
for(unsigned int i = 0; i < input_filename_list.size(); ++i) {
auto const& filename = input_filename_list.at(i);
inputs.push_back({"input" + std::to_string(i), filename});
}
Expand Down
2 changes: 1 addition & 1 deletion test/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ namespace menoh_impl {
return false;
}
auto size = total_size(lhs);
for(auto i = 0; i < size; ++i) {
for(unsigned int i = 0; i < size; ++i) {
float l = *(static_cast<float*>(lhs.data()) + i);
float r = *(static_cast<float*>(rhs.data()) + i);
if(!(l - eps < r && r < l + eps)) {
Expand Down
1 change: 0 additions & 1 deletion test/mkldnn_with_generic_fallback_backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ namespace menoh {
std::vector<float> true_output_data;
std::tie(std::ignore, output_dims, true_output_data) =
menoh_impl::load_np_array(true_output_filename);
dtype_t dtype = dtype_t::float_; // TODO other dtype
if(output_name == "relu_out") {
std::transform(true_output_data.begin(), true_output_data.end(),
true_output_data.begin(),
Expand Down
5 changes: 3 additions & 2 deletions test/operator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ namespace {
input.dims);
}
for(auto const& output : true_output_list) {
vpt_builder.add_output_profile(output.name, output.dtype);
vpt_builder.add_output_name(output.name);
}
auto onnx_model_filename = parent_dir_path / "model.onnx";
auto model_data =
Expand All @@ -135,9 +135,10 @@ namespace {
auto static_cast_to_float_ptr = [](auto p) {
return static_cast<float*>(static_cast<void*>(p));
};
for(int output_index = 0;
for(unsigned int output_index = 0;
output_index < true_output_list.size(); ++output_index) {
auto const& input = input_list.front();
static_cast<void>(input); // maybe unused
auto const& output = output_list.at(output_index);
auto const& true_output = true_output_list.at(output_index);
auto total_size = std::accumulate(true_output.dims.begin(),
Expand Down

0 comments on commit 4d5ba18

Please sign in to comment.