Skip to content

Commit

Permalink
Add strict type
Browse files Browse the repository at this point in the history
  • Loading branch information
pfultz2 committed Apr 18, 2024
1 parent 37a2e53 commit 371ac33
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/op_shape_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2466,6 +2466,20 @@ TEST_CASE(pointwise_no_output)
EXPECT(test::throws([&] { mm->add_instruction(migraphx::make_op("pointwise"), args, {&m}); }));
}

TEST_CASE(pointwise_strict_type)
{
migraphx::shape s{migraphx::shape::float_type, {2, 3}};
migraphx::program p;
auto* mm = p.get_main_module();
migraphx::module pm;
{
auto x = pm.add_parameter("x", s.with_type(migraphx::shape::half_type));
pm.add_return({x});
}
auto x = mm->add_parameter("x", s);
EXPECT(test::throws([&] { mm->add_instruction(migraphx::make_op("pointwise"), {x}, {&pm}); }));
}

TEST_CASE(pooling_shape0)
{
migraphx::shape input{migraphx::shape::float_type, {4, 3, 3, 3}};
Expand Down

0 comments on commit 371ac33

Please sign in to comment.