Browse Source

[CPU] Fix the bug of gather kernel

tags/v1.6.0
zhanyuan 4 years ago
parent
commit
a5b416d0f4
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      mindspore/ccsrc/backend/kernel_compiler/cpu/gather_cpu_kernel.cc

+ 1
- 1
mindspore/ccsrc/backend/kernel_compiler/cpu/gather_cpu_kernel.cc View File

@@ -90,7 +90,7 @@ void GatherV2CPUKernel<T>::ParallelRun(const int8_t *input_addr, const int *indi
std::vector<common::Task> tasks;
int thread_index = 0;
while (thread_index < thread_num) {
int count = SizeToInt(MSMIN(stride, outer_size - stride * IntToSize(thread_index)));
int count = MSMIN(SizeToInt(stride), SizeToInt(outer_size) - SizeToInt(stride) * thread_index);
if (count <= 0) {
break;
}


Loading…
Cancel
Save