Commit 56715137 authored by Shucai Xiao's avatar Shucai Xiao
Browse files

save the test example.

parent 246dc9fd
...@@ -29,13 +29,14 @@ struct lowering_target ...@@ -29,13 +29,14 @@ struct lowering_target
migraphx::gpu::context get_context() const { return migraphx::gpu::context{}; } migraphx::gpu::context get_context() const { return migraphx::gpu::context{}; }
}; };
TEST_CASE(trans_tanh) TEST_CASE(tanh_shape)
{ {
auto create_program = [] { auto create_program = [] {
migraphx::program p; migraphx::program p;
migraphx::shape s{migraphx::shape::float_type, {2, 3}}; migraphx::shape s{migraphx::shape::float_type, {2, 3}};
auto x = p.add_parameter("x", s); auto x = p.add_parameter("x", s);
auto txh = p.add_instruction(migraphx::op::tanh{}, x); auto tx = p.add_instruction(migraphx::op::transpose{{1, 0}}, x);
auto txh = p.add_instruction(migraphx::op::tanh{}, tx);
p.add_instruction(migraphx::op::add{}, txh, txh); p.add_instruction(migraphx::op::add{}, txh, txh);
return p; return p;
...@@ -54,7 +55,7 @@ TEST_CASE(trans_tanh) ...@@ -54,7 +55,7 @@ TEST_CASE(trans_tanh)
{ {
if(ins->name() == "hip::allocate") if(ins->name() == "hip::allocate")
{ {
migraphx::shape wrong_s{migraphx::shape::float_type, {4, 3}}; migraphx::shape wrong_s{migraphx::shape::float_type, {2, 2}};
ins->replace(wrong_s); ins->replace(wrong_s);
} }
} }
......
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