"docs/en_US/git@developer.sourcefind.cn:OpenDAS/nni.git" did not exist on "5946b4a4ae24714211b5b29aa9096bc0ee7ed570"
Commit 8fbb7af9 authored by Khalique Ahmed's avatar Khalique Ahmed
Browse files

some mlir changes

parent 94cf1bf3
...@@ -179,7 +179,7 @@ struct find_mlir_op ...@@ -179,7 +179,7 @@ struct find_mlir_op
} }
top_inputs.push_back(input); top_inputs.push_back(input);
instruction_ref prev_input = instruction_ref prev_input =
mm->add_parameter("y" + std::to_string(input_cnt++), input->get_shape()); mm->add_parameter("y" + std::to_string(input_cnt++), {input->get_shape().type(), input->get_shape().lens()});
for(const auto& op : reverse(op_stream)) for(const auto& op : reverse(op_stream))
{ {
prev_input = mm->add_instruction(op, {prev_input}); prev_input = mm->add_instruction(op, {prev_input});
......
...@@ -767,9 +767,9 @@ void adjust_param_shapes(module& m, const std::vector<instruction_ref>& inputs) ...@@ -767,9 +767,9 @@ void adjust_param_shapes(module& m, const std::vector<instruction_ref>& inputs)
{ {
auto perm = find_permutation(input); auto perm = find_permutation(input);
auto iperm = invert_permutation(perm); auto iperm = invert_permutation(perm);
lens = reorder_dims(lens, iperm); lens = reorder_dims(lens, perm);
strides = reorder_dims(strides, iperm); strides = reorder_dims(strides, perm);
ops.push_back(make_op("transpose", {{"permutation", perm}})); ops.push_back(make_op("transpose", {{"permutation", iperm}}));
} }
if(input.broadcasted()) if(input.broadcasted())
{ {
......
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