未验证 提交 7d490b2d 编写于 作者: Y Yuanle Liu 提交者: GitHub

process warnings when compiled with gcc11.2 (#49651)

上级 2642caaa
......@@ -764,7 +764,7 @@ struct SimpleOpTypeSetTeller : public Teller {
if (op_type == "nearest_interp") {
std::vector<std::string> attrs{
"interp_method", "align_corners", "scale", "out_h", "out_w"};
for (auto const attr : attrs) {
for (auto const& attr : attrs) {
if (!desc.HasAttr(attr)) return false;
}
if (desc.HasAttr("data_layout")) {
......@@ -810,7 +810,7 @@ struct SimpleOpTypeSetTeller : public Teller {
"scale",
"out_h",
"out_w"};
for (auto const attr : attrs) {
for (auto const& attr : attrs) {
if (!desc.HasAttr(attr)) return false;
}
auto data_layout = phi::StringToDataLayout(
......@@ -849,7 +849,7 @@ struct SimpleOpTypeSetTeller : public Teller {
"scale",
"out_h",
"out_w"};
for (auto const attr : attrs) {
for (auto const& attr : attrs) {
if (!desc.HasAttr(attr)) {
VLOG(3) << "The op_type " << op_type << " doesn't have the attr "
<< attr << " and return false";
......@@ -1746,7 +1746,7 @@ struct SimpleOpTypeSetTeller : public Teller {
"spatial_scale",
"sampling_ratio",
"aligned"};
for (auto const attr : attrs) {
for (auto const& attr : attrs) {
if (!desc.HasAttr(attr)) return false;
}
......
......@@ -32,7 +32,7 @@ TRTInt8Calibrator::TRTInt8Calibrator(
: batch_size_(batch_size), engine_name_(engine_name) {
int i = 0;
VLOG(4) << "Init a new calibrator: " << engine_name_;
for (const auto it : buffers) {
for (const auto& it : buffers) {
phi::DenseTensor temp_tensor;
std::string input_name = it.first;
int data_size = it.second;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册