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

Format

parent 174c2d06
...@@ -680,7 +680,8 @@ struct find_contiguous_tranpose_precompile ...@@ -680,7 +680,8 @@ struct find_contiguous_tranpose_precompile
auto matcher() const auto matcher() const
{ {
return match::name("gpu::contiguous")(match::arg(0)( return match::name("gpu::contiguous")(match::arg(0)(
match::name("transpose")(match::used_once(), match::name("transpose")(
match::used_once(),
match::arg(0)(match::name("gpu::precompile_op")(match::used_once()).bind("op"))) match::arg(0)(match::name("gpu::precompile_op")(match::used_once()).bind("op")))
.bind("transpose"))); .bind("transpose")));
} }
...@@ -693,8 +694,8 @@ struct find_contiguous_tranpose_precompile ...@@ -693,8 +694,8 @@ struct find_contiguous_tranpose_precompile
auto transpose = r.instructions["transpose"]; auto transpose = r.instructions["transpose"];
auto perm = transpose->get_operator().to_value()["permutation"].to_vector<int64_t>(); auto perm = transpose->get_operator().to_value()["permutation"].to_vector<int64_t>();
auto iperm = invert_permutation(perm); auto iperm = invert_permutation(perm);
auto s = auto s = shape::from_permutation(
shape::from_permutation(op_ins->get_shape().type(), op_ins->get_shape().lens(), perm); // perm or iperm? op_ins->get_shape().type(), op_ins->get_shape().lens(), perm); // perm or iperm?
auto v = op_ins->get_operator().to_value(); auto v = op_ins->get_operator().to_value();
v["output_shape"] = to_value(s); v["output_shape"] = to_value(s);
auto new_op = make_op("gpu::precompile_op", v); auto new_op = make_op("gpu::precompile_op", v);
......
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