Skip to content

Commit 1ead931

Browse files
committed
remove unused code in test_helper.h to pass ci
test=develop
1 parent 7a2887d commit 1ead931

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

paddle/fluid/inference/tests/test_helper.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ limitations under the License. */
1818
#include <string>
1919
#include <vector>
2020

21-
#include "paddle/fluid/framework/ir/graph_to_program_pass.h"
2221
#include "paddle/fluid/framework/lod_tensor.h"
2322
#include "paddle/fluid/inference/io.h"
2423
#include "paddle/fluid/platform/profiler.h"
@@ -136,15 +135,6 @@ std::vector<std::vector<int64_t>> GetFeedTargetShapes(
136135
return feed_target_shapes;
137136
}
138137

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-
148138
template <typename Place, bool CreateVars = true, bool PrepareContext = false>
149139
void TestInference(const std::string& dirname,
150140
const std::vector<paddle::framework::LoDTensor*>& cpu_feeds,
@@ -182,7 +172,6 @@ void TestInference(const std::string& dirname,
182172
paddle::platform::DeviceContextPool::Instance().Get(place));
183173
inference_program = InitProgram(&executor, scope, dirname, is_combined);
184174
}
185-
Compile(inference_program.get());
186175

187176
// Disable the profiler and print the timing information
188177
paddle::platform::DisableProfiler(paddle::platform::EventSortingKey::kDefault,

0 commit comments

Comments
 (0)