Commit 6c27e905 authored by Paul's avatar Paul
Browse files

Fix tidy warnings

parent 41be2a5c
...@@ -16,7 +16,7 @@ struct module_pass_manager; ...@@ -16,7 +16,7 @@ struct module_pass_manager;
struct layout_nhwc struct layout_nhwc
{ {
std::string name() const { return "layout_nhwc"; } std::string name() const { return "layout_nhwc"; }
void apply(module_pass_manager& m) const; void apply(module_pass_manager& mpm) const;
}; };
} // namespace MIGRAPHX_INLINE_NS } // namespace MIGRAPHX_INLINE_NS
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include <migraphx/streamutils.hpp> #include <migraphx/streamutils.hpp>
#include <migraphx/literal.hpp> #include <migraphx/literal.hpp>
#include <migraphx/op/unary.hpp> #include <migraphx/op/unary.hpp>
#include <migraphx/config.hpp>
#include <cmath> #include <cmath>
#include <utility> #include <utility>
......
...@@ -56,7 +56,7 @@ void transform_convolutions(module& m) ...@@ -56,7 +56,7 @@ void transform_convolutions(module& m)
if(v.at("group").to<int>() > 1) if(v.at("group").to<int>() > 1)
continue; continue;
auto args = ins->inputs(); auto args = ins->inputs();
std::transform(args.begin(), args.end(), args.begin(), [&](auto& i) { std::transform(args.begin(), args.end(), args.begin(), [&](const auto& i) {
return m.insert_instruction(ins, make_op("layout", {{"permutation", {0, 2, 3, 1}}}), i); return m.insert_instruction(ins, make_op("layout", {{"permutation", {0, 2, 3, 1}}}), i);
}); });
auto conv = m.insert_instruction(ins, ins->get_operator(), args); auto conv = m.insert_instruction(ins, ins->get_operator(), args);
......
...@@ -49,21 +49,20 @@ struct dnnl_binary : dnnl_op<dnnl_binary, dnnl::binary> ...@@ -49,21 +49,20 @@ struct dnnl_binary : dnnl_op<dnnl_binary, dnnl::binary>
auto s0 = inputs.at(0); auto s0 = inputs.at(0);
auto s1 = inputs.at(1); auto s1 = inputs.at(1);
auto r = s0; auto r = s0;
if(s0 == s1 and s0.packed()) if(s0 != s1 or not s0.packed())
{ {
r = s0; if(s0.packed() != s1.packed())
} {
else if(s0.packed() != s1.packed()) r = s0.packed() ? s0 : s1;
{ }
r = s0.packed() ? s0 : s1; else if(s0.broadcasted() != s1.broadcasted())
} {
else if(s0.broadcasted() != s1.broadcasted()) r = s0.broadcasted() ? s1.with_lens(s0.lens()) : s0.with_lens(s0.lens());
{ }
r = s0.broadcasted() ? s1.with_lens(s0.lens()) : s0.with_lens(s0.lens()); else
} {
else r = {s0.type(), s0.lens()};
{ }
r = {s0.type(), s0.lens()};
} }
// Call to get_primitive to make sure an algo is available // Call to get_primitive to make sure an algo is available
this->get_primitive(this->to_memory_desc(r, inputs)); this->get_primitive(this->to_memory_desc(r, inputs));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment