"src/vscode:/vscode.git/clone" did not exist on "806afeb6f4e1ee28086f46826c618e359849959a"
Commit 38f0d386 authored by charlie's avatar charlie
Browse files

formatting

parent 2dff4dd2
...@@ -24,12 +24,12 @@ struct parse_convolution : op_parser<parse_convolution> ...@@ -24,12 +24,12 @@ struct parse_convolution : op_parser<parse_convolution>
onnx_parser::node_info info, onnx_parser::node_info info,
std::vector<instruction_ref> args) const std::vector<instruction_ref> args) const
{ {
auto op = make_op(opd.op_name); auto op = make_op(opd.op_name);
auto values = op.to_value(); auto values = op.to_value();
auto l0 = args[0]; auto l0 = args[0];
auto weights = args[1]; auto weights = args[1];
auto l0_shape = l0->get_shape(); auto l0_shape = l0->get_shape();
auto in_lens = l0_shape.max_lens(); auto in_lens = l0_shape.max_lens();
assert(in_lens.size() > 2); assert(in_lens.size() > 2);
auto kdims = in_lens.size() - 2; auto kdims = in_lens.size() - 2;
......
...@@ -827,6 +827,7 @@ def conv_bn_relu_maxpool_test(): ...@@ -827,6 +827,7 @@ def conv_bn_relu_maxpool_test():
return ([node0, node1, node2, node3], [x, y, z, m, n, k, l], [out]) return ([node0, node1, node2, node3], [x, y, z, m, n, k, l], [out])
@onnx_test @onnx_test
def conv_dynamic_batch_test(): def conv_dynamic_batch_test():
x = helper.make_tensor_value_info('0', TensorProto.FLOAT, [None, 3, 5, 5]) x = helper.make_tensor_value_info('0', TensorProto.FLOAT, [None, 3, 5, 5])
...@@ -840,7 +841,8 @@ def conv_dynamic_batch_test(): ...@@ -840,7 +841,8 @@ def conv_dynamic_batch_test():
@onnx_test @onnx_test
def conv_dynamic_img_test(): def conv_dynamic_img_test():
x = helper.make_tensor_value_info('0', TensorProto.FLOAT, [1, 3, None, None]) x = helper.make_tensor_value_info('0', TensorProto.FLOAT,
[1, 3, None, None])
y = helper.make_tensor_value_info('1', TensorProto.FLOAT, [1, 3, 3, 3]) y = helper.make_tensor_value_info('1', TensorProto.FLOAT, [1, 3, 3, 3])
out = helper.make_tensor_value_info('2', TensorProto.FLOAT, out = helper.make_tensor_value_info('2', TensorProto.FLOAT,
[1, 1, None, None]) [1, 1, None, None])
......
...@@ -777,8 +777,9 @@ TEST_CASE(conv_dynamic_batch_test) ...@@ -777,8 +777,9 @@ TEST_CASE(conv_dynamic_batch_test)
{ {
migraphx::program p; migraphx::program p;
auto* mm = p.get_main_module(); auto* mm = p.get_main_module();
auto l0 = mm->add_parameter("0", {migraphx::shape::float_type, {{1, 6, 0}, {3, 3, 0}, {5, 5, 0}, {5, 5, 0}}}); auto l0 = mm->add_parameter(
auto l1 = mm->add_parameter("1", {migraphx::shape::float_type, {1, 3, 3, 3}}); "0", {migraphx::shape::float_type, {{1, 6, 0}, {3, 3, 0}, {5, 5, 0}, {5, 5, 0}}});
auto l1 = mm->add_parameter("1", {migraphx::shape::float_type, {1, 3, 3, 3}});
auto c0 = mm->add_instruction( auto c0 = mm->add_instruction(
migraphx::make_op("convolution", migraphx::make_op("convolution",
{{"padding", {0, 0}}, {"stride", {1, 1}}, {"dilation", {1, 1}}}), {{"padding", {0, 0}}, {"stride", {1, 1}}, {"dilation", {1, 1}}}),
...@@ -797,8 +798,9 @@ TEST_CASE(conv_dynamic_img_test) ...@@ -797,8 +798,9 @@ TEST_CASE(conv_dynamic_img_test)
{ {
migraphx::program p; migraphx::program p;
auto* mm = p.get_main_module(); auto* mm = p.get_main_module();
auto l0 = mm->add_parameter("0", {migraphx::shape::float_type, {{1, 1, 0}, {3, 3, 0}, {5, 10, 0}, {5, 10, 0}}}); auto l0 = mm->add_parameter(
auto l1 = mm->add_parameter("1", {migraphx::shape::float_type, {1, 3, 3, 3}}); "0", {migraphx::shape::float_type, {{1, 1, 0}, {3, 3, 0}, {5, 10, 0}, {5, 10, 0}}});
auto l1 = mm->add_parameter("1", {migraphx::shape::float_type, {1, 3, 3, 3}});
auto c0 = mm->add_instruction( auto c0 = mm->add_instruction(
migraphx::make_op("convolution", migraphx::make_op("convolution",
{{"padding", {0, 0}}, {"stride", {1, 1}}, {"dilation", {1, 1}}}), {{"padding", {0, 0}}, {"stride", {1, 1}}, {"dilation", {1, 1}}}),
......
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