Skip to content

Commit 0662580

Browse files
committed
Revert "[XPU] default no autotune (PaddlePaddle#62636)"
This reverts commit fde63d1.
1 parent c7fefd3 commit 0662580

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

paddle/fluid/inference/api/analysis_config.cc

-5
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,6 @@ void AnalysisConfig::EnableXpu(int l3_size,
180180
bool transformer_encoder_adaptive_seqlen,
181181
bool enable_multi_stream) {
182182
#if defined(PADDLE_WITH_XPU) || defined(LITE_SUBGRAPH_WITH_XPU)
183-
LOG_FIRST_N(WARNING, 1)
184-
<< "Parameters in EnableXpu/enable_xpu is deprecated since version "
185-
"2.6.1, and will be removed in version 3.0! Please use "
186-
"EnableXpu/enable_xpu without parameters, and use "
187-
"SetXpuConfig/set_xpu_config to set options.";
188183
use_xpu_ = true;
189184
xpu_config_.l3_size = l3_size;
190185
xpu_config_.conv_autotune_level = conv_autotune;

paddle/fluid/inference/api/paddle_analysis_config.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ struct PD_INFER_DECL XpuConfig {
111111
bool conv_autotune_file_writeback{false};
112112

113113
// Fc autotune level. The Optional values are 0-9. Default 0 means no
114-
// autotune.
115114
int fc_autotune_level{0};
116115
// Base fc autotune info is read from fc_autotune_file.
117116
std::string fc_autotune_file;
@@ -368,7 +367,7 @@ struct PD_INFER_DECL AnalysisConfig {
368367
///
369368
void EnableXpu(int l3_size = 0xfffc00,
370369
bool l3_locked = false,
371-
bool conv_autotune = false,
370+
bool conv_autotune = true,
372371
const std::string& conv_autotune_file = "",
373372
const std::string& transformer_encoder_precision = "int16",
374373
bool transformer_encoder_adaptive_seqlen = false,

paddle/fluid/pybind/inference_api.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ void BindAnalysisConfig(py::module *m) {
800800
&AnalysisConfig::EnableXpu,
801801
py::arg("l3_size") = 16 * 1024 * 1024,
802802
py::arg("l3_locked") = false,
803-
py::arg("conv_autotune") = false,
803+
py::arg("conv_autotune") = true,
804804
py::arg("conv_autotune_file") = "",
805805
py::arg("transformer_encoder_precision") = "int16",
806806
py::arg("transformer_encoder_adaptive_seqlen") = false,

0 commit comments

Comments
 (0)