@@ -18,7 +18,6 @@ limitations under the License. */
18
18
#include < string>
19
19
#include < vector>
20
20
21
- #include " paddle/fluid/framework/ir/graph_to_program_pass.h"
22
21
#include " paddle/fluid/framework/lod_tensor.h"
23
22
#include " paddle/fluid/inference/io.h"
24
23
#include " paddle/fluid/platform/profiler.h"
@@ -136,15 +135,6 @@ std::vector<std::vector<int64_t>> GetFeedTargetShapes(
136
135
return feed_target_shapes;
137
136
}
138
137
139
- void Compile (paddle::framework::ProgramDesc* program) {
140
- std::unique_ptr<paddle::framework::ir::Graph> g (
141
- new paddle::framework::ir::Graph (*program));
142
- auto pass = paddle::framework::ir::PassRegistry::Instance ().Get (
143
- " graph_to_program_pass" );
144
- pass->SetNotOwned <paddle::framework::ProgramDesc>(" program" , program);
145
- pass->Apply (std::move (g));
146
- }
147
-
148
138
template <typename Place, bool CreateVars = true , bool PrepareContext = false >
149
139
void TestInference (const std::string& dirname,
150
140
const std::vector<paddle::framework::LoDTensor*>& cpu_feeds,
@@ -182,7 +172,6 @@ void TestInference(const std::string& dirname,
182
172
paddle::platform::DeviceContextPool::Instance ().Get (place));
183
173
inference_program = InitProgram (&executor, scope, dirname, is_combined);
184
174
}
185
- Compile (inference_program.get ());
186
175
187
176
// Disable the profiler and print the timing information
188
177
paddle::platform::DisableProfiler (paddle::platform::EventSortingKey::kDefault ,
0 commit comments