Commit 19e87ea1 authored by Shucai Xiao's avatar Shucai Xiao
Browse files

fixed a test example corresponding to a change in eliminate_contiguous.

parent c2b7f349
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include <migraphx/iterator_for.hpp> #include <migraphx/iterator_for.hpp>
#include <migraphx/op/add.hpp> #include <migraphx/op/add.hpp>
#include <migraphx/op/transpose.hpp> #include <migraphx/op/transpose.hpp>
#include <migraphx/op/contiguous.hpp>
#include <migraphx/instruction.hpp> #include <migraphx/instruction.hpp>
#include <migraphx/pass_manager.hpp> #include <migraphx/pass_manager.hpp>
#include <migraphx/op/tanh.hpp> #include <migraphx/op/tanh.hpp>
...@@ -37,7 +38,8 @@ TEST_CASE(tanh_shape) ...@@ -37,7 +38,8 @@ TEST_CASE(tanh_shape)
auto x = p.add_parameter("x", s); auto x = p.add_parameter("x", s);
auto tx = p.add_instruction(migraphx::op::transpose{{1, 0}}, x); auto tx = p.add_instruction(migraphx::op::transpose{{1, 0}}, x);
auto txh = p.add_instruction(migraphx::op::tanh{}, tx); auto txh = p.add_instruction(migraphx::op::tanh{}, tx);
p.add_instruction(migraphx::op::add{}, txh, txh); auto sum = p.add_instruction(migraphx::op::add{}, txh, txh);
p.add_instruction(migraphx::op::contiguous{}, sum);
return p; return p;
}; };
...@@ -61,7 +63,7 @@ TEST_CASE(tanh_shape) ...@@ -61,7 +63,7 @@ TEST_CASE(tanh_shape)
} }
EXPECT(p1 != p2); EXPECT(p1 != p2);
migraphx::run_passes(p1, migraphx::run_passes(p2,
{migraphx::gpu::adjust_allocation{}, migraphx::dead_code_elimination{}}); {migraphx::gpu::adjust_allocation{}, migraphx::dead_code_elimination{}});
EXPECT(p1 == p2); EXPECT(p1 == p2);
} }
......
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