Merge pull request !23992 from chenweifeng/code-clean-1
This commit is contained in:
i-robot 2021-10-12 14:18:08 +00:00 committed by Gitee
commit ac9f5c5ede
1 changed files with 2 additions and 2 deletions

View File

@ -48,7 +48,7 @@
#include "backend/optimizer/gpu/add_relu_v2_fusion.h"
#include "backend/optimizer/gpu/add_relu_grad_v2_fusion.h"
#include "backend/optimizer/gpu/matmul_biasadd_fusion.h"
#if ENABLE_GPU_INFER
#ifdef ENABLE_GPU_INFER
#include "backend/optimizer/trt_pass/graph_converter.h"
#endif
#include "backend/optimizer/graph_kernel/graph_kernel_optimization.h"
@ -155,7 +155,7 @@ void GPUSession::Optimize(const std::shared_ptr<KernelGraph> &kernel_graph) {
MS_EXCEPTION_IF_NULL(kernel_graph);
auto optimizer = std::make_shared<opt::GraphOptimizer>();
auto pm = std::make_shared<opt::PassManager>();
#if ENABLE_GPU_INFER
#ifdef ENABLE_GPU_INFER
pm->AddPass(std::make_shared<opt::GraphConverter>());
#endif
pm->AddPass(std::make_shared<opt::MatMulBiasAddFusion>());