diff --git a/paddle/fluid/operators/fused/fused_embedding_seq_pool_op.h b/paddle/fluid/operators/fused/fused_embedding_seq_pool_op.h index 38dfae8ad6d347daa7ea1a729e48f92415208a70..758432fd9e4197302e0bd8f76a1ca7c524026a70 100644 --- a/paddle/fluid/operators/fused/fused_embedding_seq_pool_op.h +++ b/paddle/fluid/operators/fused/fused_embedding_seq_pool_op.h @@ -40,7 +40,7 @@ struct EmbeddingVSumFunctor { int64_t row_number = table_t->dims()[0]; int64_t row_width = table_t->dims()[1]; int64_t last_dim = output_t->dims()[1]; - int64_t *ids = const_cast(ids_t->data()); + const int64_t *ids = ids_t->data(); auto ids_lod = ids_t->lod()[0]; int64_t ids_count = ids_t->numel() / ids_lod.back();