Skip to content

Commit

Permalink
Remove same dynamic output shapes check
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlieL7 committed Feb 15, 2024
1 parent 6195eb3 commit f6d37d1
Showing 1 changed file with 4 additions and 17 deletions.
21 changes: 4 additions & 17 deletions test/verify/run_verify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,10 @@ inline void compile_check(migraphx::program& p,
for(std::size_t i = 0; i < num; ++i)
{
auto output_shape = p.get_output_shapes()[i];
if(output_shape.dynamic() and shapes[i].dynamic())
{
if(output_shape.dyn_dims() != shapes[i].dyn_dims())
{
std::cout << ss.str() << std::endl;
throw std::runtime_error("Compiling program with " + name +
" alters its dynamic output dimensions");
}
}
else if(not(output_shape.dynamic() or shapes[i].dynamic()))
// for static output shapes check that the intial parsed shapes are
// the same as the ones after compiling
// no check for dynamic shapes because the shapes can change after compiling
if(not output_shape.dynamic() and not shapes[i].dynamic())
{
if(output_shape.lens() != shapes[i].lens())
{
Expand All @@ -106,13 +100,6 @@ inline void compile_check(migraphx::program& p,
" alters its static output dimensions");
}
}
else
{
std::cout << ss.str() << std::endl;
throw std::runtime_error(
"Compiling program with " + name +
" alters its output dimensions (static shape vs dynamic shape)");
}
}
if(t.name() != "ref")
verify_load_save(p);
Expand Down

0 comments on commit f6d37d1

Please sign in to comment.