Commit 44de83e1 authored by Ted Themistokleous's avatar Ted Themistokleous
Browse files

fixup! Add test to verify compute with @divzero asserts correclty

parent 0b5cdb01
...@@ -1422,13 +1422,8 @@ TEST_CASE(div_zero_compute_shape_fails) ...@@ -1422,13 +1422,8 @@ TEST_CASE(div_zero_compute_shape_fails)
migraphx::program p; migraphx::program p;
auto* mm = p.get_main_module(); auto* mm = p.get_main_module();
auto zero = mm->add_literal(0.0f); auto zero = mm->add_literal(0.0f);
auto two = mm->add_literal(2.0f);
auto x = mm->add_parameter("x", {migraphx::shape::float_type, {1}}); auto x = mm->add_parameter("x", {migraphx::shape::float_type, {1}});
auto y = mm->add_parameter("y", {migraphx::shape::float_type, {1}}); auto div0 = mm->add_divzero({x, zero}, {migraphx::shape::float_type, {1}});
auto div0 = mm->add_instruction(migraphx::make_op("div"), x, zero);
auto mul = mm->add_instruction(migraphx::make_op("mul"), two, div0);
auto add = mm->add_instruction(migraphx::make_op("add"), y, mul);
mm->add_instruction(migraphx::make_op("sub"), y, add);
run_pass(*mm); run_pass(*mm);
......
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