Skip to content

Commit 5f29cc7

Browse files
authored
Merge pull request #9618 from wangkuiyi/fix_variable_response
Fix compilation warnings in variable_response.cc
2 parents 3743caa + e941914 commit 5f29cc7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

paddle/fluid/operators/detail/variable_response.cc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@
1313
// limitations under the License.
1414

1515
#include "paddle/fluid/operators/detail/variable_response.h"
16-
#include <string.h>
16+
17+
#include <string>
18+
#include <utility>
19+
#include <vector>
20+
1721
#include "paddle/fluid/operators/detail/send_recv.pb.h"
1822
#include "paddle/fluid/operators/detail/sendrecvop_utils.h"
1923

@@ -151,7 +155,7 @@ bool VariableResponse::CopySelectRowsTensorData(
151155
auto* tensor = slr->mutable_value();
152156
tensor->Resize(dims);
153157
PADDLE_ENFORCE_EQ(
154-
tensor->numel(),
158+
static_cast<size_t>(tensor->numel()),
155159
length / framework::SizeOfType(
156160
paddle::operators::detail::ToTypeIndex(meta_.data_type())));
157161
void* tensor_data = tensor->mutable_data(

0 commit comments

Comments
 (0)