Commit 15177ac0 authored by Paul's avatar Paul
Browse files

Format

parent f7f61d7a
...@@ -437,10 +437,7 @@ std::string dump_mlir(const module& m) ...@@ -437,10 +437,7 @@ std::string dump_mlir(const module& m)
#else #else
std::string dump_mlir(const module&) std::string dump_mlir(const module&) { return {}; }
{
return {};
}
#endif #endif
......
...@@ -44,7 +44,7 @@ si64]} : (tensor<1x8x4x4xf32>, tensor<2x8x3x3xf32>) -> tensor<1x2x2x2xf32> ...@@ -44,7 +44,7 @@ si64]} : (tensor<1x8x4x4xf32>, tensor<2x8x3x3xf32>) -> tensor<1x2x2x2xf32>
m.add_instruction(migraphx::make_op("convolution"), x, w); m.add_instruction(migraphx::make_op("convolution"), x, w);
auto s = migraphx::gpu::dump_mlir(m); auto s = migraphx::gpu::dump_mlir(m);
// Skip test if MLIR is not enabled // Skip test if MLIR is not enabled
if (s.empty()) if(s.empty())
return; return;
EXPECT(encode(s) == encode(mlir_output)); EXPECT(encode(s) == encode(mlir_output));
} }
...@@ -61,15 +61,15 @@ module { ...@@ -61,15 +61,15 @@ module {
} }
)__migraphx__"; )__migraphx__";
migraphx::module m; migraphx::module m;
auto x = m.add_parameter("x", {migraphx::shape::float_type, {1, 8, 4, 4}}); auto x = m.add_parameter("x", {migraphx::shape::float_type, {1, 8, 4, 4}});
auto w = m.add_parameter("w", {migraphx::shape::float_type, {2, 8, 3, 3}}); auto w = m.add_parameter("w", {migraphx::shape::float_type, {2, 8, 3, 3}});
auto b = m.add_parameter("b", {migraphx::shape::float_type, {1, 2, 2, 2}}); auto b = m.add_parameter("b", {migraphx::shape::float_type, {1, 2, 2, 2}});
auto conv = m.add_instruction(migraphx::make_op("convolution"), x, w); auto conv = m.add_instruction(migraphx::make_op("convolution"), x, w);
auto add = m.add_instruction(migraphx::make_op("add"), conv, b); auto add = m.add_instruction(migraphx::make_op("add"), conv, b);
m.add_instruction(migraphx::make_op("relu"), add); m.add_instruction(migraphx::make_op("relu"), add);
auto s = migraphx::gpu::dump_mlir(m); auto s = migraphx::gpu::dump_mlir(m);
// Skip test if MLIR is not enabled // Skip test if MLIR is not enabled
if (s.empty()) if(s.empty())
return; return;
EXPECT(encode(s) == encode(mlir_output)); EXPECT(encode(s) == encode(mlir_output));
} }
......
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