Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Inference] Delete some useless code #61444

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions paddle/fluid/framework/ir/auto_mixed_precision_pass.cc
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,8 @@ void AutoMixedPrecisionPass::SetVarPrecision() const {
if (real_in_var_node->Var()->Persistable()) {
real_in_var_node->Var()->SetDataType(
framework::TransToProtoVarType(low_precision_));
VLOG(4) << real_in_var_node->Var()->Name()
<< "'s data type was set to low precision";
vars_convert_to_low_precision_.insert(in_var_name);
}
}
Expand All @@ -804,6 +806,8 @@ void AutoMixedPrecisionPass::SetVarPrecision() const {

real_out_var_node->Var()->SetDataType(
framework::TransToProtoVarType(low_precision_));
VLOG(4) << real_out_var_node->Var()->Name()
<< "'s data type was set to low precision";
if (real_out_var_node->Var()->Persistable()) {
vars_convert_to_low_precision_.insert(out_var_name);
}
Expand All @@ -823,6 +827,8 @@ void AutoMixedPrecisionPass::SetVarPrecision() const {
if (vars_convert_to_low_precision_.count(var_name)) {
var_node->Var()->SetDataType(
framework::TransToProtoVarType(low_precision_));
VLOG(4) << var_node->Var()->Name()
<< "'s data type was set to low precision";
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/inference/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ get_property(fluid_modules GLOBAL PROPERTY FLUID_MODULES)
get_property(phi_modules GLOBAL PROPERTY PHI_MODULES)
get_property(ir_targets GLOBAL PROPERTY IR_TARGETS)
get_property(not_infer_modules GLOBAL PROPERTY NOT_INFER_MODULES)
set(utils_modules pretty_log string_helper benchmark utf8proc)
set(utils_modules pretty_log string_helper utf8proc)

if(NOT WITH_GFLAGS)
set(utils_modules ${utils_modules} paddle_flags)
Expand Down
3 changes: 3 additions & 0 deletions paddle/fluid/inference/api/analysis_predictor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1830,6 +1830,9 @@ void AnalysisPredictor::PrepareArgument() {
}
LOG(INFO) << "This model run in GPU mixed precision mode with no ir "
"optimization.";
if (config_.ir_debug_) {
pass_builder->TurnOnDebug();
}
} else {
LOG(INFO)
<< "Ir optimization is turned off, no ir pass will be executed.";
Expand Down
12 changes: 0 additions & 12 deletions paddle/fluid/inference/utils/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
cc_library(
benchmark
SRCS benchmark.cc
DEPS enforce common)

cc_library(
infer_io_utils
SRCS io_utils.cc
Expand All @@ -15,10 +10,3 @@ cc_library(
cc_library(table_printer SRCS table_printer.cc)

proto_library(shape_range_info_proto SRCS shape_range_info.proto)

if(WITH_ONNXRUNTIME AND WIN32)
# Copy onnxruntime for some c++ test in Windows, since the test will
# be build only in CI, so suppose the generator in Windows is Ninja.
copy_onnx(test_benchmark)
copy_onnx(test_table_printer)
endif()
54 changes: 0 additions & 54 deletions paddle/fluid/inference/utils/benchmark.cc

This file was deleted.

56 changes: 0 additions & 56 deletions paddle/fluid/inference/utils/benchmark.h

This file was deleted.

1 change: 0 additions & 1 deletion paddle/fluid/pir/drr/include/drr_pattern_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ class IrContext;
namespace paddle {
namespace drr {

class DrrRewritePattern;
class DrrPatternContext;

class DrrPatternBase {
Expand Down
2 changes: 0 additions & 2 deletions test/cpp/fluid/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ add_subdirectory(memory)
add_subdirectory(benchmark)
add_subdirectory(framework)

add_subdirectory(inference)

if(WITH_CINN)
add_subdirectory(cinn)
endif()
Expand Down
1 change: 0 additions & 1 deletion test/cpp/fluid/inference/CMakeLists.txt

This file was deleted.

18 changes: 0 additions & 18 deletions test/cpp/fluid/inference/utils/CMakeLists.txt

This file was deleted.

40 changes: 0 additions & 40 deletions test/cpp/fluid/inference/utils/benchmark_tester.cc

This file was deleted.

Loading