|
|
|
@@ -222,9 +222,13 @@ void CumSumCPUKernel::LaunchKernel(const std::vector<kernel::AddressPtr> &inputs |
|
|
|
std::vector<std::thread> threads; |
|
|
|
threads.reserve(thread_num); |
|
|
|
size_t start = 0; |
|
|
|
if (thread_num < 1) { |
|
|
|
MS_LOG(ERROR) << "Invalid value: thread_num " << thread_num; |
|
|
|
return; |
|
|
|
} |
|
|
|
size_t once_compute_size = (lens + thread_num - 1) / thread_num; |
|
|
|
if (thread_num < 1 || once_compute_size < 1) { |
|
|
|
MS_LOG(ERROR) << "Invalid value: thread_num " << thread_num << "; once_compute_size " << once_compute_size; |
|
|
|
if (once_compute_size < 1) { |
|
|
|
MS_LOG(ERROR) << "Invalid value: once_compute_size " << once_compute_size; |
|
|
|
return; |
|
|
|
} |
|
|
|
while (start < lens) { |
|
|
|
|