From d6e159144565b8c5b9aac1c12216614956a1fe31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=98=8E=E5=86=AC?= <78149749+winter-wang@users.noreply.github.com> Date: Tue, 12 Apr 2022 00:55:39 +0800 Subject: [PATCH] [Infrt] fix ci bug. test=document_fix (#41663) --- paddle/infrt/api/infrt_api.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/paddle/infrt/api/infrt_api.cc b/paddle/infrt/api/infrt_api.cc index 8b4b14a3ca0..ec6293f9a2b 100644 --- a/paddle/infrt/api/infrt_api.cc +++ b/paddle/infrt/api/infrt_api.cc @@ -257,11 +257,13 @@ int InfRtPredictor::Init(const InfRtConfig& config) { ::mlir::OpPassManager& pass_manager = pm.nest<::mlir::FuncOp>(); if (config.tensorrt_enabled()) { pass_manager.addPass(::infrt::CreateInfrtWeightsUnfoldPass()); +#if defined(INFRT_WITH_GPU) && defined(INFRT_WITH_TRT) pass_manager.addPass(::infrt::trt::CreateTrtOpTellerPass()); pass_manager.addPass(::infrt::trt::CreateTrtGraphFusePass()); pass_manager.addPass(::infrt::trt::CreateTrtGraphSplitPass(1)); pass_manager.addPass(::infrt::trt::CreateTrtOpConverterPass()); pass_manager.addPass(::infrt::trt::CreateTrtTypeConvertPass()); +#endif pass_manager.addPass(::mlir::createCanonicalizerPass()); } else { std::vector<::infrt::Place> valid_places = { -- GitLab