forked from mindspore-Ecosystem/mindspore
!26734 fix the bug of single thread execution stack overflow
Merge pull request !26734 from limingqi107/bug_fix
This commit is contained in:
commit
890a5dbae1
|
@ -424,7 +424,8 @@ void GraphScheduler::SetActorExecutionStrategy(ActorSet *const actor_set, GraphE
|
|||
}
|
||||
|
||||
if ((actor_set->copy_actors_.size() > 0) || (actor_set->super_kernel_actors_.size() > 0) ||
|
||||
(actor_set->kernel_actors_.size() > ActorDispatcher::kSingleThreadExecutionActorMaxNum)) {
|
||||
(actor_set->kernel_actors_.size() > ActorDispatcher::kSingleThreadExecutionActorMaxNum) ||
|
||||
(actor_set->loop_count_actor_->loop_count() > 1)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -435,7 +436,6 @@ void GraphScheduler::SetActorExecutionStrategy(ActorSet *const actor_set, GraphE
|
|||
if (actor_set->execution_count_ == ActorDispatcher::kMultiThreadExecutionCountEnd) {
|
||||
actor_set->multi_thread_execution_time_ /=
|
||||
(ActorDispatcher::kMultiThreadExecutionCountEnd - ActorDispatcher::kMultiThreadExecutionCountBegin + 1);
|
||||
actor_set->multi_thread_execution_time_ /= actor_set->loop_count_actor_->loop_count();
|
||||
actor_set->is_multi_thread_execution_ = false;
|
||||
}
|
||||
return;
|
||||
|
@ -448,7 +448,6 @@ void GraphScheduler::SetActorExecutionStrategy(ActorSet *const actor_set, GraphE
|
|||
if (actor_set->execution_count_ == ActorDispatcher::kSingleThreadExecutionCountEnd) {
|
||||
actor_set->single_thread_execution_time_ /=
|
||||
(ActorDispatcher::kSingleThreadExecutionCountEnd - ActorDispatcher::kSingleThreadExecutionCountBegin + 1);
|
||||
actor_set->single_thread_execution_time_ /= actor_set->loop_count_actor_->loop_count();
|
||||
actor_set->is_multi_thread_execution_ =
|
||||
(actor_set->multi_thread_execution_time_ <= actor_set->single_thread_execution_time_) ? true : false;
|
||||
MS_LOG(INFO) << "Multi thread execution time cost: " << actor_set->multi_thread_execution_time_
|
||||
|
|
Loading…
Reference in New Issue