"src/targets/vscode:/vscode.git/clone" did not exist on "6fda1d3e8ace86adebe4c289cb1d648fe673d47b"
Commit cf3dbd36 authored by Paul's avatar Paul
Browse files

Formatting

parent 3405e5bc
......@@ -12,7 +12,7 @@ void auto_contiguous::apply(module& p) const
{
for(auto ins : iterator_for(p))
{
if (ins->name() == "layout")
if(ins->name() == "layout")
continue;
shape s = ins->get_shape();
if(not s.standard() and s.elements() != 0)
......
......@@ -73,7 +73,7 @@ void eliminate_contiguous::apply(module& p) const
if(ins->name() == "@return")
continue;
if (std::none_of(ins->inputs().begin(), ins->inputs().end(), [&](auto arg) {
if(std::none_of(ins->inputs().begin(), ins->inputs().end(), [&](auto arg) {
return arg->name() == op_name;
}))
continue;
......@@ -90,9 +90,9 @@ void eliminate_contiguous::apply(module& p) const
if(try_compute_shape(ins, new_args))
{
for(auto i:range(args.size()))
for(auto i : range(args.size()))
{
if (args[i] == new_args[i])
if(args[i] == new_args[i])
continue;
instruction::replace_argument(ins, args[i], new_args[i]);
}
......@@ -121,8 +121,6 @@ void eliminate_contiguous::apply(module& p) const
}
}
}
}
}
......
......@@ -165,7 +165,10 @@ struct dnnl_op : auto_register_op<Derived>
i++;
}
}
shape adjust_shape(const shape& s, int, const shape& output) const { return base_adjust_shape(s, output); }
shape adjust_shape(const shape& s, int, const shape& output) const
{
return base_adjust_shape(s, output);
}
std::vector<int> create_arg_map(std::size_t input_size) const
{
const auto& self = static_cast<const Derived&>(*this);
......@@ -184,7 +187,8 @@ struct dnnl_op : auto_register_op<Derived>
{
const auto& self = static_cast<const Derived&>(*this);
std::unordered_map<int, dnnl::memory::desc> result;
result[DNNL_ARG_DST] = to_dnnl_memory_desc(self.adjust_shape(output_shape, inputs.size(), output_shape));
result[DNNL_ARG_DST] =
to_dnnl_memory_desc(self.adjust_shape(output_shape, inputs.size(), output_shape));
auto m = create_arg_map(inputs.size());
assert(m.size() >= inputs.size());
for(int i = 0; i < inputs.size(); i++)
......
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