Skip to content

Commit

Permalink
fix concat bug, init inputs_data_vec (PaddlePaddle#57389)
Browse files Browse the repository at this point in the history
  • Loading branch information
wanghuancoder authored Sep 18, 2023
1 parent 1b5379c commit e94e522
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions paddle/phi/kernels/funcs/concat_and_split_functor.cu
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,9 @@ void ConcatFunctorWithIndexType(const phi::GPUContext& ctx,

IndexT inputs_col_num = in_num + 1;
std::vector<const T*> inputs_data_vec(in_num, nullptr);
for (size_t i = 0; i < ins.size(); ++i) {
inputs_data_vec[i] = ins[i].data<T>();
}
std::vector<IndexT> inputs_col_vec(inputs_col_num, 0);
const T** inputs_data = inputs_data_vec.data();
IndexT* inputs_col = inputs_col_vec.data();
Expand Down

0 comments on commit e94e522

Please sign in to comment.