@@ -255,9 +255,9 @@ void BindDistributed(py::module *m) {
255
255
bool sync_op) {
256
256
auto out_tensor_list =
257
257
CastPyArg2VectorOfTensor (py_out_tensor_list.ptr (), 0 );
258
- Tensor concat_out_tensor = paddle::concat (out_tensor_list, 0 );
258
+ Tensor stack_out_tensor = paddle::stack (out_tensor_list, 0 );
259
259
auto p_out_tensor = std::dynamic_pointer_cast<phi::DenseTensor>(
260
- concat_out_tensor .impl ());
260
+ stack_out_tensor .impl ());
261
261
auto *out_dense = p_out_tensor.get ();
262
262
263
263
auto in_tensor = CastPyArg2Tensor (py_in_tensor.ptr (), 0 );
@@ -307,16 +307,16 @@ void BindDistributed(py::module *m) {
307
307
bool sync_op) {
308
308
auto out_tensor_list =
309
309
CastPyArg2VectorOfTensor (py_out_tensor_list.ptr (), 0 );
310
- Tensor concat_out_tensor = paddle::concat (out_tensor_list, 0 );
310
+ Tensor stack_out_tensor = paddle::stack (out_tensor_list, 0 );
311
311
auto p_out_tensor = std::dynamic_pointer_cast<phi::DenseTensor>(
312
- concat_out_tensor .impl ());
312
+ stack_out_tensor .impl ());
313
313
auto *out_dense = p_out_tensor.get ();
314
314
315
315
auto in_tensor_list =
316
316
CastPyArg2VectorOfTensor (py_in_tensor_list.ptr (), 0 );
317
- Tensor concat_in_tensor = paddle::concat (in_tensor_list, 0 );
317
+ Tensor stack_in_tensor = paddle::stack (in_tensor_list, 0 );
318
318
auto p_in_tensor = std::dynamic_pointer_cast<phi::DenseTensor>(
319
- concat_in_tensor .impl ());
319
+ stack_in_tensor .impl ());
320
320
auto in_dense = *p_in_tensor;
321
321
322
322
// in_tensor_list should not be empty
@@ -430,9 +430,9 @@ void BindDistributed(py::module *m) {
430
430
431
431
auto in_tensor_list =
432
432
CastPyArg2VectorOfTensor (py_in_tensor_list.ptr (), 0 );
433
- Tensor concat_in_tensor = paddle::concat (in_tensor_list, 0 );
433
+ Tensor stack_in_tensor = paddle::stack (in_tensor_list, 0 );
434
434
auto p_in_tensor = std::dynamic_pointer_cast<phi::DenseTensor>(
435
- concat_in_tensor .impl ());
435
+ stack_in_tensor .impl ());
436
436
auto in_dense = *p_in_tensor;
437
437
438
438
distributed::ReduceScatterOptions opts{op};
@@ -484,9 +484,9 @@ void BindDistributed(py::module *m) {
484
484
485
485
auto in_tensor_list =
486
486
CastPyArg2VectorOfTensor (py_in_tensor_list.ptr (), 0 );
487
- Tensor concat_in_tensor = paddle::concat (in_tensor_list, 0 );
487
+ Tensor stack_in_tensor = paddle::stack (in_tensor_list, 0 );
488
488
auto p_in_tensor = std::dynamic_pointer_cast<phi::DenseTensor>(
489
- concat_in_tensor .impl ());
489
+ stack_in_tensor .impl ());
490
490
auto in_dense = *p_in_tensor;
491
491
492
492
distributed::ScatterOptions opts{src};
@@ -746,9 +746,9 @@ void BindDistributed(py::module *m) {
746
746
py::handle py_in_tensor) {
747
747
auto out_tensor_list =
748
748
CastPyArg2VectorOfTensor (py_out_tensor_list.ptr (), 0 );
749
- Tensor concat_out_tensor = paddle::concat (out_tensor_list, 0 );
749
+ Tensor stack_out_tensor = paddle::stack (out_tensor_list, 0 );
750
750
auto p_out_tensor = std::dynamic_pointer_cast<phi::DenseTensor>(
751
- concat_out_tensor .impl ());
751
+ stack_out_tensor .impl ());
752
752
auto *out_dense = p_out_tensor.get ();
753
753
754
754
auto in_tensor = CastPyArg2Tensor (py_in_tensor.ptr (), 0 );
@@ -854,16 +854,16 @@ void BindDistributed(py::module *m) {
854
854
py::handle py_in_tensor_list) {
855
855
auto out_tensor_list =
856
856
CastPyArg2VectorOfTensor (py_out_tensor_list.ptr (), 0 );
857
- Tensor concat_out_tensor = paddle::concat (out_tensor_list, 0 );
857
+ Tensor stack_out_tensor = paddle::stack (out_tensor_list, 0 );
858
858
auto p_out_tensor = std::dynamic_pointer_cast<phi::DenseTensor>(
859
- concat_out_tensor .impl ());
859
+ stack_out_tensor .impl ());
860
860
auto *out_dense = p_out_tensor.get ();
861
861
862
862
auto in_tensor_list =
863
863
CastPyArg2VectorOfTensor (py_in_tensor_list.ptr (), 0 );
864
- Tensor concat_in_tensor = paddle::concat (in_tensor_list, 0 );
864
+ Tensor stack_in_tensor = paddle::stack (in_tensor_list, 0 );
865
865
auto p_in_tensor = std::dynamic_pointer_cast<phi::DenseTensor>(
866
- concat_in_tensor .impl ());
866
+ stack_in_tensor .impl ());
867
867
auto in_dense = *p_in_tensor;
868
868
869
869
// in_tensor_list should not be empty
@@ -999,9 +999,9 @@ void BindDistributed(py::module *m) {
999
999
1000
1000
auto in_tensor_list =
1001
1001
CastPyArg2VectorOfTensor (py_in_tensor_list.ptr (), 0 );
1002
- Tensor concat_in_tensor = paddle::concat (in_tensor_list, 0 );
1002
+ Tensor stack_in_tensor = paddle::stack (in_tensor_list, 0 );
1003
1003
auto p_in_tensor = std::dynamic_pointer_cast<phi::DenseTensor>(
1004
- concat_in_tensor .impl ());
1004
+ stack_in_tensor .impl ());
1005
1005
auto in_dense = *p_in_tensor;
1006
1006
1007
1007
distributed::ReduceScatterOptions opts{op};
@@ -1057,9 +1057,9 @@ void BindDistributed(py::module *m) {
1057
1057
1058
1058
auto in_tensor_list =
1059
1059
CastPyArg2VectorOfTensor (py_in_tensor_list.ptr (), 0 );
1060
- Tensor concat_in_tensor = paddle::concat (in_tensor_list, 0 );
1060
+ Tensor stack_in_tensor = paddle::stack (in_tensor_list, 0 );
1061
1061
auto p_in_tensor = std::dynamic_pointer_cast<phi::DenseTensor>(
1062
- concat_in_tensor .impl ());
1062
+ stack_in_tensor .impl ());
1063
1063
auto in_dense = *p_in_tensor;
1064
1064
1065
1065
distributed::ScatterOptions opts{src};
0 commit comments