diff --git a/src/onnx/conv.cpp b/src/onnx/conv.cpp index a58e035a93a..a2c74fb7df1 100644 --- a/src/onnx/conv.cpp +++ b/src/onnx/conv.cpp @@ -51,7 +51,7 @@ void recalc_conv_attributes(value& v, size_t kdims) static instruction_ref apply_nhwc_perm(const onnx_parser::node_info& info, instruction_ref ins, - std::function&)> f) + const std::function&)>& f) { std::vector perm(ins->get_shape().ndim()); std::iota(begin(perm), end(perm), 0); @@ -62,18 +62,18 @@ static instruction_ref apply_nhwc_perm(const onnx_parser::node_info& info, instruction_ref from_nhwc(const onnx_parser::node_info& info, instruction_ref ins) { return apply_nhwc_perm(info, ins, [](std::vector& perm) { - auto C = perm.back(); + auto c = perm.back(); perm.pop_back(); - perm.insert(begin(perm) + 1, C); + perm.insert(begin(perm) + 1, c); }); } instruction_ref to_nhwc(const onnx_parser::node_info& info, instruction_ref ins) { return apply_nhwc_perm(info, ins, [](std::vector& perm) { - auto C = perm.at(1); + auto c = perm.at(1); perm.erase(begin(perm) + 1); - perm.push_back(C); + perm.push_back(c); }); } diff --git a/test/onnx/verify/nhwcconv_test.cpp b/test/onnx/verify/nhwcconv_test.cpp index a5131422538..a5006adfbb2 100644 --- a/test/onnx/verify/nhwcconv_test.cpp +++ b/test/onnx/verify/nhwcconv_test.cpp @@ -31,16 +31,10 @@ TEST_CASE(nhwcconv_test) { migraphx::program p = read_onnx("nhwcconv_test.onnx"); - std::cout << "BEFORE COMPILE" << std::endl; - p.debug_print(); - migraphx::compile_options opts; opts.offload_copy = true; p.compile(migraphx::make_target("gpu"), opts); - std::cout << "AFTER COMPILE" << std::endl; - p.debug_print(); - migraphx::shape x_shape{migraphx::shape::float_type, {1, 7, 7, 1}}; std::vector x_data = { 0.45246148109436035f, 0.15498268604278564f, 0.11199361085891724f,