| 38 | class ModelPrunerTest : public GrapplerTest {}; |
| 39 | |
| 40 | TEST_F(ModelPrunerTest, NoPruning) { |
| 41 | // This trivial graph is so basic there's nothing to prune. |
| 42 | TrivialTestGraphInputYielder fake_input(4, 1, 10, false, {"CPU:0"}); |
| 43 | GrapplerItem item; |
| 44 | ASSERT_TRUE(fake_input.NextItem(&item)); |
| 45 | |
| 46 | ModelPruner pruner; |
| 47 | GraphDef output; |
| 48 | TF_ASSERT_OK(pruner.Optimize(nullptr, item, &output)); |
| 49 | |
| 50 | CompareGraphs(item.graph, output); |
| 51 | } |
| 52 | |
| 53 | TEST_F(ModelPrunerTest, StopGradientPruning) { |
| 54 | // Build a simple graph with a few trivially prunable ops. |
nothing calls this directly
no test coverage detected