Skip to content

Commit

Permalink
Fix (#65503)
Browse files Browse the repository at this point in the history
  • Loading branch information
co63oc authored Jun 27, 2024
1 parent b5087ad commit 37b428f
Show file tree
Hide file tree
Showing 12 changed files with 0 additions and 2,051 deletions.
19 changes: 0 additions & 19 deletions paddle/fluid/inference/analysis/ir_pass_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -266,25 +266,6 @@ void IRPassManager::CreatePasses(Argument *argument,
// not run fp16.
pass->Set("disable_trt_plugin_fp16",
new bool(argument->disable_trt_plugin_fp16()));
} else if (pass_name == "dlnne_subgraph_pass") {
auto precision_mode = argument->dlnne_precision_mode();
pass->Set("min_subgraph_size",
new int(argument->dlnne_min_subgraph_size()));
pass->Set("max_batch_size", new int(argument->dlnne_max_batch_size()));
pass->Set("use_static_batch",
new bool(argument->dlnne_use_static_batch()));
pass->Set("weight_share_mode",
new std::string(argument->dlnne_weight_share_mode()));
pass->Set("disable_nodes_by_outputs",
new std::unordered_set<std::string>(
argument->dlnne_disable_nodes_by_outputs()));
pass->Set("use_calib_mode", new bool(argument->dlnne_use_calib_mode()));
pass->Set("dlnne_precision_mode", new int(precision_mode));
pass->Set("input_shape_dict",
new std::map<std::string, std::vector<int64_t>>(
argument->dlnne_input_shape_dict()));
pass->Set("program",
new framework::ProgramDesc *(&argument->main_program()));
} else if (pass_name == "memory_optimize_pass") {
pass->Set("root_predictor_id", new int(argument->root_predictor_id()));
} else if (pass_name == "build_cinn_pass") {
Expand Down
19 changes: 0 additions & 19 deletions paddle/fluid/inference/analysis/ir_passes/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,3 @@ if(WITH_GPU AND TENSORRT_FOUND)
${INFER_IR_PASSES} tensorrt_subgraph_pass
CACHE INTERNAL "")
endif()

message("WITH_DLNNE:${WITH_DLNNE}")
if(WITH_DLNNE)
cc_library(
dlnne_subgraph_pass
SRCS dlnne_subgraph_pass.cc
DEPS ${analysis_deps} subgraph_util)
set(analysis_deps
${analysis_deps} subgraph_util dlnne_subgraph_pass
CACHE INTERNAL "")

set(pass_file
${PADDLE_BINARY_DIR}/paddle/fluid/inference/api/paddle_inference_pass.h.tmp
)
file(APPEND ${pass_file} "USE_PASS(dlnne_subgraph_pass);\n")
set(INFER_IR_PASSES
${INFER_IR_PASSES} dlnne_subgraph_pass
CACHE INTERNAL "")
endif()
Loading

0 comments on commit 37b428f

Please sign in to comment.