Unverified Commit 2ffbfb1f authored by Robert Kimball's avatar Robert Kimball Committed by GitHub

rename files to .png since that is the format the files really y are (#2721)

parent bf7c6f68
......@@ -378,9 +378,9 @@ TEST(algebraic_simplification, concat_reshape_slice)
auto concat = make_shared<op::Concat>(NodeVector{reshape1, reshape2, reshape3}, concat_axis);
pass::Manager pass_manager;
pass_manager.register_pass<pass::VisualizeTree>("before.pdf");
pass_manager.register_pass<pass::VisualizeTree>("before.png");
pass_manager.register_pass<pass::AlgebraicSimplification>();
pass_manager.register_pass<pass::VisualizeTree>("after.pdf");
pass_manager.register_pass<pass::VisualizeTree>("after.png");
auto f = std::make_shared<Function>(ngraph::NodeVector{concat}, ParameterVector{a});
pass_manager.run_passes(f);
......@@ -401,9 +401,9 @@ TEST(algebraic_simplification, concat_slice)
auto concat = make_shared<op::Concat>(NodeVector{slice1, slice2, slice3}, concat_axis);
pass::Manager pass_manager;
pass_manager.register_pass<pass::VisualizeTree>("before.pdf");
pass_manager.register_pass<pass::VisualizeTree>("before.png");
pass_manager.register_pass<pass::AlgebraicSimplification>();
pass_manager.register_pass<pass::VisualizeTree>("after.pdf");
pass_manager.register_pass<pass::VisualizeTree>("after.png");
auto f = std::make_shared<Function>(ngraph::NodeVector{concat}, ParameterVector{a});
pass_manager.run_passes(f);
......@@ -421,9 +421,9 @@ TEST(algebraic_simplification, concat_parameter_slice)
auto concat = make_shared<op::Concat>(NodeVector{slice1, slice2, slice3}, concat_axis);
pass::Manager pass_manager;
pass_manager.register_pass<pass::VisualizeTree>("before.pdf");
pass_manager.register_pass<pass::VisualizeTree>("before.png");
pass_manager.register_pass<pass::AlgebraicSimplification>();
pass_manager.register_pass<pass::VisualizeTree>("after.pdf");
pass_manager.register_pass<pass::VisualizeTree>("after.png");
auto f = std::make_shared<Function>(ngraph::NodeVector{concat}, ParameterVector{a});
pass_manager.run_passes(f);
......@@ -441,9 +441,9 @@ TEST(algebraic_simplification, concat_parameter_slices_reversed)
auto concat = make_shared<op::Concat>(NodeVector{slice3, slice2, slice1}, concat_axis);
pass::Manager pass_manager;
pass_manager.register_pass<pass::VisualizeTree>("before.pdf");
pass_manager.register_pass<pass::VisualizeTree>("before.png");
pass_manager.register_pass<pass::AlgebraicSimplification>();
pass_manager.register_pass<pass::VisualizeTree>("after.pdf");
pass_manager.register_pass<pass::VisualizeTree>("after.png");
auto f = std::make_shared<Function>(ngraph::NodeVector{concat}, ParameterVector{a});
pass_manager.run_passes(f);
......@@ -462,9 +462,9 @@ TEST(algebraic_simplification, concat_parameter_slices_element_count)
auto concat = make_shared<op::Concat>(NodeVector{slice1, slice2, slice3}, concat_axis);
pass::Manager pass_manager;
pass_manager.register_pass<pass::VisualizeTree>("before.pdf");
pass_manager.register_pass<pass::VisualizeTree>("before.png");
pass_manager.register_pass<pass::AlgebraicSimplification>();
pass_manager.register_pass<pass::VisualizeTree>("after.pdf");
pass_manager.register_pass<pass::VisualizeTree>("after.png");
auto f = std::make_shared<Function>(ngraph::NodeVector{concat}, ParameterVector{a});
pass_manager.run_passes(f);
......@@ -482,9 +482,9 @@ TEST(algebraic_simplification, concat_parameter_non_uniform_slices)
auto concat = make_shared<op::Concat>(NodeVector{slice1, slice2, slice3}, concat_axis);
pass::Manager pass_manager;
pass_manager.register_pass<pass::VisualizeTree>("before.pdf");
pass_manager.register_pass<pass::VisualizeTree>("before.png");
pass_manager.register_pass<pass::AlgebraicSimplification>();
pass_manager.register_pass<pass::VisualizeTree>("after.pdf");
pass_manager.register_pass<pass::VisualizeTree>("after.png");
auto f = std::make_shared<Function>(ngraph::NodeVector{concat}, ParameterVector{a});
pass_manager.run_passes(f);
......@@ -507,9 +507,9 @@ TEST(algebraic_simplification, concat_different_goes)
auto concat = make_shared<op::Concat>(NodeVector{slice1, slice2, slice3}, concat_axis);
pass::Manager pass_manager;
pass_manager.register_pass<pass::VisualizeTree>("before.pdf");
pass_manager.register_pass<pass::VisualizeTree>("before.png");
pass_manager.register_pass<pass::AlgebraicSimplification>();
pass_manager.register_pass<pass::VisualizeTree>("after.pdf");
pass_manager.register_pass<pass::VisualizeTree>("after.png");
auto f = std::make_shared<Function>(ngraph::NodeVector{concat}, ParameterVector{a});
pass_manager.run_passes(f);
......
......@@ -69,10 +69,10 @@ TEST(concat_fusion, single_branch)
auto baseline_input_shape = baseline_f->get_parameters().at(0)->get_shape();
pass::Manager pass_manager;
pass_manager.register_pass<pass::VisualizeTree>("before_single_branch.pdf");
pass_manager.register_pass<pass::VisualizeTree>("before_single_branch.png");
pass_manager.register_pass<pass::ConcatElimination>();
pass_manager.register_pass<pass::SelfConcatFusion>();
pass_manager.register_pass<pass::VisualizeTree>("after_single_branch.pdf");
pass_manager.register_pass<pass::VisualizeTree>("after_single_branch.png");
pass_manager.run_passes(optimized_f);
test::Uniform<float> rng(0.0f, 100.0f);
......@@ -116,10 +116,10 @@ TEST(concat_fusion, multiple_branches_1)
auto baseline_input_shape = baseline_f->get_parameters().at(0)->get_shape();
pass::Manager pass_manager;
pass_manager.register_pass<pass::VisualizeTree>("before_multiple_branches_1.pdf");
pass_manager.register_pass<pass::VisualizeTree>("before_multiple_branches_1.png");
pass_manager.register_pass<pass::ConcatElimination>();
pass_manager.register_pass<pass::SelfConcatFusion>();
pass_manager.register_pass<pass::VisualizeTree>("after_multiple_branches_1.pdf");
pass_manager.register_pass<pass::VisualizeTree>("after_multiple_branches_1.png");
pass_manager.run_passes(optimized_f);
test::Uniform<float> rng(0.0f, 100.0f);
......@@ -159,10 +159,10 @@ TEST(concat_fusion, multiple_branches_2)
auto baseline_input_shape = baseline_f->get_parameters().at(0)->get_shape();
pass::Manager pass_manager;
pass_manager.register_pass<pass::VisualizeTree>("before_multiple_branches_2.pdf");
pass_manager.register_pass<pass::VisualizeTree>("before_multiple_branches_2.png");
pass_manager.register_pass<pass::ConcatElimination>();
pass_manager.register_pass<pass::SelfConcatFusion>();
pass_manager.register_pass<pass::VisualizeTree>("after_multiple_branches_2.pdf");
pass_manager.register_pass<pass::VisualizeTree>("after_multiple_branches_2.png");
pass_manager.run_passes(optimized_f);
test::Uniform<float> rng(0.0f, 100.0f);
......@@ -211,10 +211,10 @@ TEST(concat_fusion, non_fusable_self_concat)
auto baseline_input_shape_2 = baseline_f->get_parameters().at(1)->get_shape();
pass::Manager pass_manager;
pass_manager.register_pass<pass::VisualizeTree>("before_non_fusable_self_concat.pdf");
pass_manager.register_pass<pass::VisualizeTree>("before_non_fusable_self_concat.png");
pass_manager.register_pass<pass::ConcatElimination>();
pass_manager.register_pass<pass::SelfConcatFusion>();
pass_manager.register_pass<pass::VisualizeTree>("after_non_fusable_self_concat.pdf");
pass_manager.register_pass<pass::VisualizeTree>("after_non_fusable_self_concat.png");
pass_manager.run_passes(optimized_f);
test::Uniform<float> rng(0.0f, 100.0f);
......@@ -266,10 +266,10 @@ TEST(concat_fusion, self_concat_with_fan_out)
auto baseline_input_shape_2 = baseline_f->get_parameters().at(1)->get_shape();
pass::Manager pass_manager;
pass_manager.register_pass<pass::VisualizeTree>("before_self_concat_with_fan_out.pdf");
pass_manager.register_pass<pass::VisualizeTree>("before_self_concat_with_fan_out.png");
pass_manager.register_pass<pass::ConcatElimination>();
pass_manager.register_pass<pass::SelfConcatFusion>();
pass_manager.register_pass<pass::VisualizeTree>("after_self_concat_with_fan_out.pdf");
pass_manager.register_pass<pass::VisualizeTree>("after_self_concat_with_fan_out.png");
pass_manager.run_passes(optimized_f);
test::Uniform<float> rng(0.0f, 100.0f);
......
......@@ -1423,22 +1423,22 @@ TEST(cpu_fusion, max_pool_with_indices)
{
pass::Manager pass_manager;
pass_manager.register_pass<pass::VisualizeTree>("max_pool_fprop_before.pdf");
pass_manager.register_pass<pass::VisualizeTree>("max_pool_fprop_before.png");
pass_manager.run_passes(f);
}
{
NodeVector nv_cwi;
pass::Manager pass_manager;
pass_manager.register_pass<pass::VisualizeTree>("max_pool_bprop_before.pdf");
pass_manager.register_pass<pass::VisualizeTree>("max_pool_bprop_before.png");
pass_manager.register_pass<runtime::cpu::pass::CPUWorkspaceInsertion>(nv_cwi);
pass_manager.register_pass<pass::VisualizeTree>("max_pool_bprop_after.pdf");
pass_manager.register_pass<pass::VisualizeTree>("max_pool_bprop_after.png");
pass_manager.run_passes(df);
}
{
pass::Manager pass_manager;
pass_manager.register_pass<pass::VisualizeTree>("max_pool_fprop_after.pdf");
pass_manager.register_pass<pass::VisualizeTree>("max_pool_fprop_after.png");
pass_manager.run_passes(f);
}
......@@ -1493,9 +1493,9 @@ TEST(cpu_fusion, backwards_maxpool_with_indices_n4_c1_hw4_2x2_max)
{
NodeVector nv_cwi;
pass::Manager pass_manager;
pass_manager.register_pass<pass::VisualizeTree>("max_pool_bprop_before2.pdf");
pass_manager.register_pass<pass::VisualizeTree>("max_pool_bprop_before2.png");
pass_manager.register_pass<runtime::cpu::pass::CPUWorkspaceInsertion>(nv_cwi);
pass_manager.register_pass<pass::VisualizeTree>("max_pool_bprop_after2.pdf");
pass_manager.register_pass<pass::VisualizeTree>("max_pool_bprop_after2.png");
pass_manager.run_passes(df);
}
......@@ -1794,7 +1794,7 @@ void optimize_graph(std::shared_ptr<ngraph::Function>& f, std::shared_ptr<ngraph
pass_manager.register_pass<ngraph::pass::ReshapeElimination>();
pass_manager.register_pass<ngraph::pass::ReshapeElimination>();
pass_manager.register_pass<runtime::cpu::pass::CPUWorkspaceInsertion>(nv_cwi);
pass_manager.register_pass<pass::VisualizeTree>("before.fprop_cache.pdf");
pass_manager.register_pass<pass::VisualizeTree>("before.fprop_cache.png");
pass_manager.run_passes(f);
pass_manager.run_passes(bf);
......@@ -2140,9 +2140,9 @@ TEST(cpu_fusion, group_convolution_fusion)
auto f = make_shared<Function>(NodeVector{concat}, ParameterVector{A, B});
pass::Manager pass_manager;
pass_manager.register_pass<pass::VisualizeTree>("before_group.pdf");
pass_manager.register_pass<pass::VisualizeTree>("before_group.png");
pass_manager.register_pass<runtime::cpu::pass::CPUBatchFusion>();
pass_manager.register_pass<pass::VisualizeTree>("after_group.pdf");
pass_manager.register_pass<pass::VisualizeTree>("after_group.png");
pass_manager.run_passes(f);
auto gc =
std::dynamic_pointer_cast<op::GroupConvolution>(f->get_results().at(0)->get_argument(0));
......@@ -2495,9 +2495,9 @@ TEST(cpu_fusion, loop_kernel_fusion_bounded_relu)
};
pass::Manager pass_manager;
pass_manager.register_pass<pass::VisualizeTree>("before_relu_fusion.pdf");
pass_manager.register_pass<pass::VisualizeTree>("before_relu_fusion.png");
pass_manager.register_pass<runtime::cpu::pass::CPULoopKernelFusion>(3);
pass_manager.register_pass<pass::VisualizeTree>("after_relu_fusion.pdf");
pass_manager.register_pass<pass::VisualizeTree>("after_relu_fusion.png");
auto cpu_f = make_function();
auto int_f = make_function();
pass_manager.run_passes(cpu_f);
......
......@@ -139,9 +139,9 @@ TEST(reshape_elimination, recurrent_reshapes)
auto baseline_input_shape = baseline_f->get_parameters().at(0)->get_shape();
pass::Manager pass_manager;
// pass_manager.register_pass<pass::VisualizeTree>("before_recurrent_reshapes.pdf");
// pass_manager.register_pass<pass::VisualizeTree>("before_recurrent_reshapes.png");
pass_manager.register_pass<pass::RecurrentReshapeElimination>();
// pass_manager.register_pass<pass::VisualizeTree>("after_recurrent_reshapes.pdf");
// pass_manager.register_pass<pass::VisualizeTree>("after_recurrent_reshapes.png");
pass_manager.run_passes(optimized_f);
test::Uniform<float> rng(0.0f, 100.0f);
......@@ -188,11 +188,11 @@ TEST(reshape_elimination, recurrent_reshapes_elimination)
auto baseline_input_shape = baseline_f->get_parameters().at(0)->get_shape();
pass::Manager pass_manager;
// pass_manager.register_pass<pass::VisualizeTree>("before_recurrent_reshapes_elimination.pdf");
// pass_manager.register_pass<pass::VisualizeTree>("before_recurrent_reshapes_elimination.png");
pass_manager.register_pass<pass::RecurrentReshapeElimination>();
// pass_manager.register_pass<pass::VisualizeTree>("after_1_recurrent_reshapes_elimination.pdf");
// pass_manager.register_pass<pass::VisualizeTree>("after_1_recurrent_reshapes_elimination.png");
pass_manager.register_pass<pass::ReshapeElimination>();
// pass_manager.register_pass<pass::VisualizeTree>("after_2_recurrent_reshapes_elimination.pdf");
// pass_manager.register_pass<pass::VisualizeTree>("after_2_recurrent_reshapes_elimination.png");
pass_manager.run_passes(optimized_f);
test::Uniform<float> rng(0.0f, 100.0f);
......@@ -229,9 +229,9 @@ TEST(reshape_elimination, recurrent_reshapes_fan_out)
auto baseline_input_shape = baseline_f->get_parameters().at(0)->get_shape();
pass::Manager pass_manager;
// pass_manager.register_pass<pass::VisualizeTree>("before_recurrent_reshapes_fan_out.pdf");
// pass_manager.register_pass<pass::VisualizeTree>("before_recurrent_reshapes_fan_out.png");
pass_manager.register_pass<pass::RecurrentReshapeElimination>();
// pass_manager.register_pass<pass::VisualizeTree>("after_recurrent_reshapes_fan_out.pdf");
// pass_manager.register_pass<pass::VisualizeTree>("after_recurrent_reshapes_fan_out.png");
pass_manager.run_passes(optimized_f);
test::Uniform<float> rng(0.0f, 100.0f);
......@@ -269,9 +269,9 @@ TEST(reshape_elimination, recurrent_reshapes_fan_out_at_end)
auto baseline_input_shape = baseline_f->get_parameters().at(0)->get_shape();
pass::Manager pass_manager;
// pass_manager.register_pass<pass::VisualizeTree>("before_recurrent_reshapes_fan_out_at_end.pdf");
// pass_manager.register_pass<pass::VisualizeTree>("before_recurrent_reshapes_fan_out_at_end.png");
pass_manager.register_pass<pass::RecurrentReshapeElimination>();
// pass_manager.register_pass<pass::VisualizeTree>("after_recurrent_reshapes_fan_out_at_end.pdf");
// pass_manager.register_pass<pass::VisualizeTree>("after_recurrent_reshapes_fan_out_at_end.png");
pass_manager.run_passes(optimized_f);
test::Uniform<float> rng(0.0f, 100.0f);
......@@ -318,10 +318,10 @@ TEST(reshape_elimination, recurrent_reshapes_multiple_fusions)
pass::Manager pass_manager;
// pass_manager.register_pass<pass::VisualizeTree>(
// "before_recurrent_reshapes_multiple_fusions.pdf");
// "before_recurrent_reshapes_multiple_fusions.png");
pass_manager.register_pass<pass::RecurrentReshapeElimination>();
// pass_manager.register_pass<pass::VisualizeTree>(
// "after_recurrent_reshapes_multiple_fusions.pdf");
// "after_recurrent_reshapes_multiple_fusions.png");
pass_manager.run_passes(optimized_f);
test::Uniform<float> rng(0.0f, 100.0f);
......@@ -360,9 +360,9 @@ TEST(reshape_elimination, nonrecurrent_reshapes)
auto baseline_input_shape = baseline_f->get_parameters().at(0)->get_shape();
pass::Manager pass_manager;
// pass_manager.register_pass<pass::VisualizeTree>("before_nonrecurrent_reshapes.pdf");
// pass_manager.register_pass<pass::VisualizeTree>("before_nonrecurrent_reshapes.png");
pass_manager.register_pass<pass::RecurrentReshapeElimination>();
// pass_manager.register_pass<pass::VisualizeTree>("after_nonrecurrent_reshapes.pdf");
// pass_manager.register_pass<pass::VisualizeTree>("after_nonrecurrent_reshapes.png");
pass_manager.run_passes(optimized_f);
test::Uniform<float> rng(0.0f, 100.0f);
......@@ -412,10 +412,10 @@ TEST(reshape_elimination, recurrent_reshapes_multiple_branches)
pass::Manager pass_manager;
// pass_manager.register_pass<pass::VisualizeTree>(
// "before_recurrent_reshapes_multiple_branches.pdf");
// "before_recurrent_reshapes_multiple_branches.png");
pass_manager.register_pass<pass::RecurrentReshapeElimination>();
// pass_manager.register_pass<pass::VisualizeTree>(
// "after_recurrent_reshapes_multiple_branches.pdf");
// "after_recurrent_reshapes_multiple_branches.png");
pass_manager.run_passes(optimized_f);
test::Uniform<float> rng(0.0f, 100.0f);
......
......@@ -61,11 +61,11 @@ TEST(reshape_sinking, edge_splitting)
auto func = make_shared<Function>(NodeVector{absn2, sum}, ParameterVector{a});
pass::Manager pass_manager;
//size_t before_count = count_ops_of_type<op::Reshape>(func);
pass_manager.register_pass<pass::VisualizeTree>("before.pdf");
pass_manager.register_pass<pass::VisualizeTree>("before.png");
pass_manager.register_pass<pass::ReshapeSinking>();
pass_manager.register_pass<pass::ReshapeElimination>();
pass_manager.register_pass<pass::CommonSubexpressionElimination>();
pass_manager.register_pass<pass::VisualizeTree>("after.pdf");
pass_manager.register_pass<pass::VisualizeTree>("after.png");
pass_manager.run_passes(func);
ASSERT_EQ(func->get_results().at(1)->get_argument(0), sum);
auto new_reshape =
......@@ -119,13 +119,13 @@ TEST(reshape_sinking, mnist_conv)
shared_ptr<Function> func = ngraph::deserialize(ss);
pass::Manager pass_manager;
size_t before_count = count_ops_of_type<op::Reshape>(func);
//pass_manager.register_pass<pass::VisualizeTree>("before.pdf");
//pass_manager.register_pass<pass::VisualizeTree>("before.png");
pass_manager.register_pass<pass::ReshapeSinking>();
pass_manager.register_pass<pass::ReshapeElimination>();
pass_manager.register_pass<pass::CommonSubexpressionElimination>();
//pass_manager.register_pass<pass::CoreFusion>();
//pass_manager.register_pass<runtime::cpu::pass::CPUFusion>();
//pass_manager.register_pass<pass::VisualizeTree>("after.pdf");
//pass_manager.register_pass<pass::VisualizeTree>("after.png");
pass_manager.run_passes(func);
size_t before_after = count_ops_of_type<op::Reshape>(func);
ASSERT_LE(before_after, before_count);
......@@ -154,11 +154,11 @@ TEST(reshape_sinking, nasnet_pooladd)
pass::Manager pass_manager;
size_t before_count = count_ops_of_type<op::Reshape>(func);
pass_manager.register_pass<pass::VisualizeTree>("before.pdf");
pass_manager.register_pass<pass::VisualizeTree>("before.png");
pass_manager.register_pass<pass::ReshapeSinking>();
pass_manager.register_pass<pass::ReshapeElimination>();
pass_manager.register_pass<pass::CommonSubexpressionElimination>();
pass_manager.register_pass<pass::VisualizeTree>("after.pdf");
pass_manager.register_pass<pass::VisualizeTree>("after.png");
pass_manager.run_passes(func);
size_t before_after = count_ops_of_type<op::Reshape>(func);
ASSERT_LE(before_after, before_count);
......@@ -192,11 +192,11 @@ TEST(reshape_sinking, slice_pad)
pass::Manager pass_manager;
size_t before_count = count_ops_of_type<op::Reshape>(f);
pass_manager.register_pass<pass::VisualizeTree>("before.pdf");
pass_manager.register_pass<pass::VisualizeTree>("before.png");
pass_manager.register_pass<pass::ReshapeSinking>();
pass_manager.register_pass<pass::ReshapeElimination>();
pass_manager.register_pass<pass::CommonSubexpressionElimination>();
pass_manager.register_pass<pass::VisualizeTree>("after.pdf");
pass_manager.register_pass<pass::VisualizeTree>("after.png");
pass_manager.run_passes(f);
size_t before_after = count_ops_of_type<op::Reshape>(f);
ASSERT_LE(before_after, before_count);
......@@ -265,11 +265,11 @@ TEST(reshape_sinking, concat)
auto f = make_shared<Function>(reshape_conv2, ParameterVector{A_, A1_});
pass::Manager pass_manager;
size_t before_count = count_ops_of_type<op::Reshape>(f);
pass_manager.register_pass<pass::VisualizeTree>("before.pdf");
pass_manager.register_pass<pass::VisualizeTree>("before.png");
pass_manager.register_pass<pass::ReshapeSinking>();
pass_manager.register_pass<pass::ReshapeElimination>();
pass_manager.register_pass<pass::CommonSubexpressionElimination>();
pass_manager.register_pass<pass::VisualizeTree>("after.pdf");
pass_manager.register_pass<pass::VisualizeTree>("after.png");
pass_manager.run_passes(f);
size_t before_after = count_ops_of_type<op::Reshape>(f);
ASSERT_LE(before_after, before_count);
......
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