File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ class PartialConcatXPUKernel : public framework::OpKernel<T> {
6363
6464 std::vector<int > xshape = phi::vectorize<int >(in_vars[i]->dims ());
6565 std::vector<int > starts = {0 , start_index};
66- std::vector<int > ends = {batch_size, start_index + partial_len + 1 };// 要截取的x的每个维度的终止坐标(不包含)
66+ std::vector<int > ends = {batch_size, start_index + partial_len};// 要截取的x的每个维度的终止坐标(不包含)
6767
6868 int r = xpu::slice<T>(xpu_context,
6969 input_data,
@@ -129,7 +129,7 @@ class PartialConcatGradXPUKernel : public framework::OpKernel<T> {
129129
130130 std::vector<int > xshape = phi::vectorize<int >(out_grad->dims ());
131131 std::vector<int > starts = {0 , int (partial_len * i)};
132- std::vector<int > ends = {batch_size, int (partial_len * i + partial_len + 1 )};// 要截取的x的每个维度的终止坐标(不包含)
132+ std::vector<int > ends = {batch_size, int (partial_len * i + partial_len)};// 要截取的x的每个维度的终止坐标(不包含)
133133
134134 int r = xpu::slice<T>(xpu_context,
135135 out_grad_data,
You can’t perform that action at this time.
0 commit comments