diff --git a/paddle/fluid/operators/roi_align_op_xpu.cc b/paddle/fluid/operators/roi_align_op_xpu.cc index 75bd94142e6b7ff0a36220b594ba14380f65053b..699cc7b84a4e6d44ee733849f169ebfa072f14e9 100644 --- a/paddle/fluid/operators/roi_align_op_xpu.cc +++ b/paddle/fluid/operators/roi_align_op_xpu.cc @@ -62,7 +62,7 @@ class XPUROIAlignOpKernel : public framework::OpKernel { } else { auto _rois_lod = rois->lod().back(); rois_batch_size = _rois_lod.size() - 1; - for (int n = 0; n < _rois_lod.size(); ++n) { + for (int n = 0; n < static_cast(_rois_lod.size()); ++n) { rois_lod[n] = _rois_lod[n]; } PADDLE_ENFORCE_EQ(