File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -510,7 +510,7 @@ inline void Executor::_schedule_unsync(
510510) const {
511511
512512 // module node need another initialization
513- if (node->_module != nullptr && !node->is_spawned ()) {
513+ if (node->_module != nullptr && !node->_module -> empty () && !node-> is_spawned ()) {
514514 _init_module_node_unsync (node, stack);
515515 }
516516
@@ -526,7 +526,7 @@ inline void Executor::_schedule_unsync(
526526 // here we guarantee to run by a thread so no need to cache the
527527 // size from nodes
528528 for (auto node : nodes) {
529- if (node->_module != nullptr && !node->is_spawned ()) {
529+ if (node->_module != nullptr && !node->_module -> empty () && !node-> is_spawned ()) {
530530 _init_module_node_unsync (node, stack);
531531 }
532532 stack.push (node);
@@ -541,7 +541,7 @@ inline void Executor::_schedule(Node* node, bool bypass) {
541541 assert (_workers.size () != 0 );
542542
543543 // module node need another initialization
544- if (node->_module != nullptr && !node->is_spawned ()) {
544+ if (node->_module != nullptr && !node->_module -> empty () && !node-> is_spawned ()) {
545545 _init_module_node (node);
546546 }
547547
@@ -582,7 +582,7 @@ inline void Executor::_schedule(PassiveVector<Node*>& nodes) {
582582 }
583583
584584 for (auto node : nodes) {
585- if (node->_module != nullptr && !node->is_spawned ()) {
585+ if (node->_module != nullptr && !node->_module -> empty () && !node-> is_spawned ()) {
586586 _init_module_node (node);
587587 }
588588 }
You can’t perform that action at this time.
0 commit comments